-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
help me fix this program : ReqlDriverError: Response pump closed #53
Comments
What is the RethinkDB version you have? I guess it is 2.4.0, right? @adriantodt |
i use rethinkdb 2.4.2 |
I need the complete log, to be honest. I have my thoughts on how this happened, but just a stacktrace isn't enough. Post the log into a service such as Pastebin or GitHub's Gist. Additionally, I'm doing a hotfix branch that should add the shutdown reason. I can give you a bit of code review, though. This code is not "good" and I'm not expecting it to have any sort of consistent behaviour. You're creating a new connection every time an exception occurs, |
@adriantodt , i send my code and the error, pls help me. my code : https://gist.github.com/doantrungvn/10d813628a0a8490a6318e7197a8ec64 |
@adriantodt i waiting for u |
Also had this issue. I think I "fixed" this by replacing a thread-local connection with a getConnection() method that checks if connection isOpen() and does a connect() if not. This far has not happened again. |
Must take back my previous comment.
And the getConnection is in essence:
isOpen is false, close fails because pump is closed (whatever that means in laymans terms) and connecting again is not possible. This is pretty grave bug which renders the DB almost unusable from Java (or lacks guidance on how usage should be orchestrated under normal circumstances). I could provide a docker setup but this seems easily repeatable, given just the undefined wait time of 15 or so minutes. |
Version 2.4.4 will be released soon. It may not contain a fix (yet), but it should add a better shutdown reason. Which should allow me to get a better understanding of what's going on. |
In answer to @martinpaljak: The response pump is what basically links a I don't know why, but you're the only two people that ever reported this. I know other users with no problems at all regarding this. I hope that v2.4.4 will expose what's happening. |
@adriantodt Thanks! I'll try this PR ASAP to see what it throws. |
With what is on maven central as 2.4.4 |
That's a server issue, not a client issue. |
Why so? Shouldn’t the client recover or provide a way to reconnect at least? |
FYI: this is a standard dockerized deployment with both rethink and the client application on the same physical host connecting via overlay network. Before this exception it used to be the "pump closed" one. Sorry for a repeated stacktrace. |
There's no code related to connection recovering, and I think what was closer to it was the ConnectionPool, which someone else removed way before I got on the project. As far as I know there's no "connection resuming" on RethinkDB (citation needed), I wouldn't mind making "connection recovering" a thing, but that would be a LOT of effort, but doable. |
Check your language is UTF-8 (on linux, check if localectl says LANG=en_US.UTF-8 or any variation ending with .UTF-8). There has been issues with this before. (This on where the java client is running, not where rtdb is) |
Apparently Docker have issues with TCP KeepAlive connections (see moby/moby#31208). You all mention "15/20 minutes", which is how long this bug also reports. |
@adriantodt thanks for the pointer! I would not be surprised if docker brings out the best of weirdnesses (just had a 6 hour headbang/wtf debugging side effects of a meaningless configuration line). But I would also expect a robust client for any kind of networked thing to recover from various types of bad network cases, reliably. For example, providing some kind of application level keepalive? What made me scratch my head was trying to do a "if error, close and open again" and that is not working, just re-opening a fresh connection seems to do the trick. |
@Kodehawa Ko |
@adriantodt @martinpaljak |
@adriantodt Reducing keepalive time in the client container seems to help. But it would be nice and reassuring if the client could elegantly recover from network element issues between itself and a server. Either using application-level keepalives or providing a sane "connection reset, reconnecting" kind of flow automatically or manually via API. Or document that a connection is single-use and can't be re-used once closed (the isOpen() method did detect it properly earlier) |
I am learning rethinkdb and I get the following error. After I started my application, I could add the record to table success, but after 15/20 minutes later, if I add the record, the error :
c.r.g.e.ReqlDriverError: Response pump closed. at c.r.n.DefaultConnectionFactory$ThreadResponsePump.await(DefaultConnectionFactory.java:214) at c.r.net.Connection.sendQuery(Connection.java:349) at c.r.net.Connection.runQuery(Connection.java:384) at c.r.net.Connection.runAsync(Connection.java:166) at c.r.net.Connection.run(Connection.java:185).
My code here:
Is there any error in my code, pls help me :(
I use Java 8 + RethinkDb 2.4.2.
The text was updated successfully, but these errors were encountered: