<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:10:10 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-5894] sharding failed after restarting mongo</title>
                <link>https://jira.mongodb.org/browse/SERVER-5894</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Assertion: 15927:can&apos;t open database in a read lock. if db was just closed, consider retrying the query. might otherwise indicate an internal error&lt;/p&gt;

&lt;p&gt;To reproduce do next actions:&lt;br/&gt;
0) mongo* running from mongodb:mongodb&lt;br/&gt;
1) mkdir /mongo/db/path/moveChunk &amp;amp;&amp;amp; chmod 700 /mongo/db/path/moveChunk &amp;amp;&amp;amp; sudo chown root:root /mongo/db/path/moveChunk&lt;br/&gt;
2) run sharding&lt;br/&gt;
   it will fail with the next message: ERROR: Uncaught std::exception: boost::filesystem::create_directory: Permission denied: &quot;/mnt/ongo/db/moveChunk&quot;, terminating&lt;br/&gt;
3) sudo chown mongodb:mongodb /mongo/db/path/moveChunk&lt;br/&gt;
4) restart mongodb&lt;br/&gt;
   And now we have such messages in lock, that it can&apos;t open database&lt;br/&gt;
5) If you run query to some of collections in this database (e.g. db.foo.findOne()), than this message disappear and migration is in progress&lt;/p&gt;</description>
                <environment>db version v2.1.1-pre-, pdfile version 4.5 &lt;br/&gt;
git version: a2d6f752d56aa446220b9f14c8ad3865c2fb5db8</environment>
        <key id="39320">SERVER-5894</key>
            <summary>sharding failed after restarting mongo</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="randolph@mongodb.com">Randolph Tan</assignee>
                                    <reporter username="azat">Azat Khuzhin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 May 2012 07:09:45 +0000</created>
                <updated>Wed, 15 Aug 2012 14:04:15 +0000</updated>
                            <resolved>Wed, 18 Jul 2012 19:36:56 +0000</resolved>
                                    <version>2.1.1</version>
                                                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="144645" author="renctan" created="Wed, 18 Jul 2012 19:36:38 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I created a new issue &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6511&quot; title=&quot;Handle errors gracefully when mongod don&amp;#39;t have the right permissions under the dbpath directory&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6511&quot;&gt;&lt;del&gt;SERVER-6511&lt;/del&gt;&lt;/a&gt; for this bug. Thanks for reporting.&lt;/p&gt;</comment>
                            <comment id="126936" author="azat" created="Wed, 6 Jun 2012 09:34:16 +0000"  >&lt;p&gt;And if this directory creates only in &quot;Helpers::removeRange&quot; how it is possible, that you get an error in &quot;addShard&quot; command&lt;br/&gt;
&quot;addShard&quot; not doing any migrate&lt;/p&gt;</comment>
                            <comment id="126376" author="renctan" created="Tue, 5 Jun 2012 14:37:46 +0000"  >&lt;p&gt;Search for Helpers::removeRange (defined in src/mongo/db/dbhelpers.cpp) in src/mongo/s/d_migrate.cpp to look for the source that creates the moveChunk directory. The moveChunk directory is created unless you passed --noMoveParanoia.&lt;/p&gt;

&lt;p&gt;I have misunderstood your procedure and I&apos;ll try it again.&lt;/p&gt;
</comment>
                            <comment id="126365" author="azat" created="Tue, 5 Jun 2012 14:20:32 +0000"  >&lt;p&gt;I mean files and lines (e.g. src/mongo/foobar.cpp:100, src/mongo/foobar2.cpp:102), at which &quot;moveChunk&quot; folder is created&lt;/p&gt;

&lt;p&gt;In original procedure &quot;addShard&quot; executed, when folder &quot;moveChunk&quot; have not corret grants (0700, and owner not mongodb)&lt;br/&gt;
While here I ask you:&lt;br/&gt;
1) set right grants for &quot;moveChunk&quot; folder&lt;br/&gt;
2) run &quot;addShard&quot;&lt;br/&gt;
3) restore previous grants for &quot;moveChunk&quot; folder&lt;br/&gt;
4) run origin steps 2-5&lt;/p&gt;</comment>
                            <comment id="126345" author="renctan" created="Tue, 5 Jun 2012 13:55:53 +0000"  >&lt;p&gt;What did you mean by moveChunk create? Are you asking where to find the code for the source (It is actually a multi-stage process and involves a couple of classes)?&lt;/p&gt;


&lt;p&gt;Isn&apos;t that the same as your original procedure? Am I missing something?&lt;/p&gt;</comment>
                            <comment id="126167" author="azat" created="Tue, 5 Jun 2012 08:19:35 +0000"  >&lt;p&gt;I use git commit a2d6f752d56aa446220b9f14c8ad3865c2fb5db8 for building&lt;br/&gt;
Maybe behavior changed?&lt;/p&gt;

&lt;p&gt;BTW can&apos;t find where &quot;moveChunk&quot; create, could you show me &lt;a href=&quot;file:line?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;file:line?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And could you try first set right grants for &quot;moveChunk&quot; directory, than run &quot;addShard&quot; command, then restore previous grants for &quot;moveChunk&quot; ?&lt;br/&gt;
And then run steps 2-5&lt;/p&gt;</comment>
                            <comment id="125679" author="renctan" created="Mon, 4 Jun 2012 14:08:13 +0000"  >&lt;p&gt;The exact same error message you posted in step 2: ERROR: Uncaught std::exception: boost::filesystem::create_directory.&lt;/p&gt;</comment>
                            <comment id="125632" author="azat" created="Mon, 4 Jun 2012 12:03:42 +0000"  >&lt;p&gt;Why it fails at &quot;addShard&quot; ?&lt;br/&gt;
What error message was?&lt;/p&gt;</comment>
                            <comment id="124115" author="renctan" created="Tue, 29 May 2012 23:18:07 +0000"  >&lt;p&gt;When I tried doing your steps, it fails in the addShard right away. And mongo does not retry that operation.&lt;/p&gt;</comment>
                            <comment id="123385" author="azat" created="Sat, 26 May 2012 14:45:32 +0000"  >&lt;p&gt;I mean if I enable sharding, and stop server, after restart, sharding is enabled.&lt;br/&gt;
Maybe you mean that moveChunk is not retry on error?&lt;/p&gt;</comment>
                            <comment id="123144" author="renctan" created="Fri, 25 May 2012 15:45:53 +0000"  >&lt;p&gt;No. Mongo doesn&apos;t retry on error (only on very special cases, like StaleConfigException).&lt;/p&gt;</comment>
                            <comment id="123139" author="azat" created="Fri, 25 May 2012 15:41:50 +0000"  >&lt;p&gt;No I don&apos;t repeat step 2 after step 4, mongo automatically continue sharding after restart (no ?)&lt;br/&gt;
By &quot;migration is in progress&quot; I mean that &quot;moveChunk&quot; command successfully started, finished, and so on.&lt;/p&gt;</comment>
                            <comment id="122760" author="renctan" created="Thu, 24 May 2012 15:43:05 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I tried reproducing this with no success. I have some clarifications regarding you steps. Did you repeat step 2 after step 4? What did you mean by &quot;migration is in progress&quot;?&lt;/p&gt;</comment>
                            <comment id="122020" author="azat" created="Tue, 22 May 2012 19:17:38 +0000"  >&lt;p&gt;I can&apos;t, already shutdown ec2 instance (and all data is erased)&lt;/p&gt;</comment>
                            <comment id="121989" author="renctan" created="Tue, 22 May 2012 18:22:54 +0000"  >&lt;p&gt;Can you attach the mongos and mongod logs?&lt;/p&gt;</comment>
                            <comment id="121987" author="azat" created="Tue, 22 May 2012 18:17:56 +0000"  >&lt;p&gt;As I understand:&lt;/p&gt;

&lt;p&gt;The thing is that, &quot;mongos&quot; can&apos;t open database itself.&lt;br/&gt;
It needs to some of clients open it&lt;/p&gt;</comment>
                            <comment id="121985" author="azat" created="Tue, 22 May 2012 18:16:25 +0000"  >&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;0) it means that you run mongodb from user mongodb, group mongodb (debian /etc/init.d/mongodb start)&lt;br/&gt;
By default it runs like this&lt;br/&gt;
2)&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;sh.addShard(...);&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;....&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;sh.addShard(...);&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;&amp;nbsp;&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;sh.enableSharding(&quot;database&quot;);&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;sh.shardCollection(&quot;database.collection&quot;);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="121906" author="renctan" created="Tue, 22 May 2012 15:17:16 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Would you mind clarifying some of the steps?&lt;/p&gt;

&lt;p&gt;For example, I don&apos;t understand what step 0 and step 2 means.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="44722">SERVER-6511</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>18.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 22 May 2012 15:17:16 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 31 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>
                            11 years, 31 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>azat</customfieldvalue>
            <customfieldvalue>randolph@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hro2c7:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23028</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|ht09zj:</customfieldvalue>

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