Describe the bug
微服务应用发版至K8S集群后,服务发现/注册和配置中心功能均报网络连接错误,无法正常注册服务和拉取配置参数。本地启动后,可以正常注册服务和拉取配置参数。
Environment
Spring Cloud:2022.0.4
Spring Boot:3.1.2
Spring Cloud Tencent:1.12.4-2022.0.4
JDK:21
Additional context
2024-01-19 17:57:54 ERROR [Config] long polling failed. [com.tencent.polaris.configuration.client.internal.ConfigFileLongPullService]
com.tencent.polaris.api.exception.RetriableException: ERR-1007(NETWORK_ERROR): [Config] failed to watch config file, cause: UNAVAILABLE: io exception
at com.tencent.polaris.plugins.configuration.connector.polaris.PolarisConfigFileConnector.watchConfigFiles(PolarisConfigFileConnector.java:124)
at com.tencent.polaris.configuration.client.internal.ConfigFileLongPullService.doLongPolling(ConfigFileLongPullService.java:132)
at com.tencent.polaris.configuration.client.internal.ConfigFileLongPullService.lambda$startLongPollingTask$0(ConfigFileLongPullService.java:116)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
at com.tencent.polaris.specification.api.v1.config.manage.PolarisConfigGRPCGrpc$PolarisConfigGRPCBlockingStub.watchConfigFiles(PolarisConfigGRPCGrpc.java:501)
at com.tencent.polaris.plugins.configuration.connector.polaris.PolarisConfigFileConnector.watchConfigFiles(PolarisConfigFileConnector.java:116)
... 7 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /127.0.0.1:8093
Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused
at io.netty.channel.unix.Errors.newConnectException0(Errors.java:166)
at io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:131)
at io.netty.channel.unix.Socket.finishConnect(Socket.java:359)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:710)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:687)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:567)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
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(Unknown Source)
2024-01-19 17:58:41 ERROR Report client failed. [com.tencent.polaris.client.api.SDKContext]
com.tencent.polaris.api.exception.RetriableException: ERR-1007(NETWORK_ERROR): fail to report client host 127.0.0.1, version 1.14.3 service ServiceKey{namespace='null', service='null'}, cause: UNAVAILABLE: io exception
at com.tencent.polaris.plugins.connector.grpc.GrpcConnector.reportClient(GrpcConnector.java:584)
at com.tencent.polaris.client.api.SDKContext.lambda$reportClient$0(SDKContext.java:358)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165)
at com.tencent.polaris.specification.api.v1.service.manage.PolarisGRPCGrpc$PolarisGRPCBlockingStub.reportClient(PolarisGRPCGrpc.java:402)
at com.tencent.polaris.plugins.connector.grpc.GrpcConnector.reportClient(GrpcConnector.java:562)
... 7 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /127.0.0.1:8091
Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused
at io.netty.channel.unix.Errors.newConnectException0(Errors.java:166)
at io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:131)
at io.netty.channel.unix.Socket.finishConnect(Socket.java:359)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:710)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:687)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:567)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
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(Unknown Source)`
Describe the bug 微服务应用发版至K8S集群后,服务发现/注册和配置中心功能均报网络连接错误,无法正常注册服务和拉取配置参数。本地启动后,可以正常注册服务和拉取配置参数。
Environment
Additional context
错误日志中的IP和端口和bootstrap.yml中配置的不一致,错误日志中IP为127.0.0.1,bootstrap.yml配置参数