<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:12:02 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-6549] The correct password may auth fail occasionally. </title>
                <link>https://jira.mongodb.org/browse/SERVER-6549</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have to use &quot;while&quot; for a connection auth, because some ratio to auth fail by using the same correct password.&lt;/p&gt;

&lt;p&gt;My code:&lt;br/&gt;
while (!conn.auth(&quot;admin&quot;, write_mongos_primary.usr, write_mongos_primary.pwd, errmsg, false)) {&lt;br/&gt;
    WriteLog(kLogWarning, &quot;&lt;span class=&quot;error&quot;&gt;&amp;#91;PhoneImport&amp;#93;&lt;/span&gt; auth failed: %s.&quot;, errmsg.c_str());&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;App program log&#65306;&lt;br/&gt;
WARNING: 07-21 01:34:35 &lt;span class=&quot;error&quot;&gt;&amp;#91;PhoneImport&amp;#93;&lt;/span&gt; auth failed: { errmsg: &quot;exception: SyncClusterConnection::insert prepare failed:  192.168.130.14:9001:&lt;/p&gt;
{ errmsg: &quot;need to login&quot;, ok: 0.0 }
&lt;p&gt; 192.168.130.15:9001:&lt;/p&gt;
{ errmsg: &quot;need...&quot;, code: 8003, ok: 0.0 }
&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;config mongod 1(192.168.130.14:9001) log:&lt;br/&gt;
Sat Jul 21 01:34:25 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn122&amp;#93;&lt;/span&gt; CMD fsync: sync:1 lock:0&lt;br/&gt;
Sat Jul 21 01:34:35 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2&amp;#93;&lt;/span&gt; end connection 192.168.130.14:11766 (96 connections now open)&lt;br/&gt;
Sat Jul 21 01:34:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn54&amp;#93;&lt;/span&gt; CMD fsync: sync:1 lock:0&lt;/p&gt;

&lt;p&gt;config mongod 2(192.168.130.15:9001) log:&lt;br/&gt;
Sat Jul 21 01:34:25 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn122&amp;#93;&lt;/span&gt; CMD fsync: sync:1 lock:0&lt;br/&gt;
Sat Jul 21 01:34:25 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn106&amp;#93;&lt;/span&gt; CMD fsync: sync:1 lock:0&lt;br/&gt;
Sat Jul 21 01:34:35 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn2&amp;#93;&lt;/span&gt; end connection 192.168.130.14:4131 (96 connections now open)&lt;br/&gt;
Sat Jul 21 01:34:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn54&amp;#93;&lt;/span&gt; CMD fsync: sync:1 lock:0&lt;br/&gt;
Sat Jul 21 01:34:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn42&amp;#93;&lt;/span&gt; CMD fsync: sync:1 lock:0&lt;/p&gt;

&lt;p&gt;mongos locate on 192.168.130.14&lt;/p&gt;</description>
                <environment>Ubuntu 12.04 LTS &lt;br/&gt;
Linux yz-uc-core-a08 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux</environment>
        <key id="45007">SERVER-6549</key>
            <summary>The correct password may auth fail occasionally. </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="xjtyfq">NOVALUE yangfenqiang</reporter>
                        <labels>
                            <label>connection</label>
                    </labels>
                <created>Sat, 21 Jul 2012 10:01:34 +0000</created>
                <updated>Mon, 11 Jul 2016 17:59:26 +0000</updated>
                            <resolved>Thu, 26 Jul 2012 16:22:50 +0000</resolved>
                                    <version>2.2.0-rc0</version>
                                    <fixVersion>2.2.0-rc1</fixVersion>
                                    <component>Security</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="147647" author="auto" created="Thu, 26 Jul 2012 16:21:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-07-26T08:42:27-07:00&apos;, u&apos;email&apos;: u&apos;spencer@10gen.com&apos;, u&apos;name&apos;: u&apos;Spencer T Brody&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6549&quot; title=&quot;The correct password may auth fail occasionally. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6549&quot;&gt;&lt;del&gt;SERVER-6549&lt;/del&gt;&lt;/a&gt;. Use internal permissions when ensuring index in authenticate command&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3e23612e277d68903f36a262c350b5512fcd5440&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3e23612e277d68903f36a262c350b5512fcd5440&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="147314" author="spencer" created="Wed, 25 Jul 2012 19:53:36 +0000"  >&lt;p&gt;Thank you for attaching the new logs and simplified test file, that&apos;s really helpful.  I noticed there are always 15 successful attempts before a failed attempt, and at every timestamp where there is a failed attempt there is a message in the mongos log that looks like &quot;scoped connection to 192.168.130.14:9001,192.168.130.15:9001,192.168.130.16:9001 not being returned to the pool&quot;.  I&apos;m going to take a look at the mongos code and continue investigating.  Thanks for your help bringing this issue to our attention!&lt;/p&gt;</comment>
                            <comment id="146434" author="xjtyfq" created="Tue, 24 Jul 2012 04:02:53 +0000"  >&lt;p&gt;Hi, Spencer:&lt;br/&gt;
I restart a mongodb cluster in order to get a more clean logs for auth test.&lt;br/&gt;
Attached files are the tiny full mongodb logs, my test program testAuth.cc and its log.&lt;/p&gt;</comment>
                            <comment id="146366" author="spencer" created="Mon, 23 Jul 2012 22:41:51 +0000"  >&lt;p&gt;I don&apos;t see any auth failure messages in the logs you attached, are you certain they&apos;re from a run that failed?&lt;/p&gt;</comment>
                            <comment id="145962" author="xjtyfq" created="Mon, 23 Jul 2012 06:40:50 +0000"  >&lt;p&gt;The full mongos and config server log is added.&lt;/p&gt;</comment>
                            <comment id="145960" author="xjtyfq" created="Mon, 23 Jul 2012 06:32:30 +0000"  >&lt;p&gt;Simple code for test auth. id.exe run same para (&quot;./id.exe 36308763&quot;) two times, but one auth failed.&lt;/p&gt;

&lt;p&gt;yz-uc-core-a04$ ./id.exe 98203809&lt;br/&gt;
uid:98203809&lt;br/&gt;
{}&lt;br/&gt;
yz-uc-core-a04$ ./id.exe 98471709&lt;br/&gt;
uid:98471709&lt;br/&gt;
{}&lt;br/&gt;
yz-uc-core-a04$ ./id.exe 74423418&lt;br/&gt;
uid:74423418&lt;br/&gt;
{}&lt;br/&gt;
yz-uc-core-a04$ ./id.exe 36308763&lt;br/&gt;
auth failed.{ errmsg: &quot;exception: SyncClusterConnection::insert prepare failed:  192.168.130.14:9001:&lt;/p&gt;
{ errmsg: &quot;need to login&quot;, ok: 0.0 }
&lt;p&gt; 192.168.130.15:9001:&lt;/p&gt;
{ errmsg: &quot;need...&quot;, code: 8003, ok: 0.0 }
&lt;p&gt;uid:36308763&lt;br/&gt;
terminate called after throwing an instance of &apos;mongo::UserException&apos;&lt;br/&gt;
  what():  nextSafe(): &lt;/p&gt;
{ $err: &quot;unauthorized for db:user level: 1&quot;, code: 15845 }
&lt;p&gt;Aborted (core dumped)&lt;br/&gt;
yz-uc-core-a04$ ./id.exe 36308763&lt;br/&gt;
uid:36308763&lt;/p&gt;
{ _id: 842454605331302171, uname: &quot;linhaibo301&quot;, pwd: 7453393081496482441, email: &quot;jhn001@126.com&quot;, phone: 18250341448, tel: &quot;0&quot;, nick: &quot;&#26519;&#28023;&#27874;&quot;, photo: 1299464260, lcid: 75, sex: 0, email_t: 1321859812, phone_t: 1321868871, t: 1298360383, mt: 1328084329 }
&lt;p&gt;yz-uc-core-a04$ ./id.exe 124381883&lt;br/&gt;
uid:124381883&lt;/p&gt;
{ _id: 3300575577033534139, uname: &quot;&#26223;&#26684;&#37324;&#23359;&#35199;&quot;, pwd: 3417520175039819775, lcid: 56, sex: 1, t: 1342201474, mt: 1342201659 }</comment>
                            <comment id="145951" author="spencer" created="Mon, 23 Jul 2012 03:17:58 +0000"  >&lt;p&gt;Do you have a test case than can reproduce the problem?&lt;/p&gt;

&lt;p&gt;Does it only happen with users on the admin database, or does it happen on other databases as well?&lt;/p&gt;

&lt;p&gt;Does it only happen after adding a new user, or does it also happen to users that have been around for a long time?&lt;/p&gt;

&lt;p&gt;After authenticating successfully as a given user once, will you ever see the problem resurface with the same user?&lt;/p&gt;

&lt;p&gt;Can you attach the full mongos and config server logs from a run of this that includes the auth failures?&lt;/p&gt;</comment>
                            <comment id="145696" author="xjtyfq" created="Sat, 21 Jul 2012 13:20:57 +0000"  >&lt;p&gt;The same program has never auth failed with mongod version 2.0.6.&lt;br/&gt;
When I update to 2.20-rc0, this case happened occasionally.&lt;/p&gt;</comment>
                            <comment id="145681" author="xjtyfq" created="Sat, 21 Jul 2012 10:25:51 +0000"  >&lt;p&gt;sorry, Affects Version/s is 2.2.0-rc0&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="18367" name="auth.log" size="4133" author="xjtyfq" created="Tue, 24 Jul 2012 04:02:53 +0000"/>
                            <attachment id="18366" name="cleanlog.rar" size="16346" author="xjtyfq" created="Tue, 24 Jul 2012 04:02:53 +0000"/>
                            <attachment id="18368" name="testAuth.cc" size="744" author="xjtyfq" created="Tue, 24 Jul 2012 04:02:53 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 23 Jul 2012 03:17:58 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 29 weeks, 6 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 29 weeks, 6 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>xjtyfq</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|hrnujb:</customfieldvalue>

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

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

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