"Go" couldn & #39; t connect to server 127.0.0.1: 27017 at src/mongo/shell/mongo. js: 145, "go" 27017

Source: Internet
Author: User

"Go" couldn't connect to server 127.0.0.1: 27017 at src/mongo/shell/mongo. js: 145, "go" 27017

Couldn't connect to server 127.0.0.1: 27017 at src/mongo/shell/mongo. js: 145. For more information, see.


It should be because the installation was not timely yesterday, and the language expression was a little poor, understanding

Mongodb was installed yesterday for no reason.

Couldn't connect to server 127.0.0.1: 27017 at src/mongo/shell/mongo. js: 145

This is an error. After google went down, it was basically said that it was not properly closed. The product had a locks file named mongod. lock, found the file, and deleted it.

Start in./mongod -- dbpath =/usr/local/mongodb/data/-- logpath =/usr/local/mongodb/db. logs -- repair mode,

I tried it several times and the result failed. The error still persists.

I saw some articles about permission issues. I used ll to check the permissions. I found that all the permissions under/usr/local/mongodb/bin/are mysql.

Then chown-R root: root/usr/local/mongodb/bin/

Delete mongod. lock. Restart, failed again,

Continue Baidu and find that there may be port problems. Modify the port to start again or fail

Finally, we found the following problems.

ERROR: Insufficient free space for journal files

The disk is too small. I used df-h to check the disk of the server and found that 92% was used.

Use./mongod -- dbpath =/usr/local/mongodb/data/-- logpath =/usr/local/mongodb/db. logs -- smallfiles

Start again. No error is reported. You can use the./mongo command to find it.

Then edit vi/etc/rc. d/rc. local file to add

./Usr/local/mongodb/bin/mongod -- dbpath =/usr/local/mongodb/data/-- logpath =/usr/local/mongodb/db. logs -- fork -- smallfiles

Enable mongodb to start automatically

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.