<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:54:11 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-1260] Error connecting to secondary when there is no member with _id: 1</title>
                <link>https://jira.mongodb.org/browse/JAVA-1260</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;It looks as if the driver is unable to connect to secondary if the replica set member id&apos;s dont follow a continuous order from _id: 0. Sometimes I use a read preference of &apos;nearest&apos; when calling the java driver.&lt;/p&gt;

&lt;p&gt;Through removal and addition of replica members, I found myself with the following replicaset config:&lt;/p&gt;

&lt;p&gt;&quot;_id&quot; : &quot;rs0&quot;,&lt;br/&gt;
        &quot;version&quot; : 29,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 4,
                        &quot;host&quot; : &quot;54.209.160.30:27017&quot;
                }
&lt;p&gt;,&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 5,
                        &quot;host&quot; : &quot;54.186.49.236:27017&quot;,
                        &quot;priority&quot; : 3
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 6,
                        &quot;host&quot; : &quot;54.187.243.162:27017&quot;,
                        &quot;arbiterOnly&quot; : true
                }
&lt;p&gt;        ]&lt;/p&gt;

&lt;p&gt;I noticed that in the logs of the primary, the continuous repetition of the following:&lt;/p&gt;

&lt;p&gt;2014-05-30T00:01:09.050+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; connection accepted from 54.209.160.30:59140 #523020 (18 connections now open)&lt;br/&gt;
2014-05-30T00:01:09.293+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn523020&amp;#93;&lt;/span&gt;  authenticate db: local &lt;/p&gt;
{ authenticate: 1, nonce: &quot;xxx&quot;, user: &quot;__system&quot;, key: &quot;xxx&quot; }
&lt;p&gt;2014-05-30T00:01:09.453+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn523020&amp;#93;&lt;/span&gt; replset couldn&apos;t find a slave with id 1, not tracking 53692f8a311b1b09a941a1c3&lt;br/&gt;
2014-05-30T00:01:09.533+0000 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn523020&amp;#93;&lt;/span&gt; end connection 54.209.160.30:59140 (17 connections now open)&lt;/p&gt;

&lt;p&gt;The logging statement are the only symptom of the issue. I have not noticed any connectivity problem from the java application. I dont knowif the driver is actually finding the &apos;nearest&apos; replica member or just choosing primary due to this issue.&lt;/p&gt;</description>
                <environment>three member replica set with 1 arbiter</environment>
        <key id="139380">JAVA-1260</key>
            <summary>Error connecting to secondary when there is no member with _id: 1</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="bamaro">bamaro</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 May 2014 19:19:30 +0000</created>
                <updated>Tue, 10 Jun 2014 17:15:02 +0000</updated>
                            <resolved>Tue, 10 Jun 2014 17:15:02 +0000</resolved>
                                    <version>2.12.2</version>
                                                    <component>Connection Management</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="602907" author="bamaro" created="Fri, 30 May 2014 19:50:06 +0000"  >&lt;p&gt;Sorry, I dont. Sure, I just put this up as a courtesy.&lt;/p&gt;</comment>
                            <comment id="602905" author="jeff.yemin" created="Fri, 30 May 2014 19:48:19 +0000"  >&lt;p&gt;ReadPreference.nearest() can go to the primary anyway.  To test whether there is really a problem, you&apos;d need to have used ReadPreference.secondary().  From the shell output, with ReadPreference.seconary() the driver should have sent query traffic to 54.209.160.30, assuming it was a healthy secondary.  You wouldn&apos;t happen to have ismaster() from that server, would you?&lt;/p&gt;

&lt;p&gt;Either way, I think this can be closed.  Do you agree?&lt;/p&gt;</comment>
                            <comment id="602900" author="bamaro" created="Fri, 30 May 2014 19:45:04 +0000"  >&lt;p&gt;Hi Jeff, I have already fixed the problem by removing and adding replicasets and manually setting new _id&apos;s. However, I still have output from when I was still troubleshooting:&lt;/p&gt;

&lt;p&gt;rs0:PRIMARY&amp;gt; db.isMaster()&lt;br/&gt;
{&lt;br/&gt;
        &quot;setName&quot; : &quot;rs0&quot;,&lt;br/&gt;
        &quot;setVersion&quot; : 29,&lt;br/&gt;
        &quot;ismaster&quot; : true,&lt;br/&gt;
        &quot;secondary&quot; : false,&lt;br/&gt;
        &quot;hosts&quot; : [&lt;br/&gt;
                &quot;54.186.49.236:27017&quot;,&lt;br/&gt;
                &quot;54.209.160.30:27017&quot;&lt;br/&gt;
        ],&lt;br/&gt;
        &quot;arbiters&quot; : [&lt;br/&gt;
                &quot;54.187.243.162:27017&quot;&lt;br/&gt;
        ],&lt;br/&gt;
        &quot;primary&quot; : &quot;54.186.49.236:27017&quot;,&lt;br/&gt;
        &quot;me&quot; : &quot;54.186.49.236:27017&quot;,&lt;br/&gt;
        &quot;maxBsonObjectSize&quot; : 16777216,&lt;br/&gt;
        &quot;maxMessageSizeBytes&quot; : 48000000,&lt;br/&gt;
        &quot;maxWriteBatchSize&quot; : 1000,&lt;br/&gt;
        &quot;localTime&quot; : ISODate(&quot;2014-05-30T19:37:58.602Z&quot;),&lt;br/&gt;
        &quot;maxWireVersion&quot; : 2,&lt;br/&gt;
        &quot;minWireVersion&quot; : 0,&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;rs0:PRIMARY&amp;gt; rs.status()&lt;br/&gt;
{&lt;br/&gt;
        &quot;set&quot; : &quot;rs0&quot;,&lt;br/&gt;
        &quot;date&quot; : ISODate(&quot;2014-05-30T19:37:38Z&quot;),&lt;br/&gt;
        &quot;myState&quot; : 1,&lt;br/&gt;
        &quot;members&quot; : [&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 5,
                        &quot;name&quot; : &quot;54.186.49.236:27017&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 1,
                        &quot;stateStr&quot; : &quot;PRIMARY&quot;,
                        &quot;uptime&quot; : 2518,
                        &quot;optime&quot; : Timestamp(1401476405, 1),
                        &quot;optimeDate&quot; : ISODate(&quot;2014-05-30T19:00:05Z&quot;),
                        &quot;electionTime&quot; : Timestamp(1401476280, 1),
                        &quot;electionDate&quot; : ISODate(&quot;2014-05-30T18:58:00Z&quot;),
                        &quot;self&quot; : true
                }
&lt;p&gt;,&lt;br/&gt;
                &lt;/p&gt;
{
                        &quot;_id&quot; : 4,
                        &quot;name&quot; : &quot;54.209.160.30:27017&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 2,
                        &quot;stateStr&quot; : &quot;SECONDARY&quot;,
                        &quot;uptime&quot; : 2302,
                        &quot;optime&quot; : Timestamp(1401476405, 1),
                        &quot;optimeDate&quot; : ISODate(&quot;2014-05-30T19:00:05Z&quot;),
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2014-05-30T19:37:38Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2014-05-30T19:37:37Z&quot;),
                        &quot;pingMs&quot; : 80,
                        &quot;syncingTo&quot; : &quot;54.186.49.236:27017&quot;
                }
&lt;p&gt;,&lt;/p&gt;
                {
                        &quot;_id&quot; : 6,
                        &quot;name&quot; : &quot;54.187.243.162:27017&quot;,
                        &quot;health&quot; : 1,
                        &quot;state&quot; : 7,
                        &quot;stateStr&quot; : &quot;ARBITER&quot;,
                        &quot;uptime&quot; : 2275,
                        &quot;lastHeartbeat&quot; : ISODate(&quot;2014-05-30T19:37:37Z&quot;),
                        &quot;lastHeartbeatRecv&quot; : ISODate(&quot;2014-05-30T19:37:37Z&quot;),
                        &quot;pingMs&quot; : 1
                }
&lt;p&gt;        ],&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="602882" author="jeff.yemin" created="Fri, 30 May 2014 19:31:54 +0000"  >&lt;p&gt;Can you run the following commands in a mongo shell connected to the primary:&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;&amp;gt; db.isMaster()&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;&amp;gt; rs.status()&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;and report the results in a comment?&lt;/p&gt;


&lt;p&gt;Thanks.&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|hrzai7:</customfieldvalue>

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