<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:50 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-1113] Connections to failed primary replica left in CLOSE_WAIT state</title>
                <link>https://jira.mongodb.org/browse/JAVA-1113</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;To recreate:&lt;/p&gt;

&lt;p&gt;1.  Create a 3 node replica set (2 data nodes and 1 arbiter).&lt;br/&gt;
2.  Start up an application using the mongodb driver with connections to the replica set.&lt;br/&gt;
3.  Kill the primary&lt;br/&gt;
4.  Allow the driver to detect that the primary is down&lt;br/&gt;
4.  Start the primary again&lt;/p&gt;

&lt;p&gt;Run netstat -a | grep CLOSE_WAIT.  You should see that there are a couple connections left in the CLOSE_WAIT state for the server that had failed.  In the case where a host is detected down, these connections should be closed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="111137">JAVA-1113</key>
            <summary>Connections to failed primary replica left in CLOSE_WAIT state</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="clecompte">Chris LeCompte</reporter>
                        <labels>
                    </labels>
                <created>Sat, 15 Feb 2014 01:27:19 +0000</created>
                <updated>Tue, 23 Jun 2015 02:48:23 +0000</updated>
                            <resolved>Tue, 23 Jun 2015 02:48:23 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="677674" author="jeff.yemin" created="Thu, 31 Jul 2014 15:58:25 +0000"  >&lt;p&gt;Has anyone had a chance to test this with the 2.12 driver?  Please let me know, as I&apos;d like to resolve this issue if it&apos;s not reproducible in 2.12.3.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="562400" author="jeff.yemin" created="Fri, 25 Apr 2014 00:37:10 +0000"  >&lt;p&gt;I think what you are describing is a different issue, but before filing it, I encourage you to try out the 2.12.0 driver, which contains a substantially improved replica set monitor.  For a list of improvements and bug fixes, use this filter: &lt;a href=&quot;https://jira.mongodb.org/issues/?jql=project%20%3D%20JAVA%20AND%20fixVersion%20%3D%20%222.12.0%22%20AND%20component%20%3D%20%22Cluster%20Management%22&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/issues/?jql=project%20%3D%20JAVA%20AND%20fixVersion%20%3D%20%222.12.0%22%20AND%20component%20%3D%20%22Cluster%20Management%22&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="562382" author="jasonmccay" created="Fri, 25 Apr 2014 00:08:25 +0000"  >&lt;p&gt;Jeff ... thank you for your response.&lt;/p&gt;

&lt;p&gt;By &quot;application crashed&quot; ... he received connection errors and his application stopped working because of failure to communicate to his replica set. So, according to his assessment ... he tested stepdown/state change events with all members of the replica set online and his application reconnected to the new primary normally.&lt;/p&gt;

&lt;p&gt;However, if a set member was completely unavailable (offline), then his driver failed ... probably timed out because it could not talk to that member.&lt;/p&gt;

&lt;p&gt;We have seen this behavior with other mongo drivers (for other languages) ... where the driver can handle state change, but cannot handle members falling out of the set. Everything halts while it attempts to connect to all members or it doesn&apos;t understand the error message, or something.&lt;/p&gt;

&lt;p&gt;There was a recent regression fixed in Moped for this. Just to confirm ... if I have gotten way out of the bounds of this ticket, I will go open a new one. Just say the word. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;/p&gt;</comment>
                            <comment id="562369" author="jeff.yemin" created="Thu, 24 Apr 2014 23:50:55 +0000"  >&lt;p&gt;Hi Jason,&lt;/p&gt;

&lt;p&gt;What do you mean when you say the application crashed?  Do you mean that the JVM crashed or just that an exception was thrown?  Do you have a stack trace or any additional information that could shed light on the root cause?  &lt;/p&gt;

&lt;p&gt;The experience of your customer sounds quite different to what is described in the description of this issue, so I would suggest opening a new issue.&lt;/p&gt;</comment>
                            <comment id="562307" author="jasonmccay" created="Thu, 24 Apr 2014 22:38:53 +0000"  >&lt;p&gt;I am jumping on this ticket because this issue sounds somewhat similar to something one of our customers experienced today. The customer claimed that they had extensively tested replica set failovers and they worked properly.&lt;/p&gt;

&lt;p&gt;However, today, one of the members of the replica set became completely unavailable (as in ... server down) and, when that happened, the driver failed to connect properly to the available member of the replica set (that had become primary) and the customer&apos;s application crashed.&lt;/p&gt;

&lt;p&gt;Customer driver information:&lt;/p&gt;

&lt;p&gt;&amp;lt;dependency&amp;gt;&lt;br/&gt;
&amp;lt;groupId&amp;gt;org.mongodb&amp;lt;/groupId&amp;gt;&lt;br/&gt;
&amp;lt;artifactId&amp;gt;mongo-java-driver&amp;lt;/artifactId&amp;gt;&lt;br/&gt;
&amp;lt;version&amp;gt;2.11.4&amp;lt;/version&amp;gt;&lt;br/&gt;
&amp;lt;/dependency&amp;gt;&lt;/p&gt;</comment>
                            <comment id="542418" author="jeff.yemin" created="Wed, 9 Apr 2014 16:35:29 +0000"  >&lt;p&gt;Hi Chris,&lt;/p&gt;

&lt;p&gt;Checking back with you once more before closing this ticket.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="524975" author="jeff.yemin" created="Thu, 27 Mar 2014 18:59:08 +0000"  >&lt;p&gt;Hi Chris,&lt;/p&gt;

&lt;p&gt;If I&apos;m understanding the issue correctly, there may be a way to handle this using the new maxConnectionIdleTime setting, in which you can specify a maximum idle time for pooled connections.&lt;/p&gt;

&lt;p&gt;A background thread, which kicks off once per minute, closes any pooled connections that have been idle longer than the specified value. &lt;/p&gt;

&lt;p&gt;Please let me know if this satisfies your requirement.&lt;/p&gt;</comment>
                            <comment id="499798" author="clecompte" created="Sat, 15 Feb 2014 01:28:15 +0000"  >&lt;p&gt;Note this is with version 2.11.3 of the java driver.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="58762">JAVA-710</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|hrgal3:</customfieldvalue>

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