-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timeout or no response waiting for nats jetstream server #1058
Comments
What version of the client? |
The client version is 2.15.3. connection timeout is 2s cli commands is 'nats str info'、'nats con info'
|
Can you move to the latest client. 2.15 is pretty old. There could be an issue in there, but I can't remember. Also which line of code is giving a timeout? The |
@liyancoding Are you still able to reproduce this? Is there a main or something that uses the code you provided, I'm trying to reproduce this. |
@liyancoding I have an update on this based on another user report. The other user's code was doing a async publish, and in their error handler that they attached to the future, they tried to do a getConsumerInfo and it timed out. (For later, getConsumerInfo is just a core request reply with an api subject and known json response data) What I discovered is that the problem with their code was that since they were still inside the future, they could not make core api calls because they were blocking the read-loop of the reader thread, because they were already inside of the read-loop. I am able to repeat this at will now. There are 2 workarounds currently. 1) use a different connection since a different connection will have a completely different read-loop. 2) make sure you are outside of the future Please let me know if this helps. We are in the process of determining if this is possible to address, but I don't want to add yet another thread. It may be a matter of documentation, at least I understand why it's happening. |
i has same trouble when i make send:
can i make |
jetstream is really just a functional wrapper around the connection and there is no cost except instantiation and initialization |
As far as the issues you have with a timeout there are at least 2 possible causes.
|
I'm facing the same problem, still looking for solution. |
Can you give some more details or explanation about your specific problem, you environment, your threading? Code examples that reproduce the issue are always helpful. There have been some changes and some options added in the last couple of releases, so they might help your situation. |
This example works running a cluster directly on my machine. |
Those using Docker and having a JetStream timeout error must start the container with the |
@z0mb1ek @majdiAlKotamy I was able to recreate the problem against docker as noted by @johbar When I start the container without
When I start the container with -js, it works fine:
|
@liyancoding Is your issue related to docker or what is your status on this? Please let me know so I could either close the issue in that case or I need to still look into this. |
Hi! I've encountered a weird behaviour. Kind regards |
@imanolie can you start a new issue or even a discussion. Also could you please note your server and client versions, an overview of your server setup (clustered or dev), provide some snippets of code, and show your stream configuration. There is no software limit |
This problem happens to me when I run NATS in Docker with I'm using natscli 0.1.5 and nats.go v1.36.0, but I think that's unrelated. |
Observed behavior
The NATS cluster is normal. When the NATS CLI tool is used to test the stream status of each node in the cluster, the Java connection reports the error "timeout or no response waiting for NATS jetstream server", which is sometimes recovered but sometimes the fault persists
Expected behavior
NATS is expected to work properly
Server and client version
v2.9.23
Host environment
No response
Steps to reproduce
Streams, themes, and configurations are created or updated when the program is started
The text was updated successfully, but these errors were encountered: