Problem record: com.alibaba.nacos.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception

Reference: Reference link

Problem Description:

After the nacos server stopped due to an exception, it was restarted, and then the client could not connect. However, after the server restarted, it showed that everything was normal.

Error message

This is the client error: com.alibaba.nacos.shaded.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception

problem causes

The default port of the nacos server is 8848. In addition, two ports are needed. You need to configure the port on this port. One is +1000 and the other is +1001. If the two ports are not exposed, the above problems may occur, and it is not necessary. Now, this is very funny. So if we are using 8848, we need to expose two additional ports 9849 and 9849. I am using Docker, so I need to increase the mapping of these two ports. There was no problem after a few days of testing at the beginning, but suddenly a problem occurred. The problem will be solved after increasing the exposure of these two ports.
The following is the startup script for stand-alone Docker

docker  run \
--name my-nacos -d \
-p 8848:8848 \
-p 9848:9848 \
-p 9849:8849 \
--env PREFER_HOST_MODE=ip --env MODE=standalone \
-v /apps/nacos/logs:/home/nacos/logs \
-v /apps/nacos/conf/application.properties:/home/nacos/conf/application.properties \
nacos/nacos-server:v2.0.4

Guess you like

Origin blog.csdn.net/m0_46897923/article/details/132797991