-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
context canceled Error when using cassandra database plugin #20169
Comments
Welcome to HashiCorp Vault, and thanks for filing this issue. Would you please provide us with the Vault configuration and and steps to reproduce the issue. Also, I am wondering if you could verify that Cassandra was reachable at the time of the issue? |
Hi @hghaf099, Here is my user case.
It works well with vault 1.6.0, but failed with vault 1.12.2 and 1.13.0 |
Can you change the connect timeout to 60 or 90s to see if that helps at all? |
Sure, I update it into 3000s, but still failed. using vault monitor -log-level=debug, get the following message only one line related. |
Try adding
If that makes it "work", you will have proved that the problem is that Vault is unable to successfully connect to your Cassandra database, and you will have to debug your network setup and Cassandra to determine why that is the case. |
the connection is definitely working, because I can read the creds.
but the error persists when I update the configuration. Add "verify_connection=false" will improve the configuration, but I will get an error when read roles.
|
OK, so, the connection was working using the configuration that had previously been set in Vault:
But the new configuration you were trying to apply is in some way broken, such that Vault times out connecting to Cassandra when using it.
By adding
... and so now, generating new credentials no longer works, because Vault times out connecting to Cassandra. Everything you've shared is pointing at the configuration you're trying to set in Vault being incorrect. You need to investigate that. It doesn't look like an issue with Vault itself. |
Thank you, @maxb - I agree completely. This may be a question better suited to our Discuss forum. @Albert-W, please consider closing this issue and posting it there. Thanks! :) |
Let me put it in a sequence, so that it's easy to understand.
same thing happens. The point is that the configuration is working, but the command returns an error. |
The best guess I can make with this information is that the connection to cassandra is working, but the return trip to report that to Vault is not. I would start by doing some packet tracing and other network troubleshooting for connections to and from your Vault to your cassandra instance. |
The same code has being running for a while (more than a year). |
Okay, thanks for that info. I'll check with some folks who are more experienced with cassandra. :) |
There's something really odd going on here... If you're still seeing the error when writing the config with verify_connection=false, then that operation isn't connecting to Cassandra at all. It should be just a simple write to Vault storage. With that extra information, my understanding of the problem completely changes... The problem is, it's now firmly into "this shouldn't be possible" territory. The only things I can think of to suggest are general "something weird is happening" debugging options:
|
Hi @maxb , thanks, set
the creds generated by it is working. |
When reading the creds, it will first fail with "context deadline exceeded", but it can by fixed by
|
This seems to contradict what you said earlier. I am sorry, but due to too much conflicting information given, I no longer have any idea what the actual problem is, and don't expect to be able to help further. |
sorry for the confusion. |
Describe the bug
A clear and concise description of what the bug is.
Vault is logging the below error:
Vault configuration
Expected behavior
Expected the action to be success.
Environment:
vault 1.13.0 Failed.
vault 1.12.2 Failed.
vault 1.6.0 Succeed.
The text was updated successfully, but these errors were encountered: