mongodb Failed: error connecting to db server: no reachable servers

前端 未结 12 2030
失恋的感觉
失恋的感觉 2020-12-13 11:59

I installed mongodb in Ubuntu14.04 server

I was not able to connect to mongodb via \"mongoimport\", \"mongodump\", \"mongostat\", etc. It always show \"no reachable

12条回答
  •  遥遥无期
    2020-12-13 13:02

    If TLS is enabled with authentication then use the below format from the dump location

    mongorestore --host=example.com --port=27017 --username=user_name  --authenticationDatabase=admin --ssl --sslCAFile /etc/ssl/rootCA.pem --sslPEMKeyFile /etc/ssl/mongodb.pem
    

提交回复
热议问题