Bug 1020578 - Java Scalable Application don't get connection to MongoDB.
Summary: Java Scalable Application don't get connection to MongoDB.
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-18 02:31 UTC by romarcio
Modified: 2015-05-14 23:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-18 21:58:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
tomcat log (11.29 KB, text/plain)
2013-10-18 02:31 UTC, romarcio
no flags Details

Description romarcio 2013-10-18 02:31:57 UTC
Created attachment 813581 [details]
tomcat log

Description of problem:
Java Scalable Application don't get connection to MongoDB.
An exception kind of java.io.EOFException is thrown.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a Java Scalable App in small gear - Tomcat 7 (JBoss EWS 2.0)
2. Add MongoDB as database to that App - MongoDB 2.2
3. Configure Mongo connection class by Spring-data (MongoTemplate)
4. Add the openshift environment variables in connection class 
5. Start App

Actual results:
Exception is thrown - 
WARNING: emptying DBPortPool to 525c4d3ae0b8cdc1f0000055-xxxxxxx.rhcloud.com/10.158.61.28:42331 b/c of error
java.io.EOFException
	at org.bson.io.Bits.readFully(Bits.java:48)
	at org.bson.io.Bits.readFully(Bits.java:33)
	at org.bson.io.Bits.readFully(Bits.java:28)
	at com.mongodb.Response.<init>(Response.java:40)
	at com.mongodb.DBPort.go(DBPort.java:124)
	at com.mongodb.DBPort.call(DBPort.java:74)
	at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:286)
	at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:257)
	at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:310)
	at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:295)
	at com.mongodb.DBCursor._check(DBCursor.java:368)
	at com.mongodb.DBCursor._hasNext(DBCursor.java:459)
	at com.mongodb.DBCursor.hasNext(DBCursor.java:484)

	
Complete log was attached.	


Expected results:
The success in connection to MongoDB.

Additional info:
The same app is running as non-scalable and the connection to Mongodb is successful.

Comment 1 Jhon Honce 2013-10-18 16:31:36 UTC
Is your code on github or public so that I could use it for debugging?

Comment 2 romarcio 2013-10-18 20:54:53 UTC
(In reply to Jhon Honce from comment #1)
> Is your code on github or public so that I could use it for debugging?

Hello Jhon Honce!

After many days trying to do the application works, I decided to remove it and to create a new cartridge scalable. This new cartridge I added the same application and it is working, no problem or error appeared in relation to MongoDB connection.

It was a surprise to me and I don't know to say what may have gone wrong in the first attempt.

Comment 3 Jhon Honce 2013-10-18 21:58:10 UTC
Please reopen if you have another occurrence.

Sorry for the inconvenience.


Note You need to log in before you can comment on or make changes to this bug.