nacos icon indicating copy to clipboard operation
nacos copied to clipboard

service instance disconnected

Open yangwei980131 opened this issue 1 year ago • 5 comments

Uploading 1f4cccf1d343aae9f1cab6fb34f11bc.png… Describe the bug

The springcloudalibaba service disconnected after successful registration, but the service instance status is normal. And there is no relevant information in the Nacos log

Expected behavior The service instance is started and successfully registered with Nacos, and the health status is always normal

Actually behavior The service instance was started and successfully registered with Nacos. After about 10 seconds, the health status of the service was displayed as an issue on the Nacos client, but there were no abnormalities in the actual service. Additionally, there were services on the same server with normal health status and no disconnected services

yangwei980131 avatar Apr 28 '24 03:04 yangwei980131

1f4cccf1d343aae9f1cab6fb34f11bc 196ea555d1200a79ea89f022e8deb66 abebf5110561df5c4b4ea80c007bdbd f6aa5af3fdac37aeabb055e306aab93 fae85e9e4678b019bd04462a2f7355f

yangwei980131 avatar Apr 28 '24 03:04 yangwei980131

  1. If you register ephemeral instance, you should check your app is running well and no resource problem(such as CPU, FullGC, network problem) so that the heart beat can send to nacos server to keepalive.
  2. if you register persistent instance, you should check your configured health check policy is right, such as the port, the protocol. What's more, you should make sure your network is well which from nacos server to your app, you can run telnet ${your_app_ip} ${your_app_health_check_port} command to check the network whether well.

KomachiSion avatar Apr 29 '24 02:04 KomachiSion

1.The second image is an image using the telnet command 2.In the third image, it can be seen that an instance is always in a normal state, and the excluded instances are all removed at a fixed time after being connected. Is there a version conflict that could cause this phenomenon

yangwei980131 avatar Apr 29 '24 02:04 yangwei980131

I see, It should be your app only register instance, but not send heartbeat to keepalive, so nacos server think your instance has exception and need removed.

KomachiSion avatar May 06 '24 03:05 KomachiSion

You should check your app and find out why your app don't send heartbeat to server.

KomachiSion avatar May 06 '24 03:05 KomachiSion