nats-io / nats.go

Golang client for NATS, the cloud native messaging system.
https://nats.io
Apache License 2.0
5.54k stars 696 forks source link

When stream is not available the error message is shown as JetStream system temporarily unavailable #839

Open vishaltripathi24 opened 3 years ago

vishaltripathi24 commented 3 years ago

We have a script attempting to update our NATS streams. The script returns the following error indicating that JetStream is unavailable: nats: JetStream system temporarily unavailable but when connecting to the brokers nats server check jetstream returns that JetStream is operational.

Nats go v1.12.0

After discussing with @ripienaar : it could be that the stream/consumer you are trying to access have not yet finished electing a leader or is mid leader change

The error message should be changed to <stream_name> temporarily unavailable instead of JetStream system temporarily unavailable which is misleading.

derekcollison commented 3 years ago

What server version are you running against?

derekcollison commented 3 years ago

That log does mean the metaleader has not been elected, so I believe its correct.

vishaltripathi24 commented 3 years ago

NATS server 2.6.1

The log is when the stream is we're trying to access have not yet finished electing a leader or is mid leader change which is misleading. Opened this bug after confirming with @ripienaar