[JAVA-985] Q: dropped connections and data nodes definitions Created: 02/Oct/13  Updated: 11/Sep/19  Resolved: 04/Dec/13

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: 2.4
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Vitaly Karasik Assignee: Unassigned
Resolution: Done Votes: 0
Labels: connection, driver, java, replication
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL5 and 6, MongoDB 2.0 and 2.4.6


Attachments: Text File java_mongo_exception.txt    

 Description   

I have a few Jboss 5.1 servers which uses MongoDB data set. Till yesterday I had 3 Mongo 2.0 nodes in this dataset. Yesterday I added 2 Mongo 2.4.6 secondaries to this dataset; and after that I see many warnings like that:

WARNING [com.mongodb] emptying DBPortPool to /x.x.x.x:27017 b/c of error

"Many" - about 30/day instead of 5/day before. Another thing that I don't understand - according to jboss log, it started to use 2 new nodes, even I didn't add them to mongo-ds.xml.

Any ideas why number of dropped connections increased and why jboss started to use new nodes?

TIA, Vitaly

my mongo-ds is:
<mongo:mongo host="none" replica-set="mongo1:27017,mongo2:27017,mongo3:27017"> <mongo:options connections-per-host="8" threads-allowed-to-block-for-connection-multiplier="4" connect-timeout="10000" max-wait-time="1500" auto-connect-retry="true" socket-keep-alive="true" socket-timeout="10000" slave-ok="true" write-number="1" write-timeout="0" write-fsync="true" /> </mongo:mongo>



 Comments   
Comment by Jeffrey Yemin [ 04/Dec/13 ]

Hi Vitaly

Connection reset generally means that the peer dropped the connection. You're going to have to look outside the driver to find out the underlying cause of that. For starters, I'd check the server logs, and if there are no clues there, check any routers that you may have between JBoss and the MongoDB server.

Comment by Vitaly Karasik [ 03/Oct/13 ]

jboss log mongo connection exception exampe

Comment by Vitaly Karasik [ 03/Oct/13 ]

Jeff,
Many thanks!
I'll attach part of jboss log.

Comment by Jeffrey Yemin [ 02/Oct/13 ]

The Java driver, like all the MongoDB drivers, will auto-discover all the nodes in the replica set, even those not in the seed list. The seed list just gets the driver started. If you want to limit which servers to read from, please check out the read preference documentation: http://docs.mongodb.org/manual/core/read-preference/.

As for the errors, I can't tell what's happening just from that warning. Are there exceptions in the logs prior to that warning?

Generated at Thu Feb 08 08:53:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.