sofastack / sofa-registry

SOFARegistry is a production-level, low-latency, high-availability service registry powered by Ant Financial.
https://www.sofastack.tech/sofa-registry/docs/Home
Apache License 2.0
653 stars 247 forks source link

registry-integrationv5.4.2集成部署失败 #129

Open fancyklaus opened 4 years ago

fancyklaus commented 4 years ago

Describe the bug

按照指引https://www.sofastack.tech/projects/sofa-registry/server-quick-start/, 下载最新代码并打包部署后,健康检查报错,发现只有meta的端口正常启动,session和data的端口均未启动。 查看common-error的日志,报错如下

image

Expected behavior

预期三个健康检查都可以过

Actual behavior

session和data的端口均不可达

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

dzdx commented 4 years ago

手动访问一下localhost:9615/health/check 看看返回内容。common-error在这个health check的日志之前还有其他日志吗?

fancyklaus commented 4 years ago

手动访问一下localhost:9615/health/check 看看返回内容。

curl: (7) Failed to connect to localhost port 9615: Connection refused

common-error在这个health check的日志之前还有其他日志吗?

java.lang.IllegalStateException: ERROR: Failed to start the Server! at com.alipay.remoting.AbstractRemotingServer.start(AbstractRemotingServer.java:74) at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:93) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:65) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:36) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:149) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.start(MetaServerBootstrap.java:108) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerInitializerConfiguration.start(MetaServerInitializerConfiguration.java:51) at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:350) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:880) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:70) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558) at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358) at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019) at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254) at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at java.lang.Thread.run(Thread.java:748) [2020-08-12 10:23:32,620][ERROR][main][MetaServerBootstrap] - Open session node register server port 9610 error! java.lang.RuntimeException: Start bolt server error! at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:98) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:65) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:36) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:149) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.start(MetaServerBootstrap.java:108) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerInitializerConfiguration.start(MetaServerInitializerConfiguration.java:51) at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:350) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:880) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:70) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: java.lang.IllegalStateException: ERROR: Failed to start the Server! at com.alipay.remoting.AbstractRemotingServer.start(AbstractRemotingServer.java:74) at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:93) ... 25 common frames omitted Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558) at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358) at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019) at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254) at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at java.lang.Thread.run(Thread.java:748) [2020-08-12 10:23:32,621][ERROR][main][MetaServerBootstrap] - Bootstrap Meta Server got error! java.lang.RuntimeException: Open session node register server error! at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:161) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.start(MetaServerBootstrap.java:108) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerInitializerConfiguration.start(MetaServerInitializerConfiguration.java:51) at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:350) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:880) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:70) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: java.lang.RuntimeException: Start bolt server error! at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:98) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:65) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:36) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:149) ... 22 common frames omitted Caused by: java.lang.IllegalStateException: ERROR: Failed to start the Server! at com.alipay.remoting.AbstractRemotingServer.start(AbstractRemotingServer.java:74) at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:93) ... 25 common frames omitted Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558) at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358) at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) :java.lang.RuntimeException: Open session node register server error! at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:161) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.start(MetaServerBootstrap.java:108) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerInitializerConfiguration.start(MetaServerInitializerConfiguration.java:51) at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:350) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:880) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:70) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: java.lang.RuntimeException: Start bolt server error! at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:98) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:65) at com.alipay.sofa.registry.remoting.bolt.exchange.BoltExchange.open(BoltExchange.java:36) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:149) ... 22 common frames omitted Caused by: java.lang.IllegalStateException: ERROR: Failed to start the Server! at com.alipay.remoting.AbstractRemotingServer.start(AbstractRemotingServer.java:74) at com.alipay.sofa.registry.remoting.bolt.BoltServer.startServer(BoltServer.java:93) ... 25 common frames omitted Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:558) at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1358) at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1019) at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:254) at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) :java.lang.RuntimeException: Open session node register server error! at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.openSessionRegisterServer(MetaServerBootstrap.java:161) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerBootstrap.start(MetaServerBootstrap.java:108) at com.alipay.sofa.registry.server.meta.bootstrap.MetaServerInitializerConfiguration.start(MetaServerInitializerConfiguration.java:51) at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:350) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:880) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:70) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)

nocvalight commented 4 years ago

Open session node register server port 9610 error! java.lang.RuntimeException: Start bolt server error! Caused by: java.net.BindException: Address already in use

看起来是端口被占用了。查看一下本机的9610端口情况。

fancyklaus commented 4 years ago

lsof -i:9610 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 24302 emily 86u IPv6 0xf84edbe3322cd417 0t0 TCP *:9610 (LISTEN)

fancyklaus commented 4 years ago

[2020-08-12 18:15:40,517][ERROR][main][RegistryApplication] - localhost:9615 health check failed. [2020-08-12 18:15:41,524][ERROR][main][RegistryApplication] - localhost:9615 health check failed. javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1098) at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:883) at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767) at org.glassfish.jersey.internal.Errors.process(Errors.java:316) at org.glassfish.jersey.internal.Errors.process(Errors.java:298) at org.glassfish.jersey.internal.Errors.process(Errors.java:229) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414) at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428) at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324) at com.alipay.sofa.registry.server.integration.RegistryApplication.nodeHealthCheck(RegistryApplication.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.waitClusterStart(RegistryApplication.java:119) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:73) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [2020-08-12 18:15:41,524][ERROR][main][RegistryApplication] - localhost:9615 health check failed. [2020-08-12 18:15:41,968][ERROR][metrics-logger-reporter-1-thread-1][BoltRaftClientService] - Fail to connect 192.168.43.254:9614, remoting exception: Create connection failed. The address is 192.168.43.254:9614. [2020-08-12 18:15:41,968][ERROR][metrics-logger-reporter-1-thread-1][RaftClient] - Refresh leader failed java.lang.IllegalStateException: Refresh leader failed,error=Fail to init channel to 192.168.43.254:9614 at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:146) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:137) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.getLeader(RaftClient.java:174) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:191) at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:69) at com.sun.proxy.$Proxy49.getNodeRepositories(Unknown Source) at com.alipay.sofa.registry.server.meta.store.DataStoreService.getNodeChangeResult(DataStoreService.java:238) at com.alipay.sofa.registry.server.meta.registry.MetaServerRegistry.getAllNodes(MetaServerRegistry.java:96) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.getRegisterNodeByType(MetaDigestResource.java:81) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.lambda$init$1(MetaDigestResource.java:70) at com.codahale.metrics.Slf4jReporter.logGauge(Slf4jReporter.java:307) at com.codahale.metrics.Slf4jReporter.report(Slf4jReporter.java:221) at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:237) at com.codahale.metrics.ScheduledReporter.lambda$start$0(ScheduledReporter.java:177) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [2020-08-12 18:15:41,968][ERROR][metrics-logger-reporter-1-thread-1][RaftClient] - Send process request error! java.lang.IllegalStateException: Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:163) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:137) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.getLeader(RaftClient.java:174) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:191) at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:69) at com.sun.proxy.$Proxy49.getNodeRepositories(Unknown Source) at com.alipay.sofa.registry.server.meta.store.DataStoreService.getNodeChangeResult(DataStoreService.java:238) at com.alipay.sofa.registry.server.meta.registry.MetaServerRegistry.getAllNodes(MetaServerRegistry.java:96) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.getRegisterNodeByType(MetaDigestResource.java:81) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.lambda$init$1(MetaDigestResource.java:70) at com.codahale.metrics.Slf4jReporter.logGauge(Slf4jReporter.java:307) at com.codahale.metrics.Slf4jReporter.report(Slf4jReporter.java:221) at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:237) at com.codahale.metrics.ScheduledReporter.lambda$start$0(ScheduledReporter.java:177) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Refresh leader failed,error=Fail to init channel to 192.168.43.254:9614 at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:146) ... 20 common frames omitted [2020-08-12 18:15:41,969][ERROR][metrics-logger-reporter-1-thread-1][ProxyHandler] - Proxy invoke interface com.alipay.sofa.registry.server.meta.repository.RepositoryService method getNodeRepositories got error! java.lang.RuntimeException: Send process request error!Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:213) at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:69) at com.sun.proxy.$Proxy49.getNodeRepositories(Unknown Source) at com.alipay.sofa.registry.server.meta.store.DataStoreService.getNodeChangeResult(DataStoreService.java:238) at com.alipay.sofa.registry.server.meta.registry.MetaServerRegistry.getAllNodes(MetaServerRegistry.java:96) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.getRegisterNodeByType(MetaDigestResource.java:81) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.lambda$init$1(MetaDigestResource.java:70) at com.codahale.metrics.Slf4jReporter.logGauge(Slf4jReporter.java:307) at com.codahale.metrics.Slf4jReporter.report(Slf4jReporter.java:221) at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:237) at com.codahale.metrics.ScheduledReporter.lambda$start$0(ScheduledReporter.java:177) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:163) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:137) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.getLeader(RaftClient.java:174) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:191) ... 17 common frames omitted Caused by: java.lang.IllegalStateException: Refresh leader failed,error=Fail to init channel to 192.168.43.254:9614 at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:146) ... 20 common frames omitted [2020-08-12 18:15:41,969][ERROR][metrics-logger-reporter-1-thread-1][MetaDigestResource] - [Resource] Fail get Register Node By Type data ! java.lang.RuntimeException: Proxy invoke interface com.alipay.sofa.registry.server.meta.repository.RepositoryService method getNodeRepositories got error! at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:73) at com.sun.proxy.$Proxy49.getNodeRepositories(Unknown Source) at com.alipay.sofa.registry.server.meta.store.DataStoreService.getNodeChangeResult(DataStoreService.java:238) at com.alipay.sofa.registry.server.meta.registry.MetaServerRegistry.getAllNodes(MetaServerRegistry.java:96) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.getRegisterNodeByType(MetaDigestResource.java:81) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.lambda$init$1(MetaDigestResource.java:70) at com.codahale.metrics.Slf4jReporter.logGauge(Slf4jReporter.java:307) at com.codahale.metrics.Slf4jReporter.report(Slf4jReporter.java:221) at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:237) at com.codahale.metrics.ScheduledReporter.lambda$start$0(ScheduledReporter.java:177) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: Send process request error!Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:213) at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:69) ... 16 common frames omitted Caused by: java.lang.IllegalStateException: Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:163) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:137) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.getLeader(RaftClient.java:174) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:191) ... 17 common frames omitted Caused by: java.lang.IllegalStateException: Refresh leader failed,error=Fail to init channel to 192.168.43.254:9614 at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:146) ... 20 common frames omitted [2020-08-12 18:15:41,969][ERROR][metrics-logger-reporter-1-thread-1][ScheduledReporter] - Exception thrown from Slf4jReporter#report. Exception was suppressed. java.lang.RuntimeException: Fail get Register Node By Typedata at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.getRegisterNodeByType(MetaDigestResource.java:86) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.lambda$init$1(MetaDigestResource.java:70) at com.codahale.metrics.Slf4jReporter.logGauge(Slf4jReporter.java:307) at com.codahale.metrics.Slf4jReporter.report(Slf4jReporter.java:221) at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:237) at com.codahale.metrics.ScheduledReporter.lambda$start$0(ScheduledReporter.java:177) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: Proxy invoke interface com.alipay.sofa.registry.server.meta.repository.RepositoryService method getNodeRepositories got error! at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:73) at com.sun.proxy.$Proxy49.getNodeRepositories(Unknown Source) at com.alipay.sofa.registry.server.meta.store.DataStoreService.getNodeChangeResult(DataStoreService.java:238) at com.alipay.sofa.registry.server.meta.registry.MetaServerRegistry.getAllNodes(MetaServerRegistry.java:96) at com.alipay.sofa.registry.server.meta.resource.MetaDigestResource.getRegisterNodeByType(MetaDigestResource.java:81) ... 12 common frames omitted Caused by: java.lang.RuntimeException: Send process request error!Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:213) at com.alipay.sofa.registry.jraft.processor.ProxyHandler.invoke(ProxyHandler.java:69) ... 16 common frames omitted Caused by: java.lang.IllegalStateException: Refresh leader failed at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:163) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:137) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.getLeader(RaftClient.java:174) at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.sendRequest(RaftClient.java:191) ... 17 common frames omitted Caused by: java.lang.IllegalStateException: Refresh leader failed,error=Fail to init channel to 192.168.43.254:9614 at com.alipay.sofa.registry.jraft.bootstrap.RaftClient.refreshLeader(RaftClient.java:146) ... 20 common frames omitted [2020-08-12 18:15:42,529][ERROR][main][RegistryApplication] - localhost:9615 health check failed. javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1098) at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:883) at org.glassfish.jersey.client.JerseyInvocation.lambda$invoke$1(JerseyInvocation.java:767) at org.glassfish.jersey.internal.Errors.process(Errors.java:316) at org.glassfish.jersey.internal.Errors.process(Errors.java:298) at org.glassfish.jersey.internal.Errors.process(Errors.java:229) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:414) at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:765) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:428) at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:324) at com.alipay.sofa.registry.server.integration.RegistryApplication.nodeHealthCheck(RegistryApplication.java:134) at com.alipay.sofa.registry.server.integration.RegistryApplication.waitClusterStart(RegistryApplication.java:119) at com.alipay.sofa.registry.server.integration.RegistryApplication.main(RegistryApplication.java:73) 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.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [2020-08-12 18:15:42,529][ERROR][main][RegistryApplication] - localhost:9615 health check failed.

dzdx commented 4 years ago

@fancyklaus Refresh leader failed,error=Fail to init channel to 192.168.43.254:9614 之前是不是在本地启动过,可以尝试把 raftData的目录删除掉, 目录位置可以从启动时候打印的参数 raftDataPath 里看到。 重连wifi,局域网ip变化后,meta的raft节点列表就不一致了,所以连接不上,需要清理一下节点列表