<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:59:14 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-3287] How to Configure MongoClient to connect to next available Mongos</title>
                <link>https://jira.mongodb.org/browse/JAVA-3287</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;We have two &lt;b&gt;Mongos&apos;&lt;/b&gt; running, and our web service is registered with two &lt;b&gt;Mongos&apos;&lt;/b&gt;&#160;in its connection string. Plz correct me if i am wrong, looks like the MongoClient will connect first&#160;&lt;b&gt;Mongos&lt;/b&gt;&#160;in the connection string.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;font color=&quot;#de350b&quot;&gt;Problem:&lt;/font&gt;&lt;/b&gt; When the first&#160;&lt;b&gt;Mongos&lt;/b&gt;&#160;is down, the MongoClient will not connect to next available &lt;b&gt;Mongos&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;font color=&quot;#00875a&quot;&gt;Expectation:&lt;/font&gt;&lt;/b&gt; We are not sure if this is possible, we are looking for some help to configure the MongoClient to connect to next available&#160;&lt;b&gt;Mongos&lt;/b&gt;&#160;when the&#160;&lt;b&gt;Mongos&lt;/b&gt;&#160;it&apos;s connected&#160;fails.&lt;/p&gt;</description>
                <environment></environment>
        <key id="768436">JAVA-3287</key>
            <summary>How to Configure MongoClient to connect to next available Mongos</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="schen@amica.com">shen Chen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 May 2019 20:05:41 +0000</created>
                <updated>Tue, 16 Nov 2021 15:55:44 +0000</updated>
                            <resolved>Mon, 20 May 2019 13:42:20 +0000</resolved>
                                                                    <component>Cluster Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2252431" author="jeff.yemin" created="Mon, 20 May 2019 13:42:20 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=shen915&quot; class=&quot;user-hover&quot; rel=&quot;shen915&quot;&gt;shen915&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It sounds like you have a connectivity problem with one of the mongos servers, and this is unlikely to be a problem specific to the Java driver.&lt;/p&gt;

&lt;p&gt;Just to let you know this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the &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;mongodb-user mailinglist&lt;/a&gt; or &lt;a href=&quot;http://stackoverflow.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;stackoverflow&lt;/a&gt; as you will reach a broader audience there.  If your business requires an answer from MongoDB within a time frame then we do offer &lt;a href=&quot;https://www.mongodb.com/products/production-support&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;production support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you do follow up via one of the options above please post a link and I will follow the conversation there.&lt;/p&gt;</comment>
                            <comment id="2251403" author="schen@amica.com" created="Sat, 18 May 2019 03:05:22 +0000"  >&lt;p&gt;Jeff, Thanks for the response.&lt;/p&gt;

&lt;p&gt;We are currently having an issue with one of our Mongos, when our service attempts to connect to this Mongos, it throws error: connection refused. Our service is constantly processing messages, but it kept on throwing error: connection refused from the same Mongos. The other Mongos is definitely working. We followed the recommendation from the MongoDB Connection String Documentation.&lt;/p&gt;

&lt;p&gt;Please let us know what info we need to provide for troubleshooting this.&lt;/p&gt;</comment>
                            <comment id="2249439" author="jeff.yemin" created="Thu, 16 May 2019 19:48:13 +0000"  >&lt;p&gt;MongoClient is design to connect to all mongos in the connection string, and balance the load across them.  &lt;/p&gt;

&lt;p&gt;Can you share any evidence you have to the contrary?&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|huox5z:</customfieldvalue>

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