<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:25:56 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-73895] Sharding not enabled on MongoDB</title>
                <link>https://jira.mongodb.org/browse/SERVER-73895</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;ProblemStatement%2FRationale&quot;&gt;&lt;/a&gt;&lt;b&gt;Problem Statement/Rationale&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;recently the sh.enableSharding() is working on a database which i have created but by applying sh.ShardCollection() it displays &quot;MongoServerError: sharding not enabled for db&quot;.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;StepstoReproduce&quot;&gt;&lt;/a&gt;&lt;b&gt;Steps to Reproduce&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;Create any db ,then apply sh.enableSharding() and after that&#160; create collection and apply sh.shardcollection() with the help of shard key.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ExpectedResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Expected Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;Shard Key would be enable on my shardcollection.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ActualResults&quot;&gt;&lt;/a&gt;&lt;b&gt;Actual Results&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&lt;font color=&quot;#505f79&quot;&gt;&quot;MongoServerError: sharding not enabled for db&quot;.&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;AdditionalNotes&quot;&gt;&lt;/a&gt;&lt;b&gt;Additional Notes&lt;/b&gt;&lt;/h3&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>Kubernetes Cluster using bitnami helm,mongo 6.0.1</environment>
        <key id="2209146">SERVER-73895</key>
            <summary>Sharding not enabled on MongoDB</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="yuan.fang@mongodb.com">Yuan Fang</assignee>
                                    <reporter username="mohammad.shawaiz97@gmail.com">Muhammad Shawaiz Ghazanfar</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Dec 2022 07:24:36 +0000</created>
                <updated>Mon, 27 Feb 2023 14:37:41 +0000</updated>
                            <resolved>Mon, 27 Feb 2023 14:37:41 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5232861" author="JIRAUSER1270794" created="Mon, 27 Feb 2023 14:37:41 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mohammad.shawaiz97%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mohammad.shawaiz97@gmail.com&quot;&gt;mohammad.shawaiz97@gmail.com&lt;/a&gt;, &lt;/p&gt;

&lt;p&gt;We haven&#8217;t heard back from you for some time, so I&#8217;m going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Yuan&lt;/p&gt;</comment>
                            <comment id="5193412" author="JIRAUSER1270794" created="Mon, 13 Feb 2023 15:50:25 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mohammad.shawaiz97%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mohammad.shawaiz97@gmail.com&quot;&gt;mohammad.shawaiz97@gmail.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;We still need additional information to diagnose the problem. If this is still an issue for you, would you please upload the complete log?  I&apos;ve created a secure &lt;a href=&quot;https://amphora.corp.mongodb.com/public/upload/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJmb2xkZXJfaWQiOiIxOTQ0ODE0NDIxOTUiLCJleHAiOjE2Nzg4OTQ5ODd9.3IUT0WeZWFOjq997vPCyPh5t40_cMG7P_FB43P_CvPI&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;upload portal&lt;/a&gt; for you. Files uploaded to this portal are hosted on Box, are visible only to MongoDB employees, and are routinely deleted after some time.&lt;/p&gt;

&lt;p&gt;For the cluster spanning a time period that includes the incident, would you please archive (tar or zip) and upload to that link:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The complete mongod logs&lt;/li&gt;
	&lt;li&gt;The mongos log (&lt;tt&gt;mongos.log&lt;/tt&gt;)&lt;/li&gt;
	&lt;li&gt;The config server log (&lt;tt&gt;configsvr.log&lt;/tt&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you have any questions, feel free to ask. Thank you!&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Yuan&lt;/p&gt;

</comment>
                            <comment id="5149582" author="maurizio.casimirri" created="Sun, 29 Jan 2023 17:21:05 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mohammad.shawaiz97%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mohammad.shawaiz97@gmail.com&quot;&gt;mohammad.shawaiz97@gmail.com&lt;/a&gt;, thank you so much for sharing additional info. This doesn&apos;t seem to be a mongosh issue, but rather something more inherent to some other part of the stack in your specific setup. We will re-assign this ticket to a team that would be able to assist you in the best way.&lt;/p&gt;

&lt;p&gt;In order to confirm that and to ensure a smooth and efficient resolution process, it would be fantastic if you could provide us with the complete log file in addition to the information you&apos;ve already shared. Feel free to redact details you want to hide replacing them with a &quot;&amp;lt;redacted&amp;gt;&quot; placeholder.&lt;/p&gt;

&lt;p&gt;Having all the relevant information readily available from the log file can save us from the need for multiple back-and-forth interactions, and allow us to address and fix the issue as quickly as possible. Thanks for your help!&lt;/p&gt;</comment>
                            <comment id="5051158" author="JIRAUSER1272199" created="Tue, 13 Dec 2022 15:15:31 +0000"  >&lt;p&gt;We are using bitnami mongodb sharded &quot;https://github.com/bitnami/charts/tree/main/bitnami/mongodb-sharded/#installing-the-chart&quot;.Two months ago, We had restored data from standalone architecture to sharded architecture, enabled sharded, applied sharded key on collection created. It was working perfectly fine. If we still create new collection and apply on it ,then it works smoothly. 1 replica of 1 shard went to a CrashLoopBack for sometime due to storage issue but it was resolved immediately.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Now, when we create a new db , enable Sharding on it &quot; sh.enableSharding(&quot;my_db&quot;)&quot; then it responds&#160;&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
&#160; ok: 1,&lt;br/&gt;
&#160; &apos;$clusterTime&apos;:&lt;/p&gt;

&lt;p&gt;{ &#160; &#160; clusterTime: Timestamp(&lt;br class=&quot;atl-forced-newline&quot; /&gt;&lt;/p&gt;
{ t: 1678966557, i: 1 }

&lt;p&gt;),&lt;br/&gt;
&#160; &#160; signature:&lt;/p&gt;

{ &#160; &#160; &#160; hash: Binary(Buffer.from(&quot;b5da1b9a2539ecdaf77096012e36a014b51c492b&quot;, &quot;hex&quot;), 0), &#160; &#160; &#160; keyId: Long(&quot;7925145979144201565&quot;) &#160; &#160; }

&lt;p&gt;&#160; },&lt;br/&gt;
&#160; operationTime: Timestamp({ t: 1678966557, i: 1 })&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;But when i create a new collection and apply &quot;sh.shardCollection(&quot;my_db.my_collection&quot;, {&quot;_id&quot;: &quot;hashed&quot;})&quot;, then the error message it shows is &quot;MongoServerError: sharding not enabled for db my_db&quot;.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The LOG given below seems to be different in the logs.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

{&quot;t&quot;:\{&quot;$date&quot;:&quot;2022-12-13T14:50:46.263+00:00&quot;}
&lt;p&gt;,&quot;s&quot;:&quot;I&quot;, &quot;c&quot;:&quot;CONTROL&quot;, &quot;id&quot;:20710, &quot;ctx&quot;:&quot;LogicalSessionCacheRefresh&quot;,&quot;msg&quot;:&quot;Failed to refresh session cache, will try again at the next refresh interval&quot;,&quot;attr&quot;:{&quot;error&quot;:&quot;NoProgressMade: no progress was made executing batch write op in config.system.sessions after 5 rounds (514 ops completed in 7 rounds total)&quot;}}&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The kubernetes setup, we are using is also working perfectly fine as other dbs are also deployed on it and are in working state.&lt;/p&gt;</comment>
                            <comment id="5050790" author="JIRAUSER1256529" created="Tue, 13 Dec 2022 13:36:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mohammad.shawaiz97%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;mohammad.shawaiz97@gmail.com&quot;&gt;mohammad.shawaiz97@gmail.com&lt;/a&gt; Are you able to provide a log file as suggested above?&lt;/p&gt;

&lt;p&gt;Can you provide full steps to reproduce? This does not appear to happen with the regular MongoDB 6.0.1 binaries. Have you verified that this is not an issue with the specific kubernetes setup you&#8217;re using?&lt;/p&gt;</comment>
                            <comment id="5050603" author="JIRAUSER1272199" created="Tue, 13 Dec 2022 11:25:30 +0000"  >&lt;p&gt;Databases which has been created two months ago, any new collection applied on it is working. This issue is being faced on new creating databases.&lt;/p&gt;</comment>
                            <comment id="5050601" author="JIRAUSER1272199" created="Tue, 13 Dec 2022 11:24:13 +0000"  >&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;direct: mongos&amp;#93;&lt;/span&gt; my_db&amp;gt; sh.enableSharding(&quot;my_db&quot;)&lt;br/&gt;
{&lt;br/&gt;
&#160; ok: 1,&lt;br/&gt;
&#160; &apos;$clusterTime&apos;: &lt;/p&gt;
{
&#160; &#160; clusterTime: Timestamp(\{ t: 1678966557, i: 1 }
&lt;p&gt;),&lt;br/&gt;
&#160; &#160; signature: &lt;/p&gt;
{
&#160; &#160; &#160; hash: Binary(Buffer.from(&quot;b5da1b9a2539ecdaf77096012e36a014b51c492b&quot;, &quot;hex&quot;), 0),
&#160; &#160; &#160; keyId: Long(&quot;7925145979144201565&quot;)
&#160; &#160; }
&lt;p&gt;&#160; },&lt;br/&gt;
&#160; operationTime: Timestamp({ t: 1678966557, i: 1 })&lt;br/&gt;
}&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;direct: mongos&amp;#93;&lt;/span&gt; my_db&amp;gt; sh.shardCollection(&quot;my_db.my_collection&quot;, {&quot;_id&quot;: &quot;hashed&quot;})&lt;br/&gt;
MongoServerError: sharding not enabled for db my_db&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5050600" author="JIRAUSER1272199" created="Tue, 13 Dec 2022 11:24:10 +0000"  >&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;direct: mongos&amp;#93;&lt;/span&gt; my_db&amp;gt; sh.enableSharding(&quot;my_db&quot;)&lt;br/&gt;
{&lt;br/&gt;
&#160; ok: 1,&lt;br/&gt;
&#160; &apos;$clusterTime&apos;: &lt;/p&gt;
{
&#160; &#160; clusterTime: Timestamp(\{ t: 1678966557, i: 1 }
&lt;p&gt;),&lt;br/&gt;
&#160; &#160; signature: &lt;/p&gt;
{
&#160; &#160; &#160; hash: Binary(Buffer.from(&quot;b5da1b9a2539ecdaf77096012e36a014b51c492b&quot;, &quot;hex&quot;), 0),
&#160; &#160; &#160; keyId: Long(&quot;7925145979144201565&quot;)
&#160; &#160; }
&lt;p&gt;&#160; },&lt;br/&gt;
&#160; operationTime: Timestamp({ t: 1678966557, i: 1 })&lt;br/&gt;
}&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;direct: mongos&amp;#93;&lt;/span&gt; my_db&amp;gt; sh.shardCollection(&quot;my_db.my_collection&quot;, {&quot;_id&quot;: &quot;hashed&quot;})&lt;br/&gt;
MongoServerError: sharding not enabled for db my_db&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="5050471" author="JIRAUSER1261456" created="Tue, 13 Dec 2022 10:29:39 +0000"  >&lt;p&gt;Hi Muhammad&lt;/p&gt;

&lt;p&gt;Could  you upload a &lt;a href=&quot;https://www.mongodb.com/docs/mongodb-shell/logs/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;log file&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="5050283" author="JIRAUSER1272199" created="Tue, 13 Dec 2022 08:39:05 +0000"  >&lt;p&gt;It seems like the function &quot;sh.enableCollections()&quot; or &quot;sh.enable Sharding &quot; have some sort of bug in it.&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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25137"><![CDATA[Server Triage]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 13 Dec 2022 10:29:39 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        49 weeks, 2 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>yuan.fang@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            49 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>anna.henningsen@mongodb.com</customfieldvalue>
            <customfieldvalue>leroux.bodenstein@mongodb.com</customfieldvalue>
            <customfieldvalue>maurizio.casimirri@mongodb.com</customfieldvalue>
            <customfieldvalue>mohammad.shawaiz97@gmail.com</customfieldvalue>
            <customfieldvalue>yuan.fang@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i1mik7:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </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>
                                    <customfieldvalue><![CDATA[yuan.fang@mongodb.com]]></customfieldvalue>
    

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

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