I had a MongoDB on MongoLab, which I was using with my Android Application and everything was just fine.
But well, they decided to upgrade the MongoDB version to 3.0.x and now I’m not able to connect again because the java driver 3.0 don’t seem to work very well on Android. We can see some discussion about the situation here: mongodb 3.x driver Android compatibility
Then I decided to try OpenShift, which has version 2.4 of MongoDB. But I’m not being able to connect to the database like I use to do with MongoLab. I feel like I might be misunderstanding the purpose of OpenShift.
Caused by: java.net.ConnectException: Connection refused: connect
[...]
Exception in thread "main" com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=127.XX.XXX.X:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused: connect}}]
- Does anyone have any experience with OpenShift that could give me some advice?
- If OpenShift is not an option, could anyone give some suggestion about a free MongoDB cloud service that is not 3.0.X+?
Just would like to remind that this is for college study that’s why we are not investing money on it.
Thanks in advance.