-
Notifications
You must be signed in to change notification settings - Fork 585
-
- RabbitMQ version:3.6.5
- Erlang version:19.2
- Option:
When i start java client ,there's no exception ,but when send message trow a exception:
com.rabbitmq.client.AlreadyClosedException:connection is already closed due to connection error;cause:java.io.EOFException.
So,I restart my java client,it's ok.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
Client libraries cannot avoid I/O exceptions, it's a natural part of distributed system operations.
Java client has an automatic recovery feature that helps in most cases.
See server logs to learn more about what may be going on (or at least what the server observes),
e.g. connection failures or missed heartbeats or proxy side-effects (if applicable).
FYI, RabbitMQ 3.6 has reached end of life in May 2018, so over four years ago. Time to move on beyond the One True RabbitMQ Version.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank for you replaying.I have saw the server's log:
client unexpectedly closed TCP connection.
is reason cause the client closed TCP connection.
Beta Was this translation helpful? Give feedback.
All reactions
-
This is covered in the connection lifecycle events. RabbitMQ observers that the client abruptly closes TCP connection, while the client observes an EOF (and I/O exception). My guess is that you have a proxy with lower inactivity timeouts than the heartbeat interval and a lower (but not too low, see the guide) heartbeat timeout might help.
Beta Was this translation helpful? Give feedback.