Bug 1020578 - Java Scalable Application don't get connection to MongoDB.
Java Scalable Application don't get connection to MongoDB.
Status: CLOSED WORKSFORME
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-17 22:31 EDT by romarcio
Modified: 2015-05-14 19:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-18 17:58:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
tomcat log (11.29 KB, text/plain)
2013-10-17 22:31 EDT, romarcio
no flags Details

  None (edit)
Description romarcio 2013-10-17 22:31:57 EDT
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 12:31:36 EDT
Is your code on github or public so that I could use it for debugging?
Comment 2 romarcio 2013-10-18 16:54:53 EDT
(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 17:58:10 EDT
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.