-
Notifications
You must be signed in to change notification settings - Fork 110
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
Excess shard-aware port connection for shard #334
Comments
@Jasperav could you try re-running your test with logging level set to trace for the scylla crate and paste the results? In the meantime, my wild guess would be that you are using the 19042 port (the shard-aware port) to connect and switching to 9042 (non-shard-aware port) will help. Could you try that? Generally, with the new connection pool implementation, you should use the non-shard-aware port when connecting to the cluster. The driver detects the shard-aware port automatically and tries to use it if possible. However, if you are using Docker either on Windows or MacOS, then the driver might not be able to connect to some shards using the shard-aware port because of the specifics of Docker's networking implementation (see my comment here). Normally, in this situation the driver will fall back to the non-shard-aware port which doesn't suffer from this issue, however it's not able to detect that port automatically and assumes that the port you used to connect is the non-shard-aware port. If you pass the shard-aware port when connecting, the connection pool will always use the shard-aware port for connections and will get stuck in a retry loop because it will never manage to reach some of the shards. |
@piodul Alright that is too bad of Docker. Are there reasons to explicitly give the shard port to the driver? Because the driver automatically checks if the shard port is available. This is the trace logging. Switching to the non-shard port works.
|
@Jasperav At the moment, it's better to give the non-shard-aware port to the driver, let it detect the shard-aware port and let it choose which port to use. In older versions the driver behaved better if you passed the shard-aware port, but that's no longer the case. |
When running this code inside caching_session somewhere (and enable debug logging) this code:
produces endlessly the following logging:
I am running a single node Scylla in Docker, nothing fancy.
The text was updated successfully, but these errors were encountered: