stan.java icon indicating copy to clipboard operation
stan.java copied to clipboard

restarting nats streaming server client connections dont recover

Open tanzeelrana opened this issue 3 years ago • 1 comments

On a fresh install when things are working fine we can see 7 clients and 12 channels(subscriptions)

Screen Shot 2020-10-29 at 4 49 27 PM

Screen Shot 2020-10-29 at 4 49 34 PM

After we restart the nats-streaming-server service these counts drop and some channels and client connections are unable to recover.

Screen Shot 2020-10-29 at 4 50 55 PM Screen Shot 2020-10-29 at 4 51 26 PM

I added a connectionListener on all streaming connections to debug further, looking at the debug logs it looks like we get a disconnect -> connect -> resubscribed events in order when i restart the nats streaming server.

Screen Shot 2020-10-27 at 9 35 22 PM

Observing the connection events being fired on a nats streaming server restart it looks like all client connections and subscriptions have recovered successfully but that is not the case as we have seen from the nats streaming server metrics and also grafana metrics.

I am using nats java stan library https://github.com/nats-io/stan.java

Does anyone know why my clients and subscriptions never come back even though the connection events say that everything is connected and resubscribed ?

tanzeelrana avatar Oct 29 '20 20:10 tanzeelrana