Skip to content
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

ConnectivityError: Unable to retrieve routing table from <neo4j_host>:7688: EOF with neo4j-go-driver 4.4.x & 5.x.x #583

Open
phulecse2420 opened this issue May 28, 2024 · 8 comments

Comments

@phulecse2420
Copy link

We met this issue when upgrading neo4j from 4.3 to 4.4 and using driver 4.4.7 with neo4j protocol. We tried to update the driver to version 5.20.0 but the issue doesn't be fixed.
This issue makes system run unstable, it works but sometimes it returns the error Unable to retrieve routing table...
However, the old driver version 4.3.3 works fine (also for 4.3.8).

I assume there is a mistake configurable but I'm not sure. Please give me an idea.

System information:

  • Neo4j version: Enterprise 4.4.31
  • Neo4j Mode: HA cluster with 3 members
  • Operating system: Amazon Linux 2
@fbiville
Copy link
Contributor

Hello, can you please share some Bolt traces in order for us to understand what's going on before and during that error?

@phulecse2420
Copy link
Author

Hello @fbiville ,

Sorry for my lateness. I sent you the bolt traces log. This log from the server received the request to respond to the result. The log has the prefix bolt_logger, which is log by bolt logger.
bolt_logger.log

While the client gets the routing table, our code returns the error Unable to retrieve the routing table. Then the handshake happens after that. That is a racing condition so that happens with random frequency.

This is the sample code our code is using query cypher.

session := driver.NewSession(neo4j.SessionConfig{AccessMode: neo4j.AccessModeWrite, BoltLogger: boltLogger})
defer session.Close()
result, err := session.Run(query, params)

if err != nil {
	return nil, err
}

I appreciate your support. I'm waiting for your response.

@phulecse2420
Copy link
Author

I have applied retry when met this issue around result, err := session.Run(query, params). I think it can work now. However, I feel confused about driver version 4.3.8, which works perfectly for me, with driver version 4.4.0 or above the issue happens. I read the change log of version 4.4.0 but didn't find any point to consider.

@fbiville
Copy link
Contributor

fbiville commented May 31, 2024

You can also run session.ExecuteRead or session.ExecuteWrite to leverage the built-in retries (in 4.x, they're called session.ReadTransaction and session.WriteTransaction).
The only case when you cannot use these APIs is when you use CALL {} IN TRANSACTIONS or (in Neo4j 4.x only) LOAD CSV [...] USING PERIODIC COMMIT.

@rullyalves
Copy link

I have the same error, subsequent calls to the driver after this error no longer work, I am forced to restart the driver

@tkandal
Copy link

tkandal commented Jun 27, 2024

I am getting the same error with Go v.1.22.4, driver v.5.20.0 and database v.5.20.0 enterprise

"TransactionExecutionLimit: timeout (exceeded max retry time: 30s) after 6 attempts, last error: ConnectivityError: Unable to retrieve routing table from :7687: context deadline exceeded"

After the driver returns an error the code closes the connection and opens a new connection for further use. The code kind of recovers, but the loading of data get delayed, which is very annoying.

@Tin-Nguyen
Copy link

@tkandal did you figure out a solution for fixing the issue yet?

@tkandal
Copy link

tkandal commented Oct 10, 2024

Kind of found a solution.
The config.MaxTransactionRetryTime is default 30 seconds, increased it to 60 seconds and then it seems to work much better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants