502 error after restarting mongo db in remote server using fork command
I could finally get it to work by executing following command  :

sudo mongod --fork --auth --port 27017 --dbpath /var/lib/mongodb --logpath /var/lib/mongodb/mongod.log