Não é possível conectar-se ao shell mongo

0

Ao executar o comando mongo no terminal

MongoDB shell version v3.4.10
connecting to: mongodb://127.0.0.1:27017
2017-11-15T14:47:49.452+0530 W NETWORK  [thread1] Failed to connect to 
127.0.0.1:27017, in(checking socket for error after poll), reason: 
Connection refused
2017-11-15T14:47:49.495+0530 E QUERY    [thread1] Error: couldn't 
connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
    
por Rahul Parihar 15.11.2017 / 10:23

1 resposta

0

Experimente estes passos:

  1. Remover o arquivo de bloqueio:

    sudo rm /var/lib/mongodb/mongod.lock 
    
  2. Repare o mongodb:

    mongod –repair
    
  3. Inicie o mongodb:

    sudo systemctl start mongodb
    
  4. Inicie o cliente mongo:

    mongo
    

Fonte:

link

    
por George Udosen 15.11.2017 / 12:42