title: mongodb keyFile between replicas throws Permission denied
body: <p>I have a single node ReplicaSet with auth activated, a root user and a keyFile I've created with <a href="http://docs.mongodb.org/manual/tutorial/deploy-replica-set-with-auth/" rel="nofollow">this tutorial</a>, I also have two more mongod processes in the same server in different ports (37017 and 47017) and the same  replSet name, but when I try to add the secondaries in the mongo shell connected to PRIMARY with rs.add("172.31.48.41:37017") I get:</p>
  
  <pre><code>{
      "ok" : 0,
      "errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: 172.31.48.41:27017; the following nodes did not respond affirmatively: 172.31.48.41:37017 failed with Failed attempt to connect to 172.31.48.41:37017; couldn't connect to server 172.31.48.41:37017 (172.31.48.41), connection attempt failed",
      "code" : 74
  }
  </code></pre>
  
  <p>Then I went to the mongod process log of the PRIMARY and found out this:</p>
  
  <pre><code>2015-05-19T20:53:59.848-0400 I REPL     [conn51] replSetReconfig admin command received from client
  2015-05-19T20:53:59.848-0400 W NETWORK  [conn51] Failed to connect to 172.31.48.41:37017, reason: errno:13 Permission denied
  2015-05-19T20:53:59.848-0400 I REPL     [conn51] replSetReconfig config object with 2 members parses ok
  2015-05-19T20:53:59.849-0400 W NETWORK  [ReplExecNetThread-0] Failed to connect to 172.31.48.41:37017, reason: errno:13 Permission denied
  2015-05-19T20:53:59.849-0400 W REPL     [ReplicationExecutor] Failed to complete heartbeat request to 172.31.48.41:37017; Location18915 Failed attempt to connect to 172.31.48.41:37017; couldn't connect to server 172.31.48.41:37017 (172.31.48.41), connection attempt failed
  2015-05-19T20:53:59.849-0400 E REPL     [conn51] replSetReconfig failed; NodeNotFound Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: 172.31.48.41:27017; the following nodes did not respond affirmatively: 172.31.48.41:37017 failed with Failed attempt to connect to 172.31.48.41:37017; couldn't connect to server 172.31.48.41:37017 (172.31.48.41), connection attempt failed
  </code></pre>
  
  <p>And the log of the mongod that should become SECONDARY shows nothing, the last two lines are:</p>
  
  <pre><code>2015-05-19T20:48:36.584-0400 I REPL     [initandlisten] Did not find local replica set configuration document at startup;  NoMatchingDocument Did not find replica set configuration document in local.system.replset
  2015-05-19T20:48:36.591-0400 I NETWORK  [initandlisten] waiting for connections on port 37017
  </code></pre>
  
  <p>It's clear that I cannot rs.initiate() in this node because it will self vote to be PRIMARY and that would create a conflict, so the line that states "Did not find local replica set configuration document at startup" is to be ignores as far as I know.</p>
  
  <p>So I would think that the permission should be ok since I'm using the same key file in every mongod process and the replSet is the same in every config file, and that's all the tutorial states to be needed, but obviously something is missing.</p>
  
  <p>Any ideas? Is this a bug?</p>