By totalmmaru
Hello, i want to open MongoDB HTTP Interface ( http://docs.mongodb.org/ecosystem/tools/http-interfaces) but i can open http://188.226.225.xx:28017/news/news. I am add a rule to iptables : sudo iptables -I INPUT -p tcp -m state --state NEW,ESTABLISHED --dport 27017 -j ACCEPT But something wrong. Please. help ,me
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Please refer to http://dbversity.com/mongodb-shard-creation-script/ for the automated shard creation script.
First, you need to check if there’s anything listening on port 27017:
sudo netstat -plutn | grep 27017
If you see the mongodb process in the output and still can’t access port 27017, try deleting the existing rule and adding the following rule instead:
sudo iptables -D INPUT -p tcp -m state --state NEW,ESTABLISHED --dport 27017 -j ACCEPT
sudo iptables -I INPUT -p tcp -m tcp --dport 27017 -j ACCEPT
“mongod” is listening on 127.0.0.1:27017. Because it’s listening on the local loopback interface (127.0.0.1), you will be able to connect to it only from the droplet itself. You need to set bindIp to 0.0.0.0 in /etc/mongodb.conf and restart MongoDB:
sudo service mongod restart
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.