<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:51 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-1534] com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /ip:port b/c of error</title>
                <link>https://jira.mongodb.org/browse/JAVA-1534</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;My JAVA application is run on Tomcat Server with a single MongoDB. This error occurs some times a day. &lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Here is an exception message.&lt;br/&gt;
----------------------------------------------------------------------------------------------------&lt;br/&gt;
com.mongodb.DBPortPool gotError&lt;br/&gt;
WARNING: emptying DBPortPool to /172.20.1.4:27017 b/c of error&lt;br/&gt;
java.net.SocketException: Connection reset&lt;br/&gt;
	at java.net.SocketInputStream.read(SocketInputStream.java:189)&lt;br/&gt;
	at java.net.SocketInputStream.read(SocketInputStream.java:121)&lt;br/&gt;
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)&lt;br/&gt;
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)&lt;br/&gt;
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)&lt;br/&gt;
	at org.bson.io.Bits.readFully(Bits.java:46)&lt;br/&gt;
	at org.bson.io.Bits.readFully(Bits.java:33)&lt;br/&gt;
	at org.bson.io.Bits.readFully(Bits.java:28)&lt;br/&gt;
	at com.mongodb.Response.&amp;lt;init&amp;gt;(Response.java:40)&lt;br/&gt;
	at com.mongodb.DBPort.go(DBPort.java:142)&lt;br/&gt;
	at com.mongodb.DBPort.call(DBPort.java:92)&lt;br/&gt;
	at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244)&lt;br/&gt;
	at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)&lt;br/&gt;
	at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:262)&lt;br/&gt;
	at com.mongodb.DB.command(DB.java:244)&lt;br/&gt;
	at com.mongodb.DBCollection.getCount(DBCollection.java:985)&lt;br/&gt;
	at com.mongodb.DBCursor.size(DBCursor.java:602)&lt;br/&gt;
	at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:271)&lt;br/&gt;
	at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93)&lt;br/&gt;
	at sun.reflect.GeneratedMethodAccessor6078.invoke(Unknown Source)&lt;br/&gt;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
	at java.lang.reflect.Method.invoke(Method.java:483)&lt;br/&gt;
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358)&lt;br/&gt;
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343)&lt;br/&gt;
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;br/&gt;
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)&lt;br/&gt;
	at com.sun.proxy.$Proxy586.findAll(Unknown Source)&lt;br/&gt;
----------------------------------------------------------------------------------------------------&lt;/li&gt;
	&lt;li&gt;The code about connecting MongoDB is not different. Here is the code.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;MongoClientOptions options = MongoClientOptions.builder()&lt;br/&gt;
              .connectionsPerHost(50).build();&lt;br/&gt;
MongoClient client = new MongoClient(new ServerAddress(dbHost, dbPort), &lt;br/&gt;
					Arrays.asList(credential), options);&lt;br/&gt;
----------------------------------------------------------------------------------------------------&lt;br/&gt;
I can&apos;t even guess whether it&apos;s caused by a Network problem or a MongoDB java driver.&lt;/p&gt;

&lt;p&gt;This issue is really worrying..Please, help me.&lt;/p&gt;</description>
                <environment>mongo-java-driver-2.11.4.jar, Java 8, Tomcat 8, MongoDB 2.6.3</environment>
        <key id="167651">JAVA-1534</key>
            <summary>com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /ip:port b/c of error</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="okclaire">Claire Lee</reporter>
                        <labels>
                            <label>com.mongodb.DBPortPool</label>
                            <label>connection</label>
                            <label>socket</label>
                    </labels>
                <created>Thu, 6 Nov 2014 12:11:01 +0000</created>
                <updated>Wed, 11 Sep 2019 19:11:37 +0000</updated>
                            <resolved>Fri, 7 Nov 2014 01:45:57 +0000</resolved>
                                    <version>2.11.4</version>
                                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="814144" author="ross@10gen.com" created="Tue, 27 Jan 2015 08:54:58 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=huoyingoo&quot; class=&quot;user-hover&quot; rel=&quot;huoyingoo&quot;&gt;huoyingoo&lt;/a&gt; this ticket has been closed.&lt;/p&gt;

&lt;p&gt;Please can you post your question to the mongodb &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;user forum&lt;/a&gt;. It&apos;s a better place for your question and hopefully you&apos;ll get the answers you need there.  Please remember to provide as much information as you can eg what driver version, mongodb version etc..&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                            <comment id="814138" author="huoyingoo" created="Tue, 27 Jan 2015 08:23:10 +0000"  >&lt;p&gt;I have met this exception too.and can not find some solution,while i open a page for a long time and no operation,and then request the connection to mongodb,it&apos;s probably happend.but the service not down,refresh the page,it&apos;s working normally.&lt;/p&gt;

&lt;p&gt;it seems that after the mongodb server closed the a long connection,and mongo-java-driver dont know the current socket has been closed?&lt;/p&gt;</comment>
                            <comment id="758484" author="jeff.yemin" created="Fri, 7 Nov 2014 01:45:45 +0000"  >&lt;p&gt;Connection reset is a confusing message, but I can almost guarantee you that it&apos;s not something that the driver itself is responsible for.  Something is going on between your application and the MongoDB server its connected to that is resetting the socket.&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this issue unless you have any other questions about the driver itself.  In the future, please consider asking these types of questions in our &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;user forum&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="758250" author="okclaire" created="Thu, 6 Nov 2014 21:38:26 +0000"  >&lt;p&gt;Thank you for this comment. I cloned this issue mistakenly and it resulted in creating the issue (&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1535&quot; title=&quot;com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /ip:port b/c of error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1535&quot;&gt;&lt;del&gt;JAVA-1535&lt;/del&gt;&lt;/a&gt;). I am so sorry;; My purpose was to edit my issue, but I couldn&apos;t find Edit button;; Anyway, Can I ask you more about the issue? If there hasn&apos;t been any network issues between Tomcat Server and MongoDB server and MongoDB server never restarted, is there any possibility to occur this exception? Let me describe more details of this situation. The application has a scheduler to select a query to MongoDB every one minutes. When I checked the Tomcat server logs, it looked fine. But when I opened a web page, this exception occurred some times. If I reloaded the page and it opened and worked well. I googled this issue and found some articles (&lt;a href=&quot;http://realizeideas.net/blog/view/michael/Azure-MongoDB-on-EC2-Connection-reset&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://realizeideas.net/blog/view/michael/Azure-MongoDB-on-EC2-Connection-reset&lt;/a&gt; =&amp;gt; the environment is different to mine but I found &apos;The reason of this is that Azure has global firewall which kill all idle connections in pool that are older then about 3 min&apos; //  &lt;a href=&quot;https://forums.openshift.com/connection-reset-in-scale-app-and-spring-mongotemplate&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://forums.openshift.com/connection-reset-in-scale-app-and-spring-mongotemplate&lt;/a&gt;  -&amp;gt; &lt;a href=&quot;https://forums.openshift.com/connection-reset-in-scale-app-and-spring-mongotemplate&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://forums.openshift.com/connection-reset-in-scale-app-and-spring-mongotemplate&lt;/a&gt;   =&amp;gt; it suggests to use Spring Retry advice. // &lt;a href=&quot;https://developer.ibm.com/answers/questions/8576/mongodb-emptying-dbportpool-to-ip-port-b-c-of-error-ioexception-authenticating-the-connection.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://developer.ibm.com/answers/questions/8576/mongodb-emptying-dbportpool-to-ip-port-b-c-of-error-ioexception-authenticating-the-connection.html&lt;/a&gt;  =&amp;gt; It says &apos;The behavior I have seen on the mongodb server after 100 connections is to first accept then immediately close a handful of connections, then shutdown,&apos;) All articles made me more confused; I will ask the MongoDB administrator about the network status when the exception occurred but I really want to clarify  the possible cause and eliminate my confusion. Thank you very much for your attention to this issue. &lt;/p&gt;</comment>
                            <comment id="757693" author="jeff.yemin" created="Thu, 6 Nov 2014 14:11:44 +0000"  >&lt;p&gt;The is due to a network error, as evidenced by the &quot;SocketException: Connection reset&quot;.  This socket exception occurred while executing a count command against the server.  The most common cause is that the MongoDB server (or a router sitting between the application and the MongoDB server) closed the connection.  This can happen, for example, if the MongoDB server is restarted.&lt;/p&gt;

&lt;p&gt;I suggest checking the server logs to see if you can find any correlating messages at the time of the log message in the Tomcat application.&lt;/p&gt;


</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs3ptz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>146564</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>