enable remote access for mongoDB server -


i have linux servers running on same local network. 1 of them running mongodb server. trying connect first server mongodb second server. have added port 27017 first server firewall rules. have modified /etc/mongo.conf file follows: bind_ip=127.0.0.1,10.0.0.202

that did not work. have tried next version: bind_ip=[127.0.0.1,10.0.0.202]

that did not work well. after modifying file trying restart mongod service service won't restart. original line: bind_ip=127.0.0.1.

here error once restart service , check status:

    mongod.service - sysv: mongo scalable, document-oriented database.    loaded: loaded (/etc/rc.d/init.d/mongod)    active: failed (result: exit-code) since sun 2016-11-13 11:32:15 ist; 4min 58s ago      docs: man:systemd-sysv-generator(8)   process: 37572 execstop=/etc/rc.d/init.d/mongod stop (code=exited, status=0/success)   process: 37546 execstart=/etc/rc.d/init.d/mongod start (code=exited, status=0/success)  main pid: 37559 (code=exited, status=48)  nov 13 11:32:15 localhost.localdomain systemd[1]: starting sysv: mongo scalable, document-oriented database.... nov 13 11:32:15 localhost.localdomain runuser[37555]: pam_unix(runuser:session): session opened user mongod...d=0) nov 13 11:32:15 localhost.localdomain mongod[37546]: starting mongod: [  ok  ] nov 13 11:32:15 localhost.localdomain systemd[1]: started sysv: mongo scalable, document-oriented database.. nov 13 11:32:15 localhost.localdomain systemd[1]: mongod.service: main process exited, code=exited, status=48/n/a nov 13 11:32:15 localhost.localdomain mongod[37572]: stopping mongod: [failed] nov 13 11:32:15 localhost.localdomain systemd[1]: unit mongod.service entered failed state. nov 13 11:32:15 localhost.localdomain systemd[1]: mongod.service failed. 

what doing wrong? how fix it?
appreciated. thank you.

problem solved. apparently when adding ip bind_ip=127.0.0.1 line, next ip should 1 of same machine. if ip of machine running mongo server 10.0.0.201, should change line bind_ip=127.0.0.1,10.0.0.201. way other machines on same network able connect mongo server.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -