-
Notifications
You must be signed in to change notification settings - Fork 175
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
Connection error MongoDB Backend #32
Comments
As I mentioned at the forum, I'm not sure why you're seeing that
I just started a new job and I'm very short in time, so if you could try writing a dummy Go program that connects to your remote instance and see if there's any problem, that could be helpful. |
It is really weird. I don't have your email and not feeling comfortable to give the address and credentials in an open space, if you have a way to PM you it would be great if you could test it. Thanks |
Yeah, I imagined it could have something to do with some driver option as it didn't make sense to me either. Tomorrow I'll have time to do some tests and let you know what I can find. Also, you can reach me at iegomez@uc.cl (it's in my profile) or PM me at the loraserver's forum (I just didn't want to mix things in the public topic), whichever you prefer. |
I fixed a couple of things (e.g., you had no port set) on the dummy Go program you sent me an tried it, getting:
It's a similar error, but it doesn't mention On the other hand, I was able to connect remotely from a terminal with this command (credentials and host are changed here, of course):
So it's not a remote connection issue either. I've tried a few changes to the dummy program but still can't get it to connect, so if you can bare with me a little I'll try a couple more things and check for any ongoing issue with the Mongo driver tomorrow to see if I can resolve it. |
Hi there
Sure. You can play with as long as you need.
I’m investigating about replica set. I need to use change streams on mongodb but have no replica, it is a single host and it has localhost configured on replica.
Don’t know how to it in another way so I’m working on understanding if it can bother the client connection.
Sorry about internal DNS, I’ve just copied and pasted on the file and didn’t realize it.
Thanks !
…On 5 Sep 2019 at 20:06 -0300, Ignacio Gómez ***@***.***>, wrote:
I fixed a couple of things (e.g., you had no port set) on the dummy Go program you sent me an tried it, getting:
server selection error: server selection timeout
current topology: Type: ReplicaSetNoPrimary
Servers:
It's a similar error, but it doesn't mention localhost. Then I realized you were actually connecting from the same server and using the internal ip-XXX-XX-XX-XXX.sa-east-1.compute.internal hostname in the original issue, which should resolve to localhost in that machine. So bottom line, don't worry about the localhost in the error.
On the other hand, I was able to connect remotely from a terminal with this command (credentials and host are changed here, of course):
mongo ***@***.***:27017/your-db
So it's not a remote connection issue either. I've tried a few changes to the dummy program but still can't get it to connect, so if you can bare with me a little I'll try a couple more things and check for any ongoing issue with the Mongo driver tomorrow to see if I can resolve it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It is solved, a very nice and explained answer in SO can be found here: So for your future users whose need to use Replica Set in a single server may fall on this pitfall. Cheers ! |
Great! I'm glad that you could solve it and thanks for the research, I'll add a mention to the docs. Cheers! |
Hi there
I’m getting this error:
Even though my parameters are all corrects, I’ve placed a debug on source code mongo.go and got:
Maybe a relevant information, my Mongo Server isn’t on localhost, but in another VPS on same network and firewall rules are tuned.
if I try connecting to the same database using same credentials in command line I’m getting no problems:
Why does the driver states the error on
localhost:27017
?The text was updated successfully, but these errors were encountered: