Timeout trouble with morphia/mongodb

94 views
Skip to first unread message

matt

unread,
Mar 14, 2011, 8:05:43 PM3/14/11
to play-framework
Hello

Just plugged in morphia module to my play project and install a
mongodb runtine.

When starting up the app:

Oops: MongoInternalException
An unexpected error occured caused by exception
MongoInternalException: DBPort.f
indOne failed

play.exceptions.UnexpectedException: While applying
play.modules.morphia.Morphia
Plugin@3fe2670b on DocViewerPlugin
at play.classloading.ApplicationClasses
$ApplicationClass.enhance(Applica
tionClasses.java:215)
at
play.classloading.ApplicationClassloader.loadApplicationClass(Applica
tionClassloader.java:139)
at
play.classloading.ApplicationClassloader.loadClass(ApplicationClasslo
ader.java:75)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at play.Play.start(Play.java:383)
at play.Play.detectChanges(Play.java:530)
at play.Invoker$Invocation.init(Invoker.java:100)
at Invocation.HTTP Request(Play!)
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:
371)
at com.mongodb.Mongo.<init>(Mongo.java:167)
at com.mongodb.Mongo.<init>(Mongo.java:151)
at com.mongodb.Mongo.<init>(Mongo.java:141)
at
play.modules.morphia.MorphiaPlugin.onConfigurationRead(MorphiaPlugin.
java:99)
at
play.modules.morphia.MorphiaPlugin.enhance(MorphiaPlugin.java:84)
at play.classloading.ApplicationClasses
$ApplicationClass.enhance(Applica
tionClasses.java:212)
... 7 more
Caused by: java.io.IOException: couldn't connect to
[myHOST:myPORThere] bc:java.net.ConnectException: Connection timed
out: connect
at com.mongodb.DBPort._open(DBPort.java:205)
at com.mongodb.DBPort.go(DBPort.java:85)
at com.mongodb.DBPort.findOne(DBPort.java:145)
... 15 more


On mongod-side i see logs corresponding to connection from play
webapp:

Tue Mar 15 00:20:04 [initandlisten] connection accepted from
127.0.0.1:61040 #1
Tue Mar 15 00:29:02 [conn1] end connection 127.0.0.1:61040


Have you guys met this exception before? It's pretty straight-forward
but it seems i can't figure it out.

Thank y

green

unread,
Mar 15, 2011, 4:56:57 AM3/15/11
to play-fr...@googlegroups.com
Never met that before. Can you connect to mongodb via mongo shell?


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


yakanet

unread,
Mar 15, 2011, 6:45:06 AM3/15/11
to play-framework
Here your stacktrace :
Caused by: java.io.IOException: couldn't connect to
[myHOST:myPORThere]

I think you need to update your configuration file replacing myHOST
and myPORThere, with your server values.

matt

unread,
Mar 15, 2011, 7:39:09 PM3/15/11
to play-framework
yes i can connect to the shell
and obviously params myHOST and myPORThere were just removed from
stacktrace and are correctly mapping mongod instance coordinates.
Reply all
Reply to author
Forward
0 new messages