[SERVER-14762] mongo shell - host name misinterpretation ? Created: 01/Aug/14 Updated: 10/Dec/14 Resolved: 01/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Emmanuel Jacobs | Assignee: | Ramon Fernandez Marina |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | Create a host entry for interface IP address (not localhost) |
| Participants: |
| Description |
|
Using Windows I have an IP-name association in the host file which is "rs01 25.1.1.1" checked with: When typing "mongo rs01:27017" shell connect to correct IP |
| Comments |
| Comment by Emmanuel Jacobs [ 01/Aug/14 ] | |||
|
Thx, sorry for my misunderstanding... | |||
| Comment by Ramon Fernandez Marina [ 01/Aug/14 ] | |||
|
manette, the first argument to mongo is the name of the database to connect to, so
means "connect to the rs01 database on the local machine", and since your mongod instance is not listening on 127.0.0.1 the connection fails. When you run
that means "connect to the default database (test) on machine rs01, port 27017, and the connection succeeds because mongod is listening on rs01:27017. If you want to use your host name to connect, you can run
Regards, |