ubuntu - set up Apache2 virtual hosts and now MongoDB connection refused -
i'm running ubuntu 14.04 on aws ec2 instance apache2. morning upgraded apache2 settings allow multiple virtual servers following these instructions: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
just tried access mongodb instance, cannot either through php mongodb driver or through shell. error when attempting connect php mongoclient():
failed connect to: localhost:27017: connection refused' and error when trying run mongo shell:
2015-06-03t19:23:57.307+0000 w network failed connect 127.0.0.1:27017, reason: errno:111 connection refused 2015-06-03t19:23:57.308+0000 e query error: couldn't connect server 127.0.0.1:27017 (127.0.0.1), connection attempt failed @ connect (src/mongo/shell/mongo.js:179:14) @ (connect):1:6 @ src/mongo/shell/mongo.js:179 exception: connect failed everything running fine last night, , haven't directly modified mongodb settings. can fix this? how apache2 settings relate mongodb? i've been trying through mongodb docs, don't see looks relevant.
you need setup security group ec2 instance. , allow inbound connection mongodb port, in case 27017.
Comments
Post a Comment