<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:55:06 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-1635] Authentication can initially fail when connecting to a replica set when seed list host names do not match replica set host names</title>
                <link>https://jira.mongodb.org/browse/JAVA-1635</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;This bug was introduced recently in 2.13 when the driver added support for dynamically determining which authentication mechanism to use when none is provided.  Consider the following sequence of events:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Replica set created with host names a, b, c&lt;/li&gt;
	&lt;li&gt;MongoClient created with seed list a1, b1, c1&lt;/li&gt;
	&lt;li&gt;Application thread executes an query against a secondary&lt;/li&gt;
	&lt;li&gt;Application thread waits for a secondary&lt;/li&gt;
	&lt;li&gt;Monitor thread notifies that a1 is secondary&lt;/li&gt;
	&lt;li&gt;Application thread selects the a1 server&lt;/li&gt;
	&lt;li&gt;Application thread gets a connection to a1&lt;/li&gt;
	&lt;li&gt;Monitor thread notifies that b1 is primary, and hosts list is actually a, b, c.  So a1, b1, c1 are removed from the cluster description&lt;/li&gt;
	&lt;li&gt;Application thread tries to get a1&apos;s server description from the cluster description, assuming that it must still be there, but as it&apos;s been removed, it gets null.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Result is:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;java.lang.NullPointerException&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	at com.mongodb.DBPort.authenticate(DBPort.java:367)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	at com.mongodb.DBPort.checkAuth(DBPort.java:402)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:289)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;	at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:269)&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt; 

&lt;p&gt;&lt;b&gt;Workaround:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Use the same host names in the MongoClient seed list as are used in the replica set configuration&lt;/p&gt;</description>
                <environment></environment>
        <key id="181172">JAVA-1635</key>
            <summary>Authentication can initially fail when connecting to a replica set when seed list host names do not match replica set host names</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="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Jan 2015 02:09:34 +0000</created>
                <updated>Thu, 29 Jan 2015 14:33:13 +0000</updated>
                            <resolved>Wed, 28 Jan 2015 16:34:24 +0000</resolved>
                                                    <fixVersion>2.13.0</fixVersion>
                                    <component>Cluster Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="816400" author="jeff.yemin" created="Thu, 29 Jan 2015 14:33:13 +0000"  >&lt;p&gt;2.13.0 has been released.  Closing issue.&lt;/p&gt;</comment>
                            <comment id="816137" author="xgen-internal-githook" created="Thu, 29 Jan 2015 04:16:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: Improve the error handling in DBPort.ensureOpen when calling the buildInfo command&lt;/p&gt;

&lt;p&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1635&quot; title=&quot;Authentication can initially fail when connecting to a replica set when seed list host names do not match replica set host names&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1635&quot;&gt;&lt;del&gt;JAVA-1635&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/56e903737f6deadbdabef47d243211adf6304b98&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/56e903737f6deadbdabef47d243211adf6304b98&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="815500" author="xgen-internal-githook" created="Wed, 28 Jan 2015 16:43:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: ServerMonitor now only calls buildInfo once for each established connection.&lt;/p&gt;

&lt;p&gt;  &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1635&quot; title=&quot;Authentication can initially fail when connecting to a replica set when seed list host names do not match replica set host names&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1635&quot;&gt;&lt;del&gt;JAVA-1635&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/6a58c6db0f123290093be521759e0aaa8bd45ffe&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/6a58c6db0f123290093be521759e0aaa8bd45ffe&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="815499" author="xgen-internal-githook" created="Wed, 28 Jan 2015 16:43:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: A pooled DBPort instance now determines its own server version&lt;/p&gt;

&lt;p&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1635&quot; title=&quot;Authentication can initially fail when connecting to a replica set when seed list host names do not match replica set host names&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1635&quot;&gt;&lt;del&gt;JAVA-1635&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/8b5e41515c6eafd9789bcedaa2e5d550b4c56c30&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/8b5e41515c6eafd9789bcedaa2e5d550b4c56c30&lt;/a&gt;&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|hs5tw7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>159136</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="371">Java Sprint 14</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>