Mongoclient not resolve ip address in replicaset

17 views
Skip to first unread message

CesarJ M

unread,
Apr 12, 2018, 4:32:27 PM4/12/18
to node-mongodb-native
I have three mongodb servers in replica set.

In other host I have a node app configured to use this replica set using ip address, but using ips instead hostname (not configured in /etc/hosts).

When I start this app, cannot connect to the replica, showing the errors:
Mongoclient getaddrinfo name or service not known.

But, if I use mongodb command the connection is successful:

mongo mongodb://ip1,ip2,ip3/?replicaset=name

It is a bug of mongodb driver?
Exists any option or setting for not inverse resolution of IPs?

Any help is apreciated.

Regards,
Cesar Jorge

CesarJ M

unread,
Aug 13, 2018, 2:27:48 PM8/13/18
to node-mongodb-native
Hi,

Exist any form for realize this connection using mongodb nodejs driver or this is fixed in latest version?

Regards

Reply all
Reply to author
Forward
0 new messages