title: Mongodb How to start 2 instances mongodb on same server with different IP address and port number
body: <p>I have netapp mounted as /mongodb and with two different ip addresses. A server have two nodes.  How does Mongodb knows which instance to run.<br>
  In configuration setup.  I have two database and each database on each node IP (Multiple instances on same server).</p>
  
  <pre><code>Server A
  node1: 192.168.6.7
  node2: 192.168.6.8
  </code></pre>
  
  <p>Configuration file: mongoDB-01.conf setting parameters</p>
  
  <pre><code># Where and how to store data.
  storage:
    dbPath: /var/mongodb/db/mongoDB-01
    journal:
       enabled: true
  
  # where to write logging data.
  systemLog:
    destination: file
    logAppend: true
  path: /var/mongodb/logs/log-01.log
  
  #Network interfaces
  net:
     port:25017
     bindip:192.168.6.7,127.0.0.1 
  </code></pre>
  
  <p>Configuration file: mongoDB-02.conf setting parameters</p>
  
  <pre><code># Where and how to store data.
  storage:
    dbPath: /var/mongodb/db/mongoDB-02
    journal:
      enabled: true
  
  # where to write logging data.
  systemLog:
    destination: file
    logAppend: true
  path: /var/mongodb/logs/log-02.log
  
  #Network interfaces
  net:
     port:27017
     bindip:192.168.6.8,127.0.0.1
  </code></pre>
  
  <p>Fail to start one of instances.  Do I need adding Ip addresses to Linux IPTable and allowing open port 25017 ?  Thanks in Advance.</p>
  
  <pre><code>mongod --config mongoDB-01.conf &amp;  # successful
  mongod --config mongoDB-02.conf &amp; # fail to run
  about to fork child process, waiting until server is ready for connections.
  forked process: 27009
  ERROR: child process failed, exited with error number 100
  </code></pre>