Mongo DB 2.0 issue

19 views
Skip to first unread message

rahul

unread,
Dec 2, 2011, 12:25:21 PM12/2/11
to mongodb-user
I have issue with mongo 2.0.1 version,I have installed it on uduntu
machine that is 36 bit it I am able to connect it through command
prompt,but not able to connect it through Java code. this same code
used to work with the older mongo db version. I get following
exception.
Caused by: com.mongodb.MongoInternalException: DBPort.findOne failed
at com.mongodb.DBPort.findOne(DBPort.java:153)
at com.mongodb.DBPort.runCommand(DBPort.java:159)
at com.mongodb.DBTCPConnector.testMaster(DBTCPConnector.java:369)
at com.mongodb.Mongo.<init>(Mongo.java:140)
at
com..bean.MongoCollectionPoolBean.init(MongoCollectionPoolBean.java:
42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:
1544)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:
1485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:
1417)
... 24 more
Caused by: java.io.IOException: couldn't connect to
[domU-12-31-39-0B-26-01/67.215.65.132:27017]
bc:java.net.ConnectException: Connection timed out
at com.mongodb.DBPort._open(DBPort.java:205)
at com.mongodb.DBPort.go(DBPort.java:85)
at com.mongodb.DBPort.findOne(DBPort.java:145)
... 35 more

when I try to reproduce the same problem with my local system Mac lion
64 bit it works fine. when I see the server logs here is what i see on
my local system

[clientcursormon] mem (MB) res:14 virt:2434 mapped:0

and on ubutu (where it is not working)

[clientcursormon] mem (MB) res:14 virt:86 mapped:0

Any help will be greatly appreciated. Thanks

Tyler Brock

unread,
Dec 2, 2011, 12:57:52 PM12/2/11
to mongodb-user

rahul

unread,
Dec 2, 2011, 1:00:30 PM12/2/11
to mongodb-user
Yes i wanted to publish it to the wider audiences so posted on the
Stackoverflow as well

On Dec 2, 9:57 am, Tyler Brock <ty...@10gen.com> wrote:
> This is a duplicate ofhttp://stackoverflow.com/questions/8360295

Waitman Gobble

unread,
Dec 2, 2011, 1:04:08 PM12/2/11
to mongod...@googlegroups.com
On Fri, Dec 2, 2011 at 9:25 AM, rahul <rahulb...@gmail.com> wrote:
I have issue with mongo 2.0.1 version,I have installed it on uduntu
machine that is 36 bit it I am able to connect it through command
prompt,but not able to connect it through Java code. this same code
used to work with the older mongo db version. I get following
exception. 
       ... 

Caused by: java.io.IOException: couldn't connect to
[domU-12-31-39-0B-26-01/67.215.65.132:27017]

when I try to reproduce the same problem with my local system Mac lion
64 bit it works fine. when I see the server logs here is what i see on
my local system

 Any help will be greatly appreciated. Thanks


Hi, 

localhost is 127.0.0.1 *not*  67.215.65.132... 

Waitman Gobble
San Jose California USA



rahul

unread,
Dec 2, 2011, 1:28:04 PM12/2/11
to mongodb-user
Thanks but in my mongo connection I have given localhost it looks like
driver is converting it in to the IP

On Dec 2, 10:04 am, Waitman Gobble <gobble...@gmail.com> wrote:

rahul

unread,
Dec 2, 2011, 1:28:35 PM12/2/11
to mongodb-user
Also Same code works on the my local system

On Dec 2, 10:04 am, Waitman Gobble <gobble...@gmail.com> wrote:

Waitman Gobble

unread,
Dec 2, 2011, 1:38:53 PM12/2/11
to mongod...@googlegroups.com
On Fri, Dec 2, 2011 at 10:28 AM, rahul <rahulb...@gmail.com> wrote:
Also Same code works on the my local system  



Hmmmm... some things to look at.

# cat /etc/hosts
...
{interesting output}
...

# hostname
...
{interesting output}
...

# dig localhost
...
{interesting output}
...
Reply all
Reply to author
Forward
0 new messages