title: Connecting Application to OpenShift MongoDB
body: <p>I had a MongoDB on MongoLab, which I was using with my Android Application and everything was just fine.</p>
  
  <p>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: <a href="https://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility">mongodb 3.x driver Android compatibility</a></p>
  
  <p>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.</p>
  
  <pre><code>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}}]
  </code></pre>
  
  <ol>
  <li>Does anyone have any experience with OpenShift that could give me some advice? </li>
  <li>If OpenShift is not an option, could anyone give some suggestion about a free MongoDB cloud service that is not 3.0.X+?</li>
  </ol>
  
  <p>Just would like to remind that this is for college study that’s why we are not investing money on it. </p>
  
  <p>Thanks in advance.</p>