[DOCS-577] multiple use of bind_ip in mongodb.conf breaks server Created: 04/Oct/12  Updated: 28/Jan/13  Resolved: 05/Oct/12

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Alex Hewson Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: bind_ip, mongodb.conf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04.1 LTS


Participants:
Days since reply: 11 years, 3 weeks, 2 days ago

 Description   

MongoDB's manual says of the config file bind_ip setting "You may set this value multiple times to bind mongod to multiple IP addresses".

But setting it multiple times (e.g. to 127.0.0.1 and a real IP address) causes MongoDB to refuse to start. Instead I get an error 'error command line: multiple occurrences".



 Comments   
Comment by Jayr Motta [ 28/Jan/13 ]

I have the same problem but I don't think it's related to bind_ip since I'm not trying to bind my mongo to more than one IP.

I'm using OSX and have run:

launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

as this question on StackOverflow told to, but still didn't work as expect causing:

$ mongod -f /usr/local/etc/mongod.conf --fork
error command line: multiple occurrences
use --help for help

Do I have to do something else?

Comment by auto [ 05/Oct/12 ]

Author:

{u'date': u'2012-10-05T06:51:37-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-577: correction
Branch: master
https://github.com/mongodb/docs/commit/616c4c94ea3650879999e792390e4147dfb16dd9

Comment by Alex Hewson [ 04/Oct/12 ]

Hi Scott,

Thanks for the fast response. Concatenating them onto the same line works perfectly.

Cheers,
Alex.

Comment by Scott Hernandez (Inactive) [ 04/Oct/12 ]

You should use a single value of all the bind params with commas between them:

bind_ip = 127.0.0.1,hostname.tld,10.0.0.2

We will get the manual fixed. (http://docs.mongodb.org/manual/reference/configuration-options/)

Generated at Thu Feb 08 07:39:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.