springboot整合elasticsearch,并使用docker desktop运行elasticsearch镜像容器遇到的问题。

devtools/2024/11/19 22:09:54/

springboot和elasticsearch版本兼容性问题:
在这里插入图片描述

使用easy-es组件,简化es的操作,

Easy-Es​官网:https://www.easy-es.cn/
参考easy-es组件官网的文档的内容,调整版本问题。
​​​​在这里插入图片描述
Java代码如下:

package cn.dao789.elasticsearch;import cn.dao789.CacheApplication;
import cn.hutool.core.date.DateUtil;
import org.dromara.easyes.core.biz.EsPageInfo;
import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;import java.util.Date;@SpringBootTest(classes = CacheApplication.class)
public class TestElasticSearch {@Autowiredprivate ArticleMapper articleMapper;@Testvoid saveArticle() {System.out.println("插入文档数据测试");ArticleElastic elastic = new ArticleElastic();elastic.setTitle("使用easy-es操作elasticsearch");String context = "在当今信息爆炸的时代,数据的搜索、存储和管理成为了企业和个人不可或缺的需求。" +"Elasticsearch,作为一款强大且灵活的开源搜索和分析引擎,因其高效的搜索性能、分布式存储能力和可扩展性,得到了广泛的应用。" +"然而,Elasticsearch的复杂配置和操作对于初学者来说可能存在一定的门槛。" +"为了降低这一门槛,让更多的人能够轻松地使用Elasticsearch,Easy-ES应运而生。";elastic.setSummary(context);elastic.setDeleted(0);elastic.setIsPublish(1);elastic.setCreateTime(DateUtil.formatTime(new Date()));Integer insert = articleMapper.insert(elastic);System.out.println("插入数据条数:" + insert);}@Testvoid queryArticle() {LambdaEsQueryWrapper<ArticleElastic> wrapper = new LambdaEsQueryWrapper<>();wrapper.multiMatchQuery("elasticsearch", ArticleElastic::getTitle, ArticleElastic::getSummary).eq(ArticleElastic::getIsPublish, 1);EsPageInfo<ArticleElastic> pageInfo = articleMapper.pageQuery(wrapper, 0, 10);}@Testvoid updateArticle() {LambdaEsQueryWrapper<ArticleElastic> wrapper = new LambdaEsQueryWrapper<>();wrapper.eq(ArticleElastic::getId, 1L);ArticleElastic articleElastic = new ArticleElastic();articleElastic.setTitle("使用easy-es操作elasticsearch");articleElastic.setSummary("123123");articleMapper.update(articleElastic, wrapper);}@Testvoid deleteArticle() {LambdaEsQueryWrapper<ArticleElastic> wrapper = new LambdaEsQueryWrapper<>();wrapper.eq(ArticleElastic::getId, 1L);articleMapper.delete(wrapper);}
}

完整的pom文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>cn.dao789</groupId><artifactId>demo-cache-spring</artifactId><version>1.0-SNAPSHOT</version><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.6.6</version><relativePath/> <!-- lookup parent from repository --></parent><properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><exclusion><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-high-level-client</artifactId></exclusion><exclusion><groupId>org.elasticsearch</groupId><artifactId>elasticsearch</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId></dependency><!--mongodb依赖--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-mongodb</artifactId></dependency><!--spring cache依赖--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-cache</artifactId></dependency><!--ehcache3.0版本--><dependency><groupId>org.ehcache</groupId><artifactId>ehcache</artifactId><version>3.6.3</version></dependency><!--elasticsearch相关依赖开始--><dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-high-level-client</artifactId><version>7.14.0</version></dependency><dependency><groupId>org.elasticsearch</groupId><artifactId>elasticsearch</artifactId><version>7.14.0</version></dependency><!-- 引入easy-es最新版本的依赖--><dependency><groupId>org.dromara.easy-es</groupId><artifactId>easy-es-boot-starter</artifactId><version>2.0.0</version></dependency><!--elasticsearch相关依赖结束--><dependency><groupId>cn.hutool</groupId><artifactId>hutool-all</artifactId><version>5.8.25</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId></dependency></dependencies></project>

测试过程中出现的问题:
1:启动报错


java.lang.reflect.UndeclaredThrowableExceptionat com.sun.proxy.$Proxy96.insert(Unknown Source)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)at com.sun.proxy.$Proxy97.insert(Unknown Source)at cn.dao789.elasticsearch.TestElasticSearch.saveArticle(TestElasticSearch.java:32)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at java.util.ArrayList.forEach(ArrayList.java:1259)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at java.util.ArrayList.forEach(ArrayList.java:1259)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.dromara.easyes.core.proxy.EsMapperProxy$PlainMethodInvoker.invoke(EsMapperProxy.java:130)at org.dromara.easyes.core.proxy.EsMapperProxy.invoke(EsMapperProxy.java:75)... 82 more
Caused by: ElasticsearchException[java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: no further information]; nested: ExecutionException[java.net.ConnectException: Connection refused: no further information]; nested: ConnectException[Connection refused: no further information];at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2078)at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1732)at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1702)at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1672)at org.elasticsearch.client.RestHighLevelClient.index(RestHighLevelClient.java:1029)at org.dromara.easyes.core.kernel.BaseEsMapperImpl.doInsert(BaseEsMapperImpl.java:728)at org.dromara.easyes.core.kernel.BaseEsMapperImpl.lambda$insert$8(BaseEsMapperImpl.java:363)at java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:210)at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)at java.util.stream.IntPipeline.reduce(IntPipeline.java:457)at java.util.stream.IntPipeline.sum(IntPipeline.java:415)at org.dromara.easyes.core.kernel.BaseEsMapperImpl.insert(BaseEsMapperImpl.java:364)at org.dromara.easyes.core.kernel.BaseEsMapperImpl.insert(BaseEsMapperImpl.java:334)... 88 more
Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: no further informationat org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:262)at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:249)at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:76)at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2075)... 104 more
Caused by: java.net.ConnectException: Connection refused: no further informationat sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:715)at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)at java.lang.Thread.run(Thread.java:750)

经测试,端口填写错误或者es未启动都会报上面的错。
easy-es的官网提供的一些排查思路
easy-es官网截图

docker_desktopelasticsearch_315">docker desktop运行elasticsearch的镜像可能遇到的问题

  • 启动单个实例容器报错,容器启动失败。
    如下图:只配置了端口和容器名称。
    在这里插入图片描述

启动的时候出现了如下错误:

2024-11-14 15:49:15 OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2024-11-14 15:49:24 {"type": "server", "timestamp": "2024-11-14T07:49:24,634Z", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "using [1] data paths, mounts [[/ (overlay)]], net usable_space [54.9gb], net total_space [62.6gb], types [overlay]" }
2024-11-14 15:49:24 {"type": "server", "timestamp": "2024-11-14T07:49:24,637Z", "level": "INFO", "component": "o.e.e.NodeEnvironment", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "heap size [989.8mb], compressed ordinary object pointers [true]" }
2024-11-14 15:49:24 {"type": "server", "timestamp": "2024-11-14T07:49:24,769Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "node name [e9ae4b1d4b35], node ID [yhayJkM3TQuDtp1aJjWySQ], cluster name [docker-cluster]" }
2024-11-14 15:49:24 {"type": "server", "timestamp": "2024-11-14T07:49:24,770Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "version[7.6.2], pid[1], build[default/docker/ef48eb35cf30adf4db14086e8aabd07ef6fb113f/2020-03-26T06:34:37.794943Z], OS[Linux/6.10.0-linuxkit/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/13.0.2/13.0.2+8]" }
2024-11-14 15:49:24 {"type": "server", "timestamp": "2024-11-14T07:49:24,771Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "JVM home [/usr/share/elasticsearch/jdk]" }
2024-11-14 15:49:24 {"type": "server", "timestamp": "2024-11-14T07:49:24,771Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/tmp/elasticsearch-5454867559535222002, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Des.cgroups.hierarchy.override=/, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config, -Des.distribution.flavor=default, -Des.distribution.type=docker, -Des.bundled_jdk=true]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,958Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [aggs-matrix-stats]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,958Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [analysis-common]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,958Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [flattened]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,958Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [frozen-indices]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,958Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [ingest-common]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,958Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [ingest-geoip]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [ingest-user-agent]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [lang-expression]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [lang-mustache]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [lang-painless]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [mapper-extras]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [parent-join]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [percolator]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,959Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [rank-eval]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [reindex]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [repository-url]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [search-business-rules]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [spatial]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [transform]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [transport-netty4]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [vectors]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,960Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-analytics]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-ccr]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-core]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-deprecation]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-enrich]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-graph]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-ilm]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-logstash]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-ml]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,961Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-monitoring]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,962Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-rollup]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,962Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-security]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,962Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-sql]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,962Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-voting-only-node]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,962Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "loaded module [x-pack-watcher]" }
2024-11-14 15:49:26 {"type": "server", "timestamp": "2024-11-14T07:49:26,962Z", "level": "INFO", "component": "o.e.p.PluginsService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "no plugins loaded" }
2024-11-14 15:49:30 {"type": "server", "timestamp": "2024-11-14T07:49:30,307Z", "level": "INFO", "component": "o.e.x.s.a.s.FileRolesStore", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "parsed [0] roles from file [/usr/share/elasticsearch/config/roles.yml]" }
2024-11-14 15:49:30 {"type": "server", "timestamp": "2024-11-14T07:49:30,887Z", "level": "INFO", "component": "o.e.x.m.p.l.CppLogMessageHandler", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "[controller/105] [Main.cc@110] controller (64 bit): Version 7.6.2 (Build e06ef9d86d5332) Copyright (c) 2020 Elasticsearch BV" }
2024-11-14 15:49:31 {"type": "server", "timestamp": "2024-11-14T07:49:31,538Z", "level": "DEBUG", "component": "o.e.a.ActionModule", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "Using REST wrapper from plugin org.elasticsearch.xpack.security.Security" }
2024-11-14 15:49:31 {"type": "server", "timestamp": "2024-11-14T07:49:31,664Z", "level": "INFO", "component": "o.e.d.DiscoveryModule", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "using discovery type [zen] and seed hosts providers [settings]" }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,386Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "initialized" }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,386Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "starting ..." }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,512Z", "level": "INFO", "component": "o.e.t.TransportService", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "publish_address {172.17.0.5:9300}, bound_addresses {[::]:9300}" }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,793Z", "level": "INFO", "component": "o.e.b.BootstrapChecks", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "bound or publishing to a non-loopback address, enforcing bootstrap checks" }
2024-11-14 15:49:32 ERROR: [1] bootstrap checks failed
2024-11-14 15:49:32 [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
2024-11-14 15:49:32 ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,800Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "stopping ..." }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,846Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "stopped" }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,847Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "closing ..." }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,863Z", "level": "INFO", "component": "o.e.n.Node", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "closed" }
2024-11-14 15:49:32 {"type": "server", "timestamp": "2024-11-14T07:49:32,867Z", "level": "INFO", "component": "o.e.x.m.p.NativeController", "cluster.name": "docker-cluster", "node.name": "e9ae4b1d4b35", "message": "Native controller process has stopped - no new native processes can be started" }

错误信息中包含需要配置注册中心等内容,搜索发现如果只启动单个实例的话,需要配置discovery.type: single-node
该配置的作用是以单节点形式启动集群,配置完成之后能正常启动。
在这里插入图片描述


http://www.ppmy.cn/devtools/135309.html

相关文章

校园二手交易网站毕业设计基于SpringBootSSM框架

目录 一、引言 二、需求分析 2.1用户需求分析 2.1.1学生用户 2.1.2管理员 2.2系统功能需求 2.3系统非功能需求 ‌2.4技术需求 ‌2.4.1 技术选择 ‌2.4.2系统架构‌ 三、详细设计 3.1系统架构设计‌ ‌3.2前端设计‌ ‌3.3后端设计‌ ‌3.4数据库设计‌ 本文介绍…

使用useCallback引发对闭包的理解

一、先简单介绍一下闭包: 闭包是 JavaScript 中的重要概念&#xff0c;它指的是一个函数可以“记住”并访问其词法作用域&#xff0c;即使在这个函数的外部被执行。简单来说&#xff0c;闭包是由函数及其相关的环境组合而成的。 闭包的特性 函数内部可以访问外部变量: 闭包…

【全栈环境搭建】Fantasy和ZMFrameWork整合

1.环境搭建 一、Fantasy框架下载1.https://github.com/qq362946/Fantasy.git2.修改 Fantasy/examples/Server/Main/NLog.config 配置打印日志文件:<?xml version"1.0" encoding"utf-8" ?> <nlog xmlns"http://www.nlog-project.org/schem…

uni-app快速入门(六)--rpx尺寸单位与Flex布局

一、uni-app尺寸单位 uni-app支持的通用尺寸单位包括px、rpx。为支持跨平台&#xff0c;在搭建空驾驶建议使用Flex布局。px指屏幕像素&#xff0c;rpx是响应式像素&#xff0c;是根据屏幕宽度自适应的动态单位。假如屏幕宽度为750像素&#xff0c;750rpx正好为屏幕宽度。uni-ap…

微知-DOCA ARGP参数模块的相关接口和用法(config单元、params单元,argp pipe line,回调)

文章目录 1. 背景2. 设置参数的主要流程2.1 初始化2.2 注册某个params的处理方式以及回调函数2.4 定义好前面的params以及init指定config地点后start处理argv 3. 其他4. DOCA ARGP包相关4.1 主要接口4.2 DOCA ARGP的2个rpm包4.2.1 doca-sdk-argp-2.9.0072-1.el8.x86_64.rpm4.2.…

游戏引擎学习第九天

视频参考:https://www.bilibili.com/video/BV1ouUPYAErK/ 修改之前的方波数据&#xff0c;改播放正弦波 下面主要讲关于浮点数 1. char&#xff08;字符类型&#xff09; 大小&#xff1a;1 字节&#xff08;8 位&#xff09;表示方式&#xff1a;char 存储的是一个字符的 A…

汽车资讯新趋势:Spring Boot技术解读

5系统详细实现 5.1 管理员模块的实现 5.1.1 用户信息管理 汽车资讯网站的系统管理员可以管理用户&#xff0c;可以对用户信息修改删除审核以及查询操作。具体界面的展示如图5.1所示。 图5.1 用户信息管理界面 5.1.2 汽车品牌管理 系统管理员可以汽车品牌信息进行添加&#xf…

3D数据格式转换工具HOOPS Exchange如何在读取CAD文件时处理镶嵌数据?

在工程和制造领域中&#xff0c;CAD文件格式众多&#xff0c;而这些文件中包含的镶嵌数据则是构建精确三维模型的关键部分。镶嵌数据通常用于定义模型的表面形状&#xff0c;能够支持图形渲染、碰撞检测以及仿真等应用。HOOPS Exchange作为强大的3D数据交换工具&#xff0c;在读…