Question

I am trying to connect to remote MongoDB (mongolab) from my local GAE server (localhost/8888). I am using morphia and my mongodb driver version is 2.4. My code looks like this:

Mongo m = new Mongo("xyz.mongolab.com",);

Datastore datastore = new Morphia().createDatastore(m, "staging","uname","password".toCharArray());

This throws the following exception :

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.(Mongo.java:167)

Caused by: java.io.IOException: couldn't connect to [xyz.mongolab.com/:] bc:java.net.SocketException: Operation failure: setSocketOptions: Not yet implemented at com.mongodb.DBPort._open(DBPort.java:205)

Does somebody know why this is happening ?

Was it helpful?

Solution

it was a problem with using the old mongodb driver.. works after i upgraded..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top