Im trying to import a mongo collection onto an EC2 instance, i have used
mongoimport -d test -c foo importfile.json
This worked fine on my localhost but on my EC2 instance it says
mongoimport -d test_mr -c att_live /var/www/html/app/config/schema/reduced.json couldn't connect to [127.0.0.1] couldn't connect to server 127.0.0.1
I have no problems connecting to my mongodb on the EC2 server and doing commands manually, it just fails on the import.
Any suggestions?
Sorted it....
mongod wasnt running as a daemon, so i could connect to mongo from shell and do querys, but when i exited or ctrl+C'd it closed the entire host process, so when i ran mongoimport theres was nothing to connect to