I am developing a web scraping project on Ubuntu server of 25GB hard disk space. I am using python scrapy and mongodb
Last night my harddisk is full because of scraping 60,000 web pages. so mongodb has put a lock and i am unable to access my database it shows this error
function (){ return db.getCollectionNames(); }
Execute failed:exception: Can't take a write lock while out of disk space
So i removed all data stored in /var/lib/mongodb and run "rebbot" command from shell to restart server
When I try to run mongo on command line, I get this error:
MongoDB shell version: 2.4.5
connecting to: test
Thu Jul 25 15:06:29.323 JavaScript execution failed: Error: couldn't connect to
server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112
exception: connect failed
Guys please help me so that i can connect to mongodb
The first thing to do is to find out whether MongoDB is actually running. You can do that by running the following commands on the shell:
ps aux | grep mongo
And:
netstat -an | grep ':27017'
If neither of those has any output, then MongoDB is not running.
The best way to find out why it doesn't start is to look in the log file that MongoDB creates. It is usually located at /var/log/mongodb/mongodb.log and it should tell you why MongoDB refuses to start.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.