Mongo failed to connect to IP: 27017

Source: Internet
Author: User
Tags install mongodb mongodb server

I want to insert some data into Mongo DB using Java (on Ubuntu-Eclipse), but failed to connect to DB Server (on Windows XP Virtual manchine). The error is below:

Java. Io. ioexception: couldn't connect to [/192.168.1.72: 27017] BC: java.net. connectexception: Connection timed out

First, I can connect in WINXP using Mongo 192.168.1.72: 27017

Sencondly, I try connect in Ubuntu using Mongo 192.168.1.72: 27017 (I need to install Mongo client usingSudo apt-Get install MongoDB-clients)
And the connection failed again:

MongoDB shell version: 1.4.4
URLs: 192.168.1.72: 27017
Connecting to: 192.168.1.72: 27017/test
Tue Jun 5 16:19:47 JS error: Error: couldn't connect to server 192.168.1.72: 27017 192.168.1.72: 27017 (Anon): 954
Tue Jun 5 16:19:47 user exception 12513: connect failed
Exception: connect failed
So far, I did not find the resolution.

But when I connect in Ubuntu to another MongoDB server, it connects successfully.

So I think this is because of some configuration about MongoDB server in my WINXP.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.