-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
MongoDB not able to connect in rocket.rs #1617
Comments
I am confused by the log output because it's for the The log does not include any reason for the failure, but in my experience the reason is usually printed somewhere. Does this same connection string work fine with other mongodb drivers? The next step here is to try using the same versions of |
I tried working without Rocket with mongodb rust driver and it worked. I thought they might be using older version that's why I tried the connection string which was for older version and started with "mongodb://" as the error first told me when I tried using the newer connection string "mongodb+srv://". So basically I am pretty sure it's rocket but don't know how to fix it. I am new to rust too 😄 (I am not using local mongodb thing btw) |
I found documentation on this newer syntax at https://docs.mongodb.com/manual/reference/connection-string/#std-label-connections-dns-seedlist. The meaning of the names in the connection string are completely different, so simply removing Rocket 0.4's database support is hardcoded around the use of This whole situation will be fixed, in a more future-compatible way, by #1117, by directly supporting the latest |
Okay I guess I'll proceed with that thank you so much :D |
Closing as an upstream issue no longer applicable to |
So I am trying to establish mongodb connection through the rocket_contrib/rocket. I looked into the docs https://rocket.rs/v0.4/guide/state/#databases did what was necessary
this is my Rocket.toml configuration as you can see I am using old connection version cause it complained for url to start with "mongodb://" and it's normally "mongodb+srv://" but this throws this error
When trying the latest version whose URL starts with mongodb+srv:// and removing the +srv in it I get the same error so I don't really know what's this about but any help would be helpful.
The text was updated successfully, but these errors were encountered: