【Exception】Address already in use: no further information: localhost/127.0.0.1:6379

文章描述了一个开发者在使用SpringBoot和RedisStream进行消息消费时遇到连接失败的问题,主要涉及生产大量消息后内存占用和Redis连接错误。作者通过设置动态端口解决Addressalreadyinuse问题,提供了详细的复现步骤和解决方案。

Talk is cheap, show me the code.

环境 | Environment

kversion
OSwindows 10
jdk1.8
maven3.6.0
spring boot2.3.4.RELEASE
redis5.0.10

背景 | Background

我在测试 redis stream 时,需要对比 消费消息后使用xdel删除消息 和 消费消息后不使用xdel删除消息。

这个对比实验的目的是为了研究,不使用xdel去删除已消费的消息,是否会占用更多的 redis 内存。

实验方案是:向 redis stream 中推送 50000 条消息, 对比消费结束后的内存占用情况。

但是在消费数据过程中,大概消费了44000多条数据时,发生了异常:org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is java.util.concurrent.CompletionException: io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379

复现步骤 | Reproduction steps

先一次性向 Redis stream 中生产了 50000 条数据,在消费数据过程中,大概在消费了44000多条数据时,发生了异常。

生产消息

@RestController
@RequestMapping("/redis/stream")
public class RedisStreamController {

    @Autowired
    private RedisTemplate redisTemplate;

    @GetMapping("/push-data")
    public String pushData() {
        for (int i = 0; i < 5_0000; i++) {
            Map<String, String> map = new HashMap<>();
            map.put("k", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss:SSS").format(LocalDateTime.now()));
            RecordId recordId = redisTemplate.opsForStream().add("stream_test1", map);
        }
        return "Success";
    }

}

消费消息

@Slf4j
@Component
public class Stream1Listener extends AbstractAutoRetryStreamListener<String, MapRecord<String, String, String>> {

    @Override
    public void doOnMessage(MapRecord<String, String, String> message) {
        Map<String, String> msgMap = message.getValue();

        // do something

        double random = Math.random();
        if (random > 0.5) {
            log.warn("consume failure, consumer={} message={} random={}", getFullName(), message.getValue(), random);
            throw new RuntimeException("Message processing failed");
        }
        log.info("consume success, consumer={} message={}", getFullName(), message.getValue());
    }

    @Override
    public String getStream() {
        return "stream_test1";
    }

    @Override
    protected long maxRetries() {
        return 0L;
    }
}

报错日志 | Error log

Caused by: java.util.concurrent.CompletionException: io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:632)
    ... 30 more
Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379
    at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:78)
    at io.lettuce.core.RedisConnectionException.create(RedisConnectionException.java:56)
    at io.lettuce.core.RedisClient.lambda$transformAsyncConnectionException$20(RedisClient.java:767)
    at io.lettuce.core.DefaultConnectionFuture.lambda$thenCompose$1(DefaultConnectionFuture.java:253)
    ... 22 more
Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedSocketException: Address already in use: no further information: localhost/127.0.0.1:6379
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:632)
    ... 20 more
Caused by: io.netty.channel.AbstractChannel$AnnotatedSocketException: Address already in use: no further information: localhost/127.0.0.1:6379
Caused by: java.net.BindException: Address already in use: no further information
    at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)
    at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
    at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:707)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:834)

原因分析 | Analysis

  1. 通过后面的参考文章获得了解决思路。

解决方案 | Solution

打开 Widnows 命令行窗口( Run as administor )执行以下命令:

netsh int ipv4 set dynamicport tcp start=20000 num=90000

这个命令是Windows的Netsh工具命令,用于配置网络接口。具体来说,netsh int ipv4 set dynamicport tcp start=20000 num=90000 这个命令是设置TCP协议的动态端口范围。其中,'start=20000’表示动态端口的起始值,而’num=90000’表示端口范围的大小,即从20000开始,共有90000个连续的端口可供动态分配。

参考 | References

优快云 - 并发测试异常[Address already in use: no futher infomation]

cnpython - java Spring Redis流消费者停止消费消息(地址已在使用中)

知乎 - 【Netty】网络连接数上限造成的问题

[2025-11-26T15:52:40,750][INFO ][o.e.b.Elasticsearch ] [node-1] version[9.2.1], pid[26788], build[zip/4ad0ef0e98a2e72fafbd79a19fa5cae2f026117d/2025-11-06T22:07:39.673130621Z], OS[Windows 11/10.0/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/25.0.1/25.0.1+8-27] [2025-11-26T15:52:40,841][INFO ][o.e.b.Elasticsearch ] [node-1] JVM home [D:\soft\ES\elasticsearch-9.2.1-windows-x86_64\elasticsearch-9.2.1\jdk], using bundled JDK [true] [2025-11-26T15:52:40,846][INFO ][o.e.b.Elasticsearch ] [node-1] 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, --add-opens=org.apache.lucene.core/org.apache.lucene.codecs.lucene99=org.elasticsearch.server, --add-opens=org.apache.lucene.core/org.apache.lucene.internal.vectorization=org.elasticsearch.server, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=CLDR, -Dorg.apache.lucene.vectorization.upperJavaFeatureVersion=25, -Des.path.home=D:\soft\ES\elasticsearch-9.2.1-windows-x86_64\elasticsearch-9.2.1, -Des.distribution.type=zip, -Des.java.type=bundled JDK, --enable-native-access=org.elasticsearch.nativeaccess,org.apache.lucene.core, --enable-native-access=ALL-UNNAMED, --illegal-native-access=deny, -XX:ReplayDataFile=logs/replay_pid%p.log, -XX:+EnableDynamicAgentLoading, -Djdk.attach.allowAttachSelf=true, --patch-module=java.base=D:\soft\ES\elasticsearch-9.2.1-windows-x86_64\elasticsearch-9.2.1\lib\entitlement-bridge\elasticsearch-entitlement-bridge-9.2.1.jar, --add-exports=java.base/org.elasticsearch.entitlement.bridge=org.elasticsearch.entitlement,java.logging,java.net.http,java.naming,jdk.net, -XX:+UseG1GC, -Djava.io.tmpdir=C:\Users\ADMINI~1\AppData\Local\Temp\elasticsearch, --add-modules=jdk.incubator.vector, -Dorg.apache.lucene.store.defaultReadAdvice=normal, -Dorg.apache.lucene.store.MMapDirectory.sharedArenaMaxPermits=1, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:ErrorFile=hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=gc.log:utctime,level,pid,tags:filecount=32,filesize=64m, -Xms8123m, -Xmx8123m, -XX:MaxDirectMemorySize=4259315712, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, --module-path=D:\soft\ES\elasticsearch-9.2.1-windows-x86_64\elasticsearch-9.2.1\lib, --add-modules=jdk.net, --add-modules=jdk.management.agent, --add-modules=ALL-MODULE-PATH, -Djdk.module.main=org.elasticsearch.server] [2025-11-26T15:52:40,854][INFO ][o.e.b.Elasticsearch ] [node-1] Default Locale [zh_CN] [2025-11-26T15:52:42,139][INFO ][o.e.n.NativeAccess ] [node-1] Using [jdk] native provider and native methods for [Windows] [2025-11-26T15:52:43,849][INFO ][o.a.l.i.v.PanamaVectorizationProvider] [node-1] Java vector incubator API enabled; uses preferredBitSize=256; FMA enabled [2025-11-26T15:52:44,054][INFO ][o.e.b.Elasticsearch ] [node-1] Bootstrapping Entitlements [2025-11-26T15:52:57,527][WARN ][o.e.x.g.GPUSupport ] [node-1] GPU based vector indexing is not supported on this platform; cuvs-java supports only Linux [2025-11-26T15:52:58,687][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-url] [2025-11-26T15:52:58,687][INFO ][o.e.p.PluginsService ] [node-1] loaded module [rest-root] [2025-11-26T15:52:58,688][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-core] [2025-11-26T15:52:58,688][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-redact] [2025-11-26T15:52:58,688][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-user-agent] [2025-11-26T15:52:58,689][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-async-search] [2025-11-26T15:52:58,689][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-monitoring] [2025-11-26T15:52:58,689][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-s3] [2025-11-26T15:52:58,690][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-analytics] [2025-11-26T15:52:58,690][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-esql-core] [2025-11-26T15:52:58,690][INFO ][o.e.p.PluginsService ] [node-1] loaded module [search-business-rules] [2025-11-26T15:52:58,691][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-ent-search] [2025-11-26T15:52:58,691][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-autoscaling] [2025-11-26T15:52:58,691][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-painless] [2025-11-26T15:52:58,692][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-ml] [2025-11-26T15:52:58,692][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-mustache] [2025-11-26T15:52:58,692][INFO ][o.e.p.PluginsService ] [node-1] loaded module [legacy-geo] [2025-11-26T15:52:58,693][INFO ][o.e.p.PluginsService ] [node-1] loaded module [logsdb] [2025-11-26T15:52:58,693][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-ql] [2025-11-26T15:52:58,693][INFO ][o.e.p.PluginsService ] [node-1] loaded module [rank-rrf] [2025-11-26T15:52:58,693][INFO ][o.e.p.PluginsService ] [node-1] loaded module [analysis-common] [2025-11-26T15:52:58,694][INFO ][o.e.p.PluginsService ] [node-1] loaded module [health-shards-availability] [2025-11-26T15:52:58,694][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transport-netty4] [2025-11-26T15:52:58,694][INFO ][o.e.p.PluginsService ] [node-1] loaded module [aggregations] [2025-11-26T15:52:58,694][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-common] [2025-11-26T15:52:58,694][INFO ][o.e.p.PluginsService ] [node-1] loaded module [frozen-indices] [2025-11-26T15:52:58,695][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-identity-provider] [2025-11-26T15:52:58,695][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-shutdown] [2025-11-26T15:52:58,695][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-text-structure] [2025-11-26T15:52:58,695][INFO ][o.e.p.PluginsService ] [node-1] loaded module [snapshot-repo-test-kit] [2025-11-26T15:52:58,695][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ml-package-loader] [2025-11-26T15:52:58,695][INFO ][o.e.p.PluginsService ] [node-1] loaded module [kibana] [2025-11-26T15:52:58,696][INFO ][o.e.p.PluginsService ] [node-1] loaded module [constant-keyword] [2025-11-26T15:52:58,696][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-logstash] [2025-11-26T15:52:58,696][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-ccr] [2025-11-26T15:52:58,697][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-graph] [2025-11-26T15:52:58,703][INFO ][o.e.p.PluginsService ] [node-1] loaded module [rank-vectors] [2025-11-26T15:52:58,704][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-esql] [2025-11-26T15:52:58,705][INFO ][o.e.p.PluginsService ] [node-1] loaded module [parent-join] [2025-11-26T15:52:58,707][INFO ][o.e.p.PluginsService ] [node-1] loaded module [counted-keyword] [2025-11-26T15:52:58,708][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-enrich] [2025-11-26T15:52:58,708][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repositories-metering-api] [2025-11-26T15:52:58,709][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transform] [2025-11-26T15:52:58,710][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-azure] [2025-11-26T15:52:58,710][INFO ][o.e.p.PluginsService ] [node-1] loaded module [dot-prefix-validation] [2025-11-26T15:52:58,711][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-gcs] [2025-11-26T15:52:58,711][INFO ][o.e.p.PluginsService ] [node-1] loaded module [spatial] [2025-11-26T15:52:58,712][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-otel-data] [2025-11-26T15:52:58,712][INFO ][o.e.p.PluginsService ] [node-1] loaded module [apm] [2025-11-26T15:52:58,713][INFO ][o.e.p.PluginsService ] [node-1] loaded module [mapper-extras] [2025-11-26T15:52:58,717][INFO ][o.e.p.PluginsService ] [node-1] loaded module [mapper-version] [2025-11-26T15:52:58,717][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-rollup] [2025-11-26T15:52:58,718][INFO ][o.e.p.PluginsService ] [node-1] loaded module [percolator] [2025-11-26T15:52:58,718][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-migrate] [2025-11-26T15:52:58,718][INFO ][o.e.p.PluginsService ] [node-1] loaded module [data-streams] [2025-11-26T15:52:58,718][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-stack] [2025-11-26T15:52:58,719][INFO ][o.e.p.PluginsService ] [node-1] loaded module [rank-eval] [2025-11-26T15:52:58,719][INFO ][o.e.p.PluginsService ] [node-1] loaded module [reindex] [2025-11-26T15:52:58,719][INFO ][o.e.p.PluginsService ] [node-1] loaded module [streams] [2025-11-26T15:52:58,720][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-security] [2025-11-26T15:52:58,720][INFO ][o.e.p.PluginsService ] [node-1] loaded module [blob-cache] [2025-11-26T15:52:58,720][INFO ][o.e.p.PluginsService ] [node-1] loaded module [searchable-snapshots] [2025-11-26T15:52:58,720][INFO ][o.e.p.PluginsService ] [node-1] loaded module [gpu] [2025-11-26T15:52:58,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-slm] [2025-11-26T15:52:58,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-geoip-enterprise-downloader] [2025-11-26T15:52:58,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [snapshot-based-recoveries] [2025-11-26T15:52:58,722][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-watcher] [2025-11-26T15:52:58,722][INFO ][o.e.p.PluginsService ] [node-1] loaded module [old-lucene-versions] [2025-11-26T15:52:58,722][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-ilm] [2025-11-26T15:52:58,722][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-inference] [2025-11-26T15:52:58,722][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-voting-only-node] [2025-11-26T15:52:58,723][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-deprecation] [2025-11-26T15:52:58,723][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-fleet] [2025-11-26T15:52:58,723][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-aggregate-metric] [2025-11-26T15:52:58,723][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-downsample] [2025-11-26T15:52:58,723][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-profiling] [2025-11-26T15:52:58,724][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-geoip] [2025-11-26T15:52:58,724][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-write-load-forecaster] [2025-11-26T15:52:58,724][INFO ][o.e.p.PluginsService ] [node-1] loaded module [exponential-histogram] [2025-11-26T15:52:58,724][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-attachment] [2025-11-26T15:52:58,724][INFO ][o.e.p.PluginsService ] [node-1] loaded module [wildcard] [2025-11-26T15:52:58,725][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-apm-data] [2025-11-26T15:52:58,725][INFO ][o.e.p.PluginsService ] [node-1] loaded module [unsigned-long] [2025-11-26T15:52:58,725][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-sql] [2025-11-26T15:52:58,725][INFO ][o.e.p.PluginsService ] [node-1] loaded module [runtime-fields-common] [2025-11-26T15:52:58,726][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-async] [2025-11-26T15:52:58,726][INFO ][o.e.p.PluginsService ] [node-1] loaded module [vector-tile] [2025-11-26T15:52:58,726][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-kql] [2025-11-26T15:52:58,727][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-expression] [2025-11-26T15:52:58,727][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-otel] [2025-11-26T15:52:58,727][INFO ][o.e.p.PluginsService ] [node-1] loaded module [x-pack-eql] [2025-11-26T15:53:02,856][WARN ][stderr ] [node-1] SLF4J: No SLF4J providers were found. [2025-11-26T15:53:02,857][WARN ][stderr ] [node-1] SLF4J: Defaulting to no-operation (NOP) logger implementation [2025-11-26T15:53:02,858][WARN ][stderr ] [node-1] SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details. [2025-11-26T15:53:05,305][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[(D:)]], net usable_space [246.8gb], net total_space [310gb], types [NTFS] [2025-11-26T15:53:05,306][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [7.9gb], compressed ordinary object pointers [true] [2025-11-26T15:53:05,549][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [dWfo4MO3STGwlTnFuIzuYw], cluster name [my-application], roles [master, remote_cluster_client, data, data_cold, ingest, data_frozen, ml, data_hot, transform, data_content, data_warm] [2025-11-26T15:53:12,703][INFO ][o.e.f.FeatureService ] [node-1] Registered local node features [ES_V_8, ES_V_9, cluster.reroute.ignores_metric_param, cluster.stats.source_modes, data_stream.failure_store, inference.endpoint.cache, ingest.field_access_pattern, linear_retriever_supported, lucene_10_1_upgrade, lucene_10_upgrade, resolve_index_returns_mode, security.queryable_built_in_roles, security_stats_endpoint, simulate.ignored.fields, snapshots.get.state_parameter] [2025-11-26T15:53:13,177][INFO ][o.e.i.r.RecoverySettings ] [node-1] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b] [2025-11-26T15:53:14,062][INFO ][o.e.c.m.DataStreamGlobalRetentionSettings] [node-1] Updated global default retention to [null] [2025-11-26T15:53:14,067][INFO ][o.e.c.m.DataStreamGlobalRetentionSettings] [node-1] Updated global max retention to [null] [2025-11-26T15:53:14,069][INFO ][o.e.c.m.DataStreamGlobalRetentionSettings] [node-1] Updated failures default retention to [30d] [2025-11-26T15:53:14,070][INFO ][o.e.c.m.DataStreamFailureStoreSettings] [node-1] Updated data stream name patterns for enabling failure store to [[]] [2025-11-26T15:53:15,902][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [node-1] [controller/6344] [Main.cc@123] controller (64 bit): Version 9.2.1 (Build 5b1f3417ee0e02) Copyright (c) 2025 Elasticsearch BV [2025-11-26T15:53:16,964][INFO ][o.e.x.o.OTelPlugin ] [node-1] OTel ingest plugin is enabled [2025-11-26T15:53:17,011][INFO ][o.e.x.c.t.YamlTemplateRegistry] [node-1] OpenTelemetry index template registry is enabled [2025-11-26T15:53:17,015][INFO ][o.e.t.a.APM ] [node-1] Sending apm metrics is disabled [2025-11-26T15:53:17,020][INFO ][o.e.t.a.APM ] [node-1] Sending apm tracing is disabled [2025-11-26T15:53:17,074][INFO ][o.e.x.s.Security ] [node-1] Security is enabled [2025-11-26T15:53:17,569][INFO ][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [D:\soft\ES\elasticsearch-9.2.1-windows-x86_64\elasticsearch-9.2.1\config\roles.yml] [2025-11-26T15:53:18,378][INFO ][o.e.x.w.Watcher ] [node-1] Watcher initialized components at 2025-11-26T07:53:18.378Z [2025-11-26T15:53:18,579][INFO ][o.e.x.p.ProfilingPlugin ] [node-1] Profiling is enabled [2025-11-26T15:53:18,618][INFO ][o.e.x.p.ProfilingPlugin ] [node-1] profiling index templates will not be installed or reinstalled [2025-11-26T15:53:18,628][INFO ][o.e.x.a.APMPlugin ] [node-1] APM ingest plugin is enabled [2025-11-26T15:53:18,674][INFO ][o.e.x.c.t.YamlTemplateRegistry] [node-1] apm index template registry is enabled [2025-11-26T15:53:19,598][WARN ][stderr ] [node-1] SLF4J: No SLF4J providers were found. [2025-11-26T15:53:19,598][WARN ][stderr ] [node-1] SLF4J: Defaulting to no-operation (NOP) logger implementation [2025-11-26T15:53:19,599][WARN ][stderr ] [node-1] SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details. [2025-11-26T15:53:19,600][WARN ][stderr ] [node-1] SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier. [2025-11-26T15:53:19,600][WARN ][stderr ] [node-1] SLF4J: Ignoring binding found at [jar:file:///D:/soft/ES/elasticsearch-9.2.1-windows-x86_64/elasticsearch-9.2.1/modules/x-pack-core/log4j-slf4j-impl-2.19.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] [2025-11-26T15:53:19,600][WARN ][stderr ] [node-1] SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation. [2025-11-26T15:53:19,727][INFO ][o.e.t.n.NettyAllocator ] [node-1] creating NettyAllocator with the following configs: [name=elasticsearch_configured, chunk_size=1mb, suggested_max_allocation_size=1mb, factors={es.unsafe.use_netty_default_chunk_and_page_size=false, g1gc_enabled=true, g1gc_region_size=4mb}] [2025-11-26T15:53:19,904][INFO ][o.e.d.DiscoveryModule ] [node-1] using discovery type [multi-node] and seed hosts providers [settings] [2025-11-26T15:53:22,000][INFO ][o.e.n.Node ] [node-1] initialized [2025-11-26T15:53:22,001][INFO ][o.e.n.Node ] [node-1] starting ... [2025-11-26T15:53:28,976][INFO ][o.e.x.s.c.f.PersistentCache] [node-1] persistent cache index loaded [2025-11-26T15:53:28,977][INFO ][o.e.x.d.l.DeprecationIndexingComponent] [node-1] deprecation component started [2025-11-26T15:53:29,180][INFO ][o.e.t.TransportService ] [node-1] publish_address {192.168.192.141:9300}, bound_addresses {[::]:9300} [2025-11-26T15:53:29,770][INFO ][o.e.b.BootstrapChecks ] [node-1] bound or publishing to a non-loopback address, enforcing bootstrap checks [2025-11-26T15:53:29,774][WARN ][o.e.c.c.ClusterBootstrapService] [node-1] this node is locked into cluster UUID [R0iGpbgjTlqpz5TLri_5jw] but [cluster.initial_master_nodes] is set to [node-1]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; for further information see https://www.elastic.co/docs/deploy-manage/deploy/self-managed/important-settings-configuration?version=9.2#initial_master_nodes [2025-11-26T15:53:30,045][INFO ][o.e.c.s.MasterService ] [node-1] elected-as-master ([1] nodes joined in term 2)[_FINISH_ELECTION_, {node-1}{dWfo4MO3STGwlTnFuIzuYw}{5dxl-uQnS1Kkrcq0gRMQ_w}{node-1}{192.168.192.141}{192.168.192.141:9300}{cdfhilmrstw}{9.2.1}{8000099-9039001} completing election], term: 2, version: 35, delta: master node changed {previous [], current [{node-1}{dWfo4MO3STGwlTnFuIzuYw}{5dxl-uQnS1Kkrcq0gRMQ_w}{node-1}{192.168.192.141}{192.168.192.141:9300}{cdfhilmrstw}{9.2.1}{8000099-9039001}]} [2025-11-26T15:53:30,375][INFO ][o.e.c.s.ClusterApplierService] [node-1] master node changed {previous [], current [{node-1}{dWfo4MO3STGwlTnFuIzuYw}{5dxl-uQnS1Kkrcq0gRMQ_w}{node-1}{192.168.192.141}{192.168.192.141:9300}{cdfhilmrstw}{9.2.1}{8000099-9039001}]}, term: 2, version: 35, reason: Publication{term=2, version=35} [2025-11-26T15:53:30,429][INFO ][o.e.c.c.NodeJoinExecutor ] [node-1] node-join: [{node-1}{dWfo4MO3STGwlTnFuIzuYw}{5dxl-uQnS1Kkrcq0gRMQ_w}{node-1}{192.168.192.141}{192.168.192.141:9300}{cdfhilmrstw}{9.2.1}{8000099-9039001}] with reason [completing election] [2025-11-26T15:53:30,465][INFO ][o.e.h.AbstractHttpServerTransport] [node-1] publish_address {192.168.192.141:9200}, bound_addresses {[::]:9200} [2025-11-26T15:53:30,474][INFO ][o.e.n.Node ] [node-1] started {node-1}{dWfo4MO3STGwlTnFuIzuYw}{5dxl-uQnS1Kkrcq0gRMQ_w}{node-1}{192.168.192.141}{192.168.192.141:9300}{cdfhilmrstw}{9.2.1}{8000099-9039001}{transform.config_version=10.0.0, ml.machine_memory=17036365824, ml.allocated_processors=6, ml.allocated_processors_double=6.0, ml.max_jvm_size=8518631424, ml.config_version=12.0.0, xpack.installed=true} [2025-11-26T15:53:30,520][INFO ][o.e.x.w.LicensedWriteLoadForecaster] [node-1] license state changed, now [valid] [2025-11-26T15:53:30,535][WARN ][o.e.x.i.s.e.a.ElasticInferenceServiceAuthorizationHandler] [node-1] Failed to revoke access to default inference endpoint IDs: [elser_model_2, rainbow-sprinkles, jina-embeddings-v3, elastic-rerank-v1], error: org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized]; [2025-11-26T15:53:31,043][INFO ][o.e.x.m.MlIndexRollover ] [node-1] ML legacy indices rolled over [2025-11-26T15:53:31,044][INFO ][o.e.x.m.MlAnomaliesIndexUpdate] [node-1] legacy ml anomalies indices rolled over and aliases updated [2025-11-26T15:53:31,095][INFO ][o.e.x.s.a.Realms ] [node-1] license mode is [basic], currently licensed security realms are [reserved/reserved,file/default_file,native/default_native] [2025-11-26T15:53:31,104][INFO ][o.e.l.ClusterStateLicenseService] [node-1] license [f5f77e2b-c130-4e78-b10a-474f4684da84] mode [basic] - valid [2025-11-26T15:53:31,108][INFO ][o.e.c.f.AbstractFileWatchingService] [node-1] starting file watcher ... [2025-11-26T15:53:31,124][INFO ][o.e.c.f.AbstractFileWatchingService] [node-1] file settings service up and running [tid=75] [2025-11-26T15:53:31,125][INFO ][o.e.r.s.FileSettingsService] [node-1] setting file [D:\soft\ES\elasticsearch-9.2.1-windows-x86_64\elasticsearch-9.2.1\config\operator\settings.json] not found, initializing [file_settings] as empty [2025-11-26T15:53:31,154][INFO ][o.e.g.GatewayService ] [node-1] recovered [3] indices into cluster_state [2025-11-26T15:53:31,173][INFO ][o.e.x.w.LicensedWriteLoadForecaster] [node-1] license state changed, now [not valid] [2025-11-26T15:53:32,507][INFO ][o.e.h.n.s.HealthNodeTaskExecutor] [node-1] Node [{node-1}{dWfo4MO3STGwlTnFuIzuYw}] is selected as the current health node. 这是否表明es启动成功了
最新发布
11-27
回答: 这个错误通常是由于连接被拒绝引起的。根据提供的引用内容,可以看出这个错误是在尝试连接到本地主机的Redis服务器时发生的。根据\[2\]的引用,可以看到Redis服务器已经成功安装为一个服务。因此,可能的原因是Redis服务器没有正确地启动或配置。你可以检查Redis服务器的配置文件,确保它正确地指向了正确的IP地址和端口。此外,你还可以尝试使用命令行工具连接到Redis服务器,以确认它是否正常工作。如果问题仍然存在,你可能需要检查防火墙设置,确保允许与Redis服务器的通信。 #### 引用[.reference_title] - *1* *3* [[小记】Hbase报错:Connection refused: no further information: localhost/127.0.0.1:16000](https://blog.csdn.net/m0_47798608/article/details/125381142)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [遇到Connection refused: no further information: localhost/127.0.0.1:6379解决办法](https://blog.csdn.net/weixin_62831598/article/details/127425991)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值