[SERVER-1579] Local connection fails when there is no internet connection Created: 06/Aug/10  Updated: 12/Jul/16  Resolved: 25/Oct/10

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 1.6.0
Fix Version/s: 1.6.4, 1.7.0

Type: Bug Priority: Critical - P2
Reporter: Matt Parlane Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 10.04 x86_64


Operating System: Linux
Participants:

 Description   

I often do some work while on the train home, and I have noticed that 1.6.0 won't let me connect from the command line when I have no network connection.

When online:

matt@matt-laptop:~$ ./mongodb-linux-x86_64-1.4.4/bin/mongo webgenius
MongoDB shell version: 1.4.4
url: webgenius
connecting to: webgenius

matt@matt-laptop:~$ ./mongodb-linux-x86_64-1.6.0/bin/mongo webgenius
MongoDB shell version: 1.6.0
connecting to: webgenius

When offline:

matt@matt-laptop:~$ ./mongodb-linux-x86_64-1.4.4/bin/mongo webgenius
MongoDB shell version: 1.4.4
url: webgenius
connecting to: webgenius

matt@matt-laptop:~$ ./mongodb-linux-x86_64-1.6.0/bin/mongo webgenius
Fri Aug 6 19:07:58 getaddrinfo("0.0.0.0") failed: Name or service not known
MongoDB shell version: 1.6.0
connecting to: webgenius
Fri Aug 6 19:07:58 getaddrinfo("127.0.0.1") failed: Name or service not known
Fri Aug 6 19:07:58 Error (anon):1137
exception: connect failed

Cheers,

Matt Parlane



 Comments   
Comment by auto [ 25/Oct/10 ]

Author:

{'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: Don't use AI_ADDRCONFIG. SERVER-1579
http://github.com/mongodb/mongo/commit/ee5a18c6ce6da9bcb2b1fbc0c5830ff4a77dd683

Comment by auto [ 06/Aug/10 ]

Author:

{'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: Don't use AI_ADDRCONFIG. SERVER-1579
http://github.com/mongodb/mongo/commit/bb664cd49e8f4dfd30c1603d39d60797edbff07c

Comment by Mathias Stearn [ 06/Aug/10 ]

As a quick fix, "ifconfig eth0 1.1.1.1" will solve this since you don't need connectivity, just an IP address. There will be a fix in master soon.

Generated at Thu Feb 08 02:57:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.