title: Impossible to connect to mongo after server shutdown
body: <p>I am running a mongo cluster (v 3.4.1) on a remote Ubuntu server. This server had an unexpected shutdown yesterday. Since that, I cannot connect to mongo.</p>
  
  <p>I connected by ssh to the server to check if mongo was running. It seems to be the case because if I use the mongo command, I get the following output:</p>
  
  <pre><code>MongoDB shell version v3.4.2
  connecting to: mongodb://127.0.0.1:27017
  MongoDB server version: 3.4.1
  Server has startup warnings: 
  2017-09-28T08:01:43.906+0000 I STORAGE  [initandlisten] 
  2017-09-28T08:01:43.906+0000 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
  2017-09-28T08:01:43.906+0000 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
  2017-09-28T08:01:44.204+0000 I CONTROL  [initandlisten] 
  2017-09-28T08:01:44.204+0000 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
  2017-09-28T08:01:44.204+0000 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
  2017-09-28T08:01:44.204+0000 I CONTROL  [initandlisten] 
  </code></pre>
  
  <p>Now if I run "mongod" I get the exception:</p>
  
  <pre><code>...
  2017-09-28T10:10:26.065+0200 I STORAGE  [initandlisten] exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /data/db, terminating
  2017-09-28T10:10:26.065+0200 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
  ...
  </code></pre>
  
  <p>I tried in sudo mode, I got:</p>
  
  <pre><code>...
  2017-09-28T10:12:21.857+0200 E NETWORK  [initandlisten] listen(): bind() failed Address already in use for socket: 0.0.0.0:27017
  2017-09-28T10:12:21.857+0200 E NETWORK  [initandlisten]   addr already in use
  2017-09-28T10:12:21.857+0200 E NETWORK  [initandlisten] Failed to set up sockets during startup.
  2017-09-28T10:12:21.857+0200 E STORAGE  [initandlisten] Failed to set up listener: InternalError: Failed to set up sockets
  2017-09-28T10:12:21.857+0200 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
  ...
  </code></pre>
  
  <p>Which would mean that an instance of mongo is already running...</p>
  
  <p>Then I tried to kill mongo process, either with <code>sudo service mongod stop</code> or <code>sudo pkill mongod</code> or <code>sudo kill &lt;PID&gt;</code> after listing processes with <code>ps -ef | grep mongo</code>. But the process does not disappear from the list (seems that it restarts immediately).</p>
  
  <p>So if I try to run <code>sudo mongod --dbpath /data/db --repair</code> (there is a mongod.lock file in the directory), I still get the error "Address already in use".</p>
  
  <p>Any help would be really appreciated!</p>