I have installed mongo on machine1(Ubuntu 14.04.3 LTS server) in my local network. I have also opened the port 27017 as mentioned in this guide using f
Ubuntu 14.04.3 LTS server
27017
Make sure you have a daemon running on your machine1 which listen to port 27017. We were getting the same error and found that daemon was not running.