<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:01:00 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>[SERVER-2718] Can&apos;t add replica to set when it is not already in config</title>
                <link>https://jira.mongodb.org/browse/SERVER-2718</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Start three nodes, add them to a replica set using the instructions on&lt;br/&gt;
&lt;a href=&quot;http://www.mongodb.org/display/DOCS/Replica+Set+Tutorial&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Replica+Set+Tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we follow these steps to add a new member from a backup:&lt;br/&gt;
&lt;a href=&quot;http://www.mongodb.org/display/DOCS/Adding+a+New+Set+Member&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.mongodb.org/display/DOCS/Adding+a+New+Set+Member&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But it doesn&apos;t go as well as the docs suggest. Here&apos;s what happens.&lt;/p&gt;

&lt;p&gt;Create a new data directory /data/r3 and copy files from another mongod&apos;s data directory. Start up a new node using &lt;/p&gt;

&lt;p&gt;mongod --replSet foo --port 27020 --dbpath /data/r3 --fastsync&lt;/p&gt;

&lt;p&gt;This new mongod will log an error about not being in the replica set config. This error looks like (from Windows binary):&lt;/p&gt;

&lt;p&gt;Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet error can&apos;t find self in the repl set configuration:&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; { _id: &quot;foo&quot;, version: 1, members: [ &lt;/p&gt;
{ _id: 0, host: &quot;localhost:27017&quot; }
&lt;p&gt;, &lt;/p&gt;
{ _id: 1,
host: &quot;localhost:27018&quot; }
&lt;p&gt;, &lt;/p&gt;
{ _id: 2, host: &quot;localhost:27019&quot; }
&lt;p&gt; ] }&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt;   Assertion failure false db\repl\rs.cpp 336&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet error loading configurations 0 assertion db\repl\rs.cpp:336&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet error replication will not start&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet error loading set config&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet error fatal, stopping replication&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet ~RSBase called&lt;br/&gt;
Tue Mar 08 22:39:15 &lt;span class=&quot;error&quot;&gt;&amp;#91;startReplSets&amp;#93;&lt;/span&gt; replSet caught exception in startReplSets thread: assertion db\repl\rs.cpp:336&lt;/p&gt;

&lt;p&gt;Ok, well then maybe we just need to do rs.add(&quot;localhost:27020&quot;) from the master. Do that, restart the new mongod, it still fails with the same error. Now what?&lt;/p&gt;

&lt;p&gt;Is the implication here that you can only restore from backups that include the new set member in the replica set config &lt;b&gt;before&lt;/b&gt; taking the backup?&lt;/p&gt;</description>
                <environment></environment>
        <key id="15052">SERVER-2718</key>
            <summary>Can&apos;t add replica to set when it is not already in config</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="3">Duplicate</resolution>
                                        <assignee username="kristina">Kristina Chodorow</assignee>
                                    <reporter username="andrew311">Andrew</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Mar 2011 04:06:04 +0000</created>
                <updated>Fri, 30 Mar 2012 14:24:30 +0000</updated>
                            <resolved>Fri, 11 Mar 2011 21:34:38 +0000</resolved>
                                    <version>1.6.5</version>
                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="25579" author="andrew311" created="Wed, 9 Mar 2011 04:35:56 +0000"  >&lt;p&gt;The only workaround I can find is to do the following:&lt;/p&gt;

&lt;p&gt;== On the original master ==&lt;br/&gt;
1) rs.add(&quot;localhost:27020&quot;)&lt;/p&gt;

&lt;p&gt;2) Copy the Javascript blob you get from rs.conf().&lt;/p&gt;

&lt;p&gt;== Now on the new node ==&lt;br/&gt;
3) use local;&lt;br/&gt;
db.system.replset.update(&lt;/p&gt;
{&quot;_id&quot; : &quot;foo&quot;}
&lt;p&gt;, &amp;lt;paste conf blob from master here&amp;gt;);&lt;/p&gt;

&lt;p&gt;4) Restart the new node, it should now properly join the set.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="15051">SERVER-2717</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 50 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 50 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew311</customfieldvalue>
            <customfieldvalue>kristina</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp45z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hridnr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>20865</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0c4v:</customfieldvalue>

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