-
Notifications
You must be signed in to change notification settings - Fork 155
Intermittent SSL socket connection failure #213
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
Comments
Hi, any update on this?
|
Same here. Fails randomly once in 20-30 queries, stacktrace:
|
Hi sorry for not getting back to you earlier, we are looking into the issue. Regards, |
@pontusmelke , hi, same here, any workaround? |
Hello, We are also hitting this issue and a sleep before we create our session seems to reduce the frequency. Any progress? Thanks! |
I believe this is a bug that is being addressed in the next patch release. Sent from my iPhone
|
Here is some additional information regarding this issue:
`
I hope you find this information is helpful. |
This fix might be related to figure out the real cause: #249 |
Hi, after investigate on this problem it turns clear that it is the timeout on load balancer that kills the connections between the client and the server that result in this error. As the driver always assume that the connection between the server and the client is persistent and could be re-used, so the driver do not designed to handle such timeout in the network. The problem is caused by the fact that the driver pools the connections and reuse them all the time. So if the connection breaks, then we will see such exception throw. The solution to this problem is probably enlarge/turn off the timeout on load balancer. Or adding retries in your code. Regards, |
Pls update to 1.0.6 and you will get a better error message for this failed to establish ssl connection error. |
We have the same problem. |
can you post your workaround? Where did you insert the retry logic? |
thank you @edstover but we are using spring with neo4j and I'm looking for the best place where we can encapsulate the retry logic. Suggestions? |
Hello, I just want to update this old ticket with references to couple new APIs which might be helpful here:
Hope this helps. |
Neo4j Java driver version: 1.0.4
Neo4j server version: 3.0.3
We are using a 3-node HA cluster setup in AWS with 2 ELBs; one for read operations pointing to the slave nodes, and one for write operations pointing to the master node. The ELBs are configured to use the Neo4j management end-points for health checks and to fail over when one of the nodes goes down and the 'master' moves. The ELBs are also configured to pass SSL traffic to the back-end servers, so SSL termination is done on the Neo4j server instances. Our application code has Neo4j Driver object instances for read and write operations that connect to the corresponding ELB instance using the BOLT protocol and requiring encryption.
The problem we are having is periodic failure by the Neo4j Driver to establish an SSL connection. It seems that after some period of inactivity, a request to read something from the graph results in a failure to establish an SSL connection. Issuing the same request again succeeds.
Here is the relevant stack trace:
org.neo4j.driver.v1.exceptions.ClientException:
Failed to establish SSL socket connection. at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.unwrap(TLSSocketChannel.java:179) at org.neo4j.driver.internal.connector.socket.TLSSocketChannel.read(TLSSocketChannel.java:374) at org.neo4j.driver.internal.connector.socket.BufferingChunkedInput.readNextPacket(BufferingChunkedInput.java:408)
at org.neo4j.driver.internal.connector.socket.BufferingChunkedInput.readChunkSize(BufferingChunkedInput.java:344) at org.neo4j.driver.internal.connector.socket.BufferingChunkedInput.read(BufferingChunkedInput.java:246) at org.neo4j.driver.internal.connector.socket.BufferingChunkedInput.fillScratchBuffer(BufferingChunkedInput.java:215)
at org.neo4j.driver.internal.connector.socket.BufferingChunkedInput.readByte(BufferingChunkedInput.java:109) at org.neo4j.driver.internal.packstream.PackStream$Unpacker.unpackStructHeader(PackStream.java:441) at org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.read(PackStreamMessageFormatV1.java:397)
at org.neo4j.driver.internal.connector.socket.SocketClient.receiveOne(SocketClient.java:130) at org.neo4j.driver.internal.connector.socket.SocketClient.receiveAll(SocketClient.java:124) at org.neo4j.driver.internal.connector.socket.SocketConnection.receiveAll(SocketConnection.java:121)
at org.neo4j.driver.internal.connector.socket.SocketConnection.sync(SocketConnection.java:100) at org.neo4j.driver.internal.connector.ConcurrencyGuardingConnection.sync(ConcurrencyGuardingConnection.java:122) at org.neo4j.driver.internal.pool.PooledConnection.sync(PooledConnection.java:144)
at org.neo4j.driver.internal.InternalSession.close(InternalSession.java:130)
Here are relevant code snippets:
The SSL connection failure happens at the end of the 'try' block when the session is closed. An immediate re-try of the same call succeeds.
Are there any recommended configuration settings for using the Neo4j driver with AWS ELBs?
Have the Neo4j drivers been tested in HA configurations using AWS and ELBs? Are there any recommended configuration settings when deploying into AWS and using ELBs?
The text was updated successfully, but these errors were encountered: