<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:14:49 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-7539] singleShard error in addUser</title>
                <link>https://jira.mongodb.org/browse/SERVER-7539</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Hi there!&lt;br/&gt;
I am trying to create a user with the same name after dropping the database. Physically, there is no users in this database on mongod on the other shard. As a result of the following command, user is created only on the one shard, and applications throws unauthorised exceptions.&lt;br/&gt;
mongos&amp;gt;db.addUser(&quot;app&quot;,&quot;xxx&quot;){&lt;br/&gt;
	&quot;singleShard&quot; : &quot;mongodb-sh2/mongodb02d.load.net:27017,mongodb02f.load.net:27017,mongodb02g.load.net:27017&quot;,&lt;br/&gt;
	&quot;n&quot; : 0,&lt;br/&gt;
	&quot;lastOp&quot; : NumberLong(&quot;5806174783460605953&quot;),&lt;br/&gt;
	&quot;connectionId&quot; : 98514,&lt;br/&gt;
	&quot;err&quot; : null,&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;br/&gt;
{&lt;br/&gt;
	&quot;user&quot; : &quot;app&quot;,&lt;br/&gt;
	&quot;readOnly&quot; : false,&lt;br/&gt;
	&quot;pwd&quot; : &quot;9a72265ed14a1f833604151e412894d4&quot;,&lt;br/&gt;
	&quot;_id&quot; : ObjectId(&quot;5093ad34b969a220a604e226&quot;)&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment></environment>
        <key id="55088">SERVER-7539</key>
            <summary>singleShard error in addUser</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="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="gabol">Anton V. Volokhov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Nov 2012 11:29:57 +0000</created>
                <updated>Fri, 8 Mar 2013 15:55:42 +0000</updated>
                            <resolved>Sun, 6 Jan 2013 17:53:15 +0000</resolved>
                                    <version>2.0.7</version>
                                                    <component>Security</component>
                    <component>Sharding</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="232480" author="spencer" created="Sun, 6 Jan 2013 17:53:15 +0000"  >&lt;p&gt;Great, glad to hear you were able to get everything working.&lt;/p&gt;</comment>
                            <comment id="232379" author="gabol" created="Sun, 6 Jan 2013 14:10:19 +0000"  >&lt;p&gt;No, fixed with recreating the user. Possibly, the problem was with the second shard, which was terribly lagging.&lt;/p&gt;</comment>
                            <comment id="231127" author="spencer" created="Fri, 4 Jan 2013 18:56:06 +0000"  >&lt;p&gt;Hi Anton,&lt;br/&gt;
Is this still causing you a problem?  Does this happen every time you try to add a user to this database?  When you query this database&apos;s system.users collection, do you see the user you tried to create showing up?&lt;/p&gt;</comment>
                            <comment id="181965" author="gabol" created="Fri, 2 Nov 2012 16:50:02 +0000"  >&lt;p&gt;I&apos;m using mongodb 2.0.7&lt;br/&gt;
I had an authentication with username &quot;app&quot; and password, say, &quot;foo&quot; for database &quot;rating&quot;.&lt;br/&gt;
My apps worked with this credentials correctly.&lt;br/&gt;
Then I dropped this database, recreated and partitioned it.&lt;br/&gt;
Then I tried to add a user with the same login and password, and I saw mentioned output.&lt;br/&gt;
Ant at the same time my apps started to throw unauthorised exception.&lt;br/&gt;
When I add this user to another partitioned database I have a following output:&lt;/p&gt;
{ &quot;user&quot; : &quot;app&quot;, &quot;readOnly&quot; : false, &quot;pwd&quot; : &quot;9a72265ed14a1f833604151e412894d4&quot;, &quot;_id&quot; : ObjectId(&quot;5093ad34b969a220a604e226&quot;) }

&lt;p&gt;without strange &lt;/p&gt;
{ &quot;singleShard&quot; : &quot;mongodb-sh2/mongodb02d.load.net:27017,mongodb02f.load.net:27017,mongodb02g.load.net:27017&quot;, &quot;n&quot; : 0, &quot;lastOp&quot; : NumberLong(&quot;5806174783460605953&quot;), &quot;connectionId&quot; : 98514, &quot;err&quot; : null, &quot;ok&quot; : 1 }</comment>
                            <comment id="181959" author="spencer" created="Fri, 2 Nov 2012 16:42:22 +0000"  >&lt;p&gt;Hi Anton,&lt;br/&gt;
I&apos;m not sure I understand exactly what the problem is that you&apos;re seeing.  When you add users to a database (other than admin or config) in a sharded system, the users get added on the primary shard for that database and not to the other shards.  That is expected behavior.&lt;/p&gt;

&lt;p&gt;Are you also having problems authenticating?  You will need to run db.auth(&amp;lt;username&amp;gt;, &amp;lt;password&amp;gt;) on any new connection you make to a mongos running with security enabled.  Did you get an error running db.auth?  What version of mongodb are you using?&lt;/p&gt;

&lt;p&gt;If you haven&apos;t already, I recommend reading through our documentation on our authentication system &lt;a href=&quot;http://docs.mongodb.org/manual/administration/security/#authentication&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/control-access-to-mongodb-with-authentication/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="181839" author="gabol" created="Fri, 2 Nov 2012 12:16:04 +0000"  >&lt;p&gt;a bit of logs from mongos&lt;/p&gt;

&lt;p&gt;Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; Request::process ns: rating.$cmd msg id:4664 attempt: 0&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; single query: rating.$cmd  &lt;/p&gt;
{ getnonce: 1 }
&lt;p&gt;  ntoreturn: -1 options : 4&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; Request::process ns: rating.$cmd msg id:4665 attempt: 0&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; single query: rating.$cmd  &lt;/p&gt;
{ authenticate: 1, user: &quot;app&quot;, nonce: &quot;be4258d1b4d8a815&quot;, key: &quot;bd790de336213f242ccdaa2a649585b9&quot; }
&lt;p&gt;  ntoreturn: -1 options : 4&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt;  authenticate: &lt;/p&gt;
{ authenticate: 1, user: &quot;app&quot;, nonce: &quot;be4258d1b4d8a815&quot;, key: &quot;bd790de336213f242ccdaa2a649585b9&quot; }
&lt;p&gt;Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; auth: couldn&apos;t find user app, rating.system.users&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; Request::process ns: rating.system.indexes msg id:4666 attempt: 0&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; single query: rating.system.indexes  { query: { name: &quot;_url_1&quot;, ns: &quot;rating.entity&quot;, key: &lt;/p&gt;
{ _url: 1 }
&lt;p&gt; }, $readPreference: &lt;/p&gt;
{ mode: &quot;secondaryPreferred&quot; }
&lt;p&gt; }  ntoreturn: -1 options : 4&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; User Assertion: 15845:unauthorized&lt;br/&gt;
Fri Nov  2 15:23:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn973&amp;#93;&lt;/span&gt; AssertionException while processing op type : 2004 to : rating.system.indexes :: caused by :: 15845 unauthorized&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 2 Nov 2012 14:43:18 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 6 weeks, 3 days 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, 6 weeks, 3 days 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>gabol</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnj4v:</customfieldvalue>

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

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

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