<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:51:51 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-19716] remove socket when exiting because dbpath not found</title>
                <link>https://jira.mongodb.org/browse/SERVER-19716</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When &lt;tt&gt;mongod&lt;/tt&gt; fails to start because &lt;tt&gt;dbpath&lt;/tt&gt; is not found, the &lt;tt&gt;/tmp/mongodb-xxxxx.sock&lt;/tt&gt; file is not removed.&lt;/p&gt;

&lt;h6&gt;&lt;a name=&quot;Originaldescription&quot;&gt;&lt;/a&gt;Original description&lt;/h6&gt;
&lt;p&gt;Starting mongodb as service fails after trying run mongod (not as service) and failing because /data/db not found.&lt;/p&gt;

&lt;p&gt;2015-08-03T11:28:35.657+0000 I CONTROL  ***** SERVER RESTARTED *****&lt;br/&gt;
2015-08-03T11:28:35.695+0000 E NETWORK  &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted&lt;br/&gt;
2015-08-03T11:28:35.695+0000 I -        &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; Fatal Assertion 28578&lt;br/&gt;
2015-08-03T11:28:35.695+0000 I -        &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;Deleting the socket file and running as service fixes the problem.&lt;/p&gt;</description>
                <environment></environment>
        <key id="223780">SERVER-19716</key>
            <summary>remove socket when exiting because dbpath not found</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="amirsaman.memaripour@mongodb.com">Amirsaman Memaripour</assignee>
                                    <reporter username="levyavi">Avi Levy</reporter>
                        <labels>
                    </labels>
                <created>Mon, 3 Aug 2015 11:51:20 +0000</created>
                <updated>Thu, 27 Oct 2022 20:30:33 +0000</updated>
                            <resolved>Thu, 27 Oct 2022 20:30:33 +0000</resolved>
                                    <version>3.0.5</version>
                                                    <component>Admin</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="4933711" author="amirsaman.memaripour" created="Thu, 27 Oct 2022 20:30:22 +0000"  >&lt;p&gt;Closing as &quot;Gone Away&quot; since this is no longer an issue (at least since v4.2). We start the &lt;tt&gt;TransportLayer&lt;/tt&gt; way after verifying the the &lt;tt&gt;dbpath&lt;/tt&gt; exists. For example, &lt;a href=&quot;https://github.com/mongodb/mongo/blob/5862dae0bb454be2c3241da1699bc545701b1379/src/mongo/db/db.cpp#L390-L399&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; is where we verify the &lt;tt&gt;dbpath&lt;/tt&gt; on v4.2, and &lt;a href=&quot;https://github.com/mongodb/mongo/blob/5862dae0bb454be2c3241da1699bc545701b1379/src/mongo/db/db.cpp#L698&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt; is where we start the &lt;tt&gt;TransportLayer&lt;/tt&gt; (e.g., create the socket file).&lt;/p&gt;</comment>
                            <comment id="4262741" author="JIRAUSER1262719" created="Tue, 21 Dec 2021 21:33:45 +0000"  >&lt;p&gt;We haven&#8217;t heard back from you in at least 1 year, so I&apos;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;</comment>
                            <comment id="995459" author="levyavi" created="Mon, 3 Aug 2015 20:50:06 +0000"  >&lt;p&gt;Thanks for explanation Ramon.&lt;/p&gt;

&lt;p&gt;I ran plain mongod by mistake (instead or running &quot;service mongod start&quot;).&lt;br/&gt;
When i fixed my mistake by running it as a service, I was surprised to find it couldn&apos;t start.&lt;br/&gt;
the log was pretty straight forward about what the problem is, and how to solve it. That is why I opened this issue with the lowest priority.&lt;/p&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Avi&lt;/p&gt;</comment>
                            <comment id="995294" author="ramon.fernandez" created="Mon, 3 Aug 2015 18:59:50 +0000"  >&lt;p&gt;Thanks for the additional info &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=levyavi&quot; class=&quot;user-hover&quot; rel=&quot;levyavi&quot;&gt;levyavi&lt;/a&gt;. Here&apos;s what happens; when you do the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2. Run mongod not as service - fails /data/db not exist&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;tt&gt;mongod&lt;/tt&gt; will create &lt;tt&gt;/tmp/mongodb-27017.sock&lt;/tt&gt;, owned by root (because you&apos;re running &lt;tt&gt;mongod&lt;/tt&gt; as root). Since you didn&apos;t specify a &lt;tt&gt;dbpath&lt;/tt&gt;, &lt;tt&gt;mongod&lt;/tt&gt; tries to use the default path, &lt;tt&gt;/data/db&lt;/tt&gt;, but fails because it doesn&apos;t exist.&lt;/p&gt;

&lt;p&gt;Later you try to:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3. Run mongo as service - fails &lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The service is probably configured to run as the &lt;tt&gt;mongod&lt;/tt&gt; user, which has no permissions to remove &lt;tt&gt;/tmp/mongodb-27017.sock&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;This is expected behavior. Arguably &lt;tt&gt;mongod&lt;/tt&gt; should clean &lt;tt&gt;/tmp/mongodb-27017.sock&lt;/tt&gt; after existing, so we can reuse this ticket to consider this cleanup. That being said, please note it&apos;s strongly recommended to not run &lt;tt&gt;mongod&lt;/tt&gt; as root.&lt;/p&gt;</comment>
                            <comment id="995242" author="levyavi" created="Mon, 3 Aug 2015 18:11:15 +0000"  >&lt;p&gt;@Ramon Fernandez,&lt;br/&gt;
I am running all commands as root.&lt;br/&gt;
I can repro it. It repros also on another machine.&lt;/p&gt;

&lt;p&gt;1. Run mongo - fails becuase mongodb is not running&lt;br/&gt;
2. Run mongod not as service - fails /data/db not exist&lt;br/&gt;
3. Run mongo as service - fails &lt;br/&gt;
4. Check mongo log - failure is because of socket file&lt;br/&gt;
5. Check that socket files exist &lt;br/&gt;
6. Delete socket file&lt;br/&gt;
7. Run mongod as service&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# mongo&lt;br/&gt;
MongoDB shell version: 3.0.5&lt;br/&gt;
connecting to: test&lt;br/&gt;
2015-08-03T17:14:55.416+0000 W NETWORK  Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused&lt;br/&gt;
2015-08-03T17:14:55.417+0000 E QUERY    Error: couldn&apos;t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed&lt;br/&gt;
    at connect (src/mongo/shell/mongo.js:179:14)&lt;br/&gt;
    at (connect):1:6 at src/mongo/shell/mongo.js:179&lt;br/&gt;
exception: connect failed&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# mongod&lt;br/&gt;
2015-08-03T17:15:04.749+0000 I STORAGE  &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; exception in initAndListen: 29 Data directory /data/db not found., terminating&lt;br/&gt;
2015-08-03T17:15:04.749+0000 I CONTROL  &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; dbexit:  rc: 100&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# service mongod start&lt;br/&gt;
Starting mongod:                                           &lt;span class=&quot;error&quot;&gt;&amp;#91;FAILED&amp;#93;&lt;/span&gt;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# cat /var/log/mongodb/mongod.log&lt;br/&gt;
2015-08-03T17:16:50.025+0000 I CONTROL  ***** SERVER RESTARTED *****&lt;br/&gt;
2015-08-03T17:16:50.115+0000 E NETWORK  &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; Failed to unlink socket file /tmp/mongodb-27017.sock errno:1 Operation not permitted&lt;br/&gt;
2015-08-03T17:16:50.115+0000 I -        &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt; Fatal Assertion 28578&lt;br/&gt;
2015-08-03T17:16:50.115+0000 I -        &lt;span class=&quot;error&quot;&gt;&amp;#91;initandlisten&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;***aborting after fassert() failure&lt;/p&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# ll /tmp/mongodb-27017.sock&lt;br/&gt;
srwx------ 1 root root 0 Aug  3 17:22 /tmp/mongodb-27017.sock&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# rm /tmp/mongodb-27017.sock&lt;br/&gt;
rm: remove socket `/tmp/mongodb-27017.sock&apos;? y&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;# service mongod start&lt;br/&gt;
Starting mongod:&lt;br/&gt;
                                                           [  OK  ]&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@foobar init.d&amp;#93;&lt;/span&gt;#&lt;/p&gt;</comment>
                            <comment id="995102" author="ramon.fernandez" created="Mon, 3 Aug 2015 15:35:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=levyavi&quot; class=&quot;user-hover&quot; rel=&quot;levyavi&quot;&gt;levyavi&lt;/a&gt;, are you able to reproduce this problem? It is not uncommon for the &lt;tt&gt;mongod&lt;/tt&gt; service to run under a dedicated user, and for users to run it as &quot;root&quot; leaving a socket in the dbpath that can&apos;t be unlinked by the service user. Can you please retrace your steps and provide details of what you did, the exact error messages you get and the permissions of the socket file?&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Ram&#243;n.&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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 3 Aug 2015 15:35:44 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 14 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>amirsaman.memaripour@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 14 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>amirsaman.memaripour@mongodb.com</customfieldvalue>
            <customfieldvalue>levyavi</customfieldvalue>
            <customfieldvalue>lauren.lewis@mongodb.com</customfieldvalue>
            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrkyrb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9f3z:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6576">Service Arch 2022-10-31</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>
                                

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

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