alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.29k stars 12.84k forks source link

All consumer server will be shutdown automatically when the nacos shutdown ! #1791

Closed itfinally closed 5 years ago

itfinally commented 5 years ago

Issue Description

Type: bug report

Describe what happened (or what feature you want)

All consumer server will be shutdown automatically when the nacos shutdown !

I thing it is an issue.

Describe what you expected to happen

All consumer server ( spring boot server ) will be shutdown automatically when I shutdown the nacos server. ( stand alone mode )

Then all the consumer server ( dubbo ) will be shutdown immediately.

( I don't know is it the nacos sending an signal to all clients ( Haven't seen the source code yet ), but let's imagine, if the nacos server cannot communicate with all consumers for a while ( for unknown reason ), and all consumer believe they lost the connection with nacos, and then they close itself ?????? how horrible if it happen )

How to reproduce it (as minimally and precisely as possible)

  1. sh startup.sh -m standalone ( run nacos server )
  2. run your own dubbo server and register to nacos
  3. sh shutdown.sh ( shutdown your nacos server )

Tell us your environment

java 8

nacos-server v1.1.3

dubbo-registry-nacos 2.6.7 nacos-client 1.1.3 dubbo 2.6.5 spring boot 2.1.1

Anything else we need to know?

Is the spring cloud has the same issue ?

nacos-bot commented 5 years ago

Hi @itfinally, we detect non-English characters in the issue. This comment is an auto translation from @nacos-bot to help other users to understand this issue. We encourage you to describe your issue in English which is more friendly to other users.

All consumer server will be shutdown automatically when the nacos shutdown !

Issue Description

Type: bug report

Describe what happened (or what feature you want)

All consumer server will be shutdown automatically when the nacos shutdown !

I thing it is an issue.

Describe what you expected to happen

All consumer server ( spring boot server ) will be shutdown automatically when I shutdown the nacos server. ( stand alone mode )

Then all the consumer server ( dubbo ) will be shutdown immediately.

( I don't know is it the nacos sending an signal to all client ( Haven't seen the source code yet ), but let's imagine, if the nacos server cannot communicate with all consumers for a while ( for unknown reason ), and all consumer believe they lost the connection with nacos, and then they close itself ?????? how horrible if it happen )

How to reproduce it (as minimally and precisely as possible)

  1. sh startup.sh -m standalone ( run nacos server )
  2. run your own dubbo server and register to nacos
  3. sh shutdown.sh ( shutdown your nacos server )

Tell us your environment

java 8

nacos-server v1.1.3

nacos-discovery-spring-boot-starter 0.2.3 dubbo-registry-nacos 2.6.7 dubbo 2.6.5

Anything else we need to know?

Is the spring cloud has the same issue ?

nkorange commented 5 years ago

It's probably the shutdown.sh which kills your application. Currently this problem is tracked in #1507 .