Open dimarixsus opened 1 year ago
@achtan @tothradoslav did you have a chance to look into this?
Thanks
Same problem here :(
I'm testing this on my own atlas serverless connection and it gives me the same error when I add port to my connection uri. It seems like the port number is really not allowed in such cases. Two questions:
I'm testing this on my own atlas serverless connection and it gives me the same error when I add port to my connection uri. It seems like the port number is really not allowed in such cases. Two questions:
- what is the connection you are trying to connect to? I'd like to be able to reproduce this somehow
- have you tried simply removing the port and connecting without it?
Hi @tothradoslav !
I hope this helps, thanks
I'm creating a simple mongodb Atlas URI and it never contains a port, it always ends with ".mongodb.net/". Where could I create such a connection that uses +srv and a port number so I can test it out?
I'm creating a simple mongodb Atlas URI and it never contains a port, it always ends with ".mongodb.net/". Where could I create such a connection that uses +srv and a port number so I can test it out?
I think that the "port" part relates to the SSH connection and not to the database connection :/
shouldn't SSH be a separate config from mongo uri? I'm trying to work my head around this as it doens't make much sense even though it works in compass...
shouldn't SSH be a separate config from mongo uri? I'm trying to work my head around this as it doens't make much sense even though it works in compass...
Oh maybe I'm not understanding completely everything. But I mean, from the screenshot I provided in the issue description, we can see I have the database connection and I have the SSH connection.
About your question: I understand that the SSH it is a separate config from the database.
This is how it looks in Compass
And in the Authentication tab I have the username and password for SSH
My URI:
mongodb://my_user:PASSWORDPLACEHOLDER@localhost:27017/?authMechanism=DEFAULT&authSource=admin
I can't delete 27017 because when click "save" it appears again.
SSH Host (not real):
12.12.12.12
Port (not real):
1234
Username:
my_username
Auth type:
Private key
This works on compass.
EDIT: I'm having a connection error:
Unable to connect to this connection:
MongoServerSelectionError: Server selection timed out after 5000 ms
@dimarixsus the actual URI does not contain any port, the SSH config appears in Mingo after you check the checkbox:
This is where you enter the SSH configuration as in compass screenshot.
@Icaruk do you have the port in the original URI you are trying to use? If not, we have a check to add it for some cases it's necessary, but we could disable it so you can use it without the port number, too.
@dimarixsus the actual URI does not contain any port, the SSH config appears in Mingo after you check the checkbox:
This is where you enter the SSH configuration as in compass screenshot.
Sorry, I can't properly understand you reply. I'm aware the URI does not contain any port and also I'm aware the SSH config appears when you hit the checkbox. All you said I understand I'm pointing it out in the screenshot I placed in the issue description.
Ty
@Icaruk do you have the port in the original URI you are trying to use? If not, we have a check to add it for some cases it's necessary, but we could disable it so you can use it without the port number, too.
My URI:
mongodb://my_user:PASSWORDPLACEHOLDER@localhost:27017/?authMechanism=DEFAULT&authSource=admin
If I try to remove 27017
from it, when I click "Save changes" or "Test connection", 27017
is appended to localhost
.
@Icaruk we have removed the "auto-append-port" feature in next release.
@dimarixsus What I mean is that even when I selected Proxy / SSH, the URI does not contain the port, only port setting is for the SSH config which you have to enter in the "Port:" field for SSH as in screenshot.
@Icaruk we have removed the "auto-append-port" feature in next release.
@dimarixsus What I mean is that even when I selected Proxy / SSH, the URI does not contain the port, only port setting is for the SSH config which you have to enter in the "Port:" field for SSH as in screenshot.
Thanks, anyways my URI works in compass, but not here :/
Maybe they actually remove it in the background manually. The error comes from mongo driver itself...
Maybe they actually remove it in the background manually. The error comes from mongo driver itself...
I'll come back after the release!
@Icaruk we have removed the "auto-append-port" feature in next release.
@dimarixsus What I mean is that even when I selected Proxy / SSH, the URI does not contain the port, only port setting is for the SSH config which you have to enter in the "Port:" field for SSH as in screenshot.
Oh, I understand now. In the screenshot there is a 27017. I just tested it without that port number and same problem happens :(
Problem persists, please help!
I am getting an error too! I don't know why, but the URI is the same as I have it in Mongo compass and the rest of credentials seems to be equals too...
This is the error that I obtain when I click on "Test connection" button.
Please, fix this, I am getting mad using Compass in Production env instead of Mingo 😵💫
Thanks!
More info here:
The URI works fine in Compass
Same problem!! Does anyone have a workaround for this? Really frustrating!
It would be really helpful if we could have any advance on this issue =)
Experiencing the same issue here. Any updates or workarounds would be greatly appreciated! 😊
Describe the bug When testing a connection through SSH, is saying "MongoParseError: mongodb+srv URI cannot have port number". In the attached screenshot I understand I'm not putting anything strange. In fact, this same configuration works in Compass and in NoSQLBooster for MongoDB.
If you try to remove the
+srv
and do it with replica set configuration, it gives me another error. But let's start with this one at least.Screenshots
Desktop (please complete the following information):