dxlance11 commented on issue #7373: URL: https://github.com/apache/incubator-seata/issues/7373#issuecomment-2915325403
> 1.如何确认你的密码是正确的? 2.使用curl等命令能否验证通过? 3.你登录过控制台吗? 刚又测试了一下,可能是k8s部署时seata会截断客户端配置的server域名: crul命令在容器中测试: ``` / # curl http://seata-server-0.seata-server-cluster.default:7091/api/v1/auth/login \ > -H "Content-Type: application/json" \ > -d '{"username": "seata", "password": "123456"}' {"code":"200","message":"success","data":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzZWF0YSIsImF1dGgiOiIiLCJleHAiOjE3NDg0MTk5ODB9.WaXLWC5yuHG8gyDfl0yZhAsCUnK6ZhbR6Bz9_87CPW0","success":true}/ ``` 客户端的seata配置(完全按照seata-k8s中的示例重新部署到default命名空间了): ``` seata: registry: type: raft raft: server-addr: seata-server-0.seata-server-cluster.default:7091 metadata-max-age-ms: 30000 username: seata password: 123456 tokenValidityInMilliseconds: 1740000 tx-service-group: default_tx_group service: vgroup-mapping: default_tx_group: default ``` 客户端容器报错(seata似乎自动把域名截断了,与客户端配置的域名相比少了.default命名空间): ``` 2025-05-28T15:43:23.683+08:00 ERROR 1 --- [eshMetadata_1_1] o.a.s.d.r.raft.RaftRegistryServiceImpl : watch cluster node: seata-server-0.seata-server-cluster:7091, fail: seata-server-0.seata-server-cluster 2025-05-28T15:43:23.683+08:00 ERROR 1 --- [eshMetadata_1_1] o.a.s.d.r.raft.RaftRegistryServiceImpl : seata-server-0.seata-server-cluster org.apache.seata.common.exception.RetryableException: seata-server-0.seata-server-cluster at org.apache.seata.discovery.registry.raft.RaftRegistryServiceImpl.watch(RaftRegistryServiceImpl.java:331) at org.apache.seata.discovery.registry.raft.RaftRegistryServiceImpl.lambda$startQueryMetadata$0(RaftRegistryServiceImpl.java:177) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.net.UnknownHostException: seata-server-0.seata-server-cluster at java.base/java.net.InetAddress$CachedLookup.get(Unknown Source) at java.base/java.net.InetAddress$NameServiceAddresses.get(Unknown Source) at java.base/java.net.InetAddress.getAllByName0(Unknown Source) at java.base/java.net.InetAddress.getAllByName(Unknown Source) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at org.apache.seata.common.util.HttpClientUtil.doPost(HttpClientUtil.java:105) at org.apache.seata.discovery.registry.raft.RaftRegistryServiceImpl.watch(RaftRegistryServiceImpl.java:317) ... 5 common frames omitted 2025-05-28T15:43:23.684+08:00 ERROR 1 --- [ main] o.a.s.c.r.n.NettyClientChannelManager : Failed to get available servers: Cannot invoke "java.net.InetAddress.getHostAddress()" because the return value of "java.net.InetSocketAddress.getAddress()" is null java.lang.NullPointerException: Cannot invoke "java.net.InetAddress.getHostAddress()" because the return value of "java.net.InetSocketAddress.getAddress()" is null at org.apache.seata.common.util.NetUtil.toStringAddress(NetUtil.java:93) at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source) at org.apache.seata.core.rpc.netty.NettyClientChannelManager.getAvailServerList(NettyClientChannelManager.java:306) at org.apache.seata.core.rpc.netty.NettyClientChannelManager.doReconnect(NettyClientChannelManager.java:187) at org.apache.seata.core.rpc.netty.NettyClientChannelManager.initReconnect(NettyClientChannelManager.java:176) at org.apache.seata.core.rpc.netty.TmNettyRemotingClient.initConnection(TmNettyRemotingClient.java:291) at org.apache.seata.core.rpc.netty.TmNettyRemotingClient.init(TmNettyRemotingClient.java:191) at org.apache.seata.tm.TMClient.init(TMClient.java:47) at org.apache.seata.spring.annotation.GlobalTransactionScanner.initClient(GlobalTransactionScanner.java:247) at org.apache.seata.spring.annotation.GlobalTransactionScanner.afterPropertiesSet(GlobalTransactionScanner.java:495) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1815) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1764) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:596) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:518) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:261) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:796) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:600) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:746) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:448) at org.springframework.boot.SpringApplication.run(SpringApplication.java:324) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1321) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1310) at org.dxstudio.rate.DxStartApplication.main(DxStartApplication.java:13) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org