<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:08:16 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-45237] After an upgrade mongod will not start on reboot</title>
                <link>https://jira.mongodb.org/browse/SERVER-45237</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;After a mongodb package update mongod fails to start on system reboot.   After a reboot mongod tries to start then bails out with and error &quot;code 48&quot;.  See attached log file excerpt.&lt;/p&gt;

&lt;p&gt;I should note this only happens on update on 18.04.  I have no similar issue on 16.04.&lt;/p&gt;

&lt;p&gt;The problem seems to be with the systemd config.  If I add the additional target&quot;multi-user.target&quot;  to the &quot;After=network.target&quot; mongod starts on reboot. &lt;/p&gt;

&lt;p&gt;I have looked at other incidents similar and the all relate to WiredTiger IIRC.&lt;/p&gt;

&lt;p&gt;It&apos;s a minor but annoying problem, especially if I forget to modify the service file after and upgrade.&lt;/p&gt;

&lt;p&gt;Mongodb version: 4.2.2&lt;br/&gt;
Distro: Ubuntu 18.04&lt;br/&gt;
CPU: AMD Ryzen6&lt;br/&gt;
RAM: 32Gb&lt;/p&gt;</description>
                <environment></environment>
        <key id="1060069">SERVER-45237</key>
            <summary>After an upgrade mongod will not start on reboot</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="5">Cannot Reproduce</resolution>
                                        <assignee username="mathew.robinson@mongodb.com">Mathew Robinson</assignee>
                                    <reporter username="marsh.giguere@gmail.com">Marshall Giguere</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 Dec 2019 20:52:27 +0000</created>
                <updated>Mon, 27 Jan 2020 16:07:57 +0000</updated>
                            <resolved>Mon, 27 Jan 2020 16:07:57 +0000</resolved>
                                                                    <component>Upgrade/Downgrade</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2765764" author="april.schoffer" created="Mon, 27 Jan 2020 16:07:57 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=marsh.giguere%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;marsh.giguere@gmail.com&quot;&gt;marsh.giguere@gmail.com&lt;/a&gt; despite repeated attempts, we&apos;ve been unable to reproduce this issue. We suspect this issue is likely specific to your environment. Please feel free to reach out with more details if there is anything else you believe we can do to help.&lt;/p&gt;</comment>
                            <comment id="2705428" author="marsh.giguere@gmail.com" created="Mon, 6 Jan 2020 16:42:01 +0000"  >&lt;p&gt;Matt;&lt;/p&gt;

&lt;p&gt;I don&apos;t recall doing anything unusual other than installing 4.2.2.&lt;/p&gt;

&lt;p&gt;Here&apos;s the analysis reports&lt;/p&gt;

&lt;p&gt;mongod.service @4.790s&lt;br/&gt;
`-network.target @4.788s&lt;br/&gt;
  `-NetworkManager.service @4.460s +327ms&lt;br/&gt;
    `-dbus.service @4.453s&lt;br/&gt;
      `-basic.target @4.448s&lt;br/&gt;
        `-sockets.target @4.448s&lt;br/&gt;
          `-snapd.socket @4.447s +913us&lt;br/&gt;
            `-sysinit.target @4.441s&lt;br/&gt;
              `-systemd-timesyncd.service @4.234s +207ms&lt;br/&gt;
                `-systemd-tmpfiles-setup.service @4.136s +95ms&lt;br/&gt;
                  `-systemd-journal-flush.service @1.465s +2.670s&lt;br/&gt;
                    `-var.mount @1.387s +75ms&lt;/p&gt;

&lt;p&gt;`-systemd-fsck@dev-disk-by\x2duuid-679e4bfc\x2d4f42\x2d4788\x2da019\x2d3f131942a1c7.service&lt;br/&gt;
@536ms +850ms&lt;/p&gt;

&lt;p&gt;`-dev-disk-by\x2duuid-679e4bfc\x2d4f42\x2d4788\x2da019\x2d3f131942a1c7.device&lt;br/&gt;
@535ms&lt;/p&gt;


&lt;p&gt;network.target @4.788s&lt;br/&gt;
`-NetworkManager.service @4.460s +327ms&lt;br/&gt;
  `-dbus.service @4.453s&lt;br/&gt;
    `-basic.target @4.448s&lt;br/&gt;
      `-sockets.target @4.448s&lt;br/&gt;
        `-snapd.socket @4.447s +913us&lt;br/&gt;
          `-sysinit.target @4.441s&lt;br/&gt;
            `-systemd-timesyncd.service @4.234s +207ms&lt;br/&gt;
              `-systemd-tmpfiles-setup.service @4.136s +95ms&lt;br/&gt;
                `-systemd-journal-flush.service @1.465s +2.670s&lt;br/&gt;
                  `-var.mount @1.387s +75ms&lt;/p&gt;

&lt;p&gt;`-systemd-fsck@dev-disk-by\x2duuid-679e4bfc\x2d4f42\x2d4788\x2da019\x2d3f131942a1c7.service&lt;br/&gt;
@536ms +850ms&lt;/p&gt;

&lt;p&gt;`-dev-disk-by\x2duuid-679e4bfc\x2d4f42\x2d4788\x2da019\x2d3f131942a1c7.device&lt;br/&gt;
@535ms&lt;/p&gt;

&lt;p&gt;On Mon, Jan 6, 2020 at 9:23 AM Mathew Robinson (Jira) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;



&lt;p&gt;&amp;#8211; &lt;br/&gt;
If you can&apos;t hear the dogwoods barking you&apos;re taking things too seriously.&lt;/p&gt;</comment>
                            <comment id="2705068" author="mathew.robinson" created="Mon, 6 Jan 2020 14:22:23 +0000"  >&lt;p&gt;Thanks, that&apos;s close enough to our stock SystemD service file for our purposes.&lt;/p&gt;

&lt;p&gt;I&apos;ll wait for the systemd-analyze results, I&apos;m not able to repro this on my server so I&apos;m suspicious that a dependency cycle has somehow been introduced in your init order.&lt;/p&gt;</comment>
                            <comment id="2704717" author="marsh.giguere@gmail.com" created="Mon, 6 Jan 2020 00:03:01 +0000"  >&lt;p&gt;Matt;&lt;/p&gt;

&lt;p&gt;I&apos;m not 100% sure this is the original from the deb.  I think I only&lt;br/&gt;
changed the one line to get things working.  I can safely say systemd is&lt;br/&gt;
not my favorite initializer.   In order to provide you with the requested&lt;br/&gt;
analysis output I&apos;ll have to recycle my server, it&apos;s busy, I&apos;ll post as&lt;br/&gt;
soon as I can.&lt;/p&gt;

&lt;p&gt;-Marsh&lt;/p&gt;


&lt;p&gt;&lt;b&gt;file: /lib/systemd/system/mongod.service&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Unit&amp;#93;&lt;/span&gt;&lt;br/&gt;
Description=MongoDB Database Server&lt;br/&gt;
Documentation=&lt;a href=&quot;https://docs.mongodb.org/manual&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.org/manual&lt;/a&gt;&lt;br/&gt;
After=network.target&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Service&amp;#93;&lt;/span&gt;&lt;br/&gt;
User=mongodb&lt;br/&gt;
Group=mongodb&lt;br/&gt;
EnvironmentFile=-/etc/default/mongod&lt;br/&gt;
ExecStart=/usr/bin/mongod --config /etc/mongod.conf&lt;br/&gt;
PIDFile=/var/run/mongodb/mongod.pid&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;file size&lt;br/&gt;
LimitFSIZE=infinity&lt;/li&gt;
	&lt;li&gt;cpu time&lt;br/&gt;
LimitCPU=infinity&lt;/li&gt;
	&lt;li&gt;virtual memory size&lt;br/&gt;
LimitAS=infinity&lt;/li&gt;
	&lt;li&gt;open files&lt;br/&gt;
LimitNOFILE=64000&lt;/li&gt;
	&lt;li&gt;processes/threads&lt;br/&gt;
LimitNPROC=64000&lt;/li&gt;
	&lt;li&gt;locked memory&lt;br/&gt;
LimitMEMLOCK=infinity&lt;/li&gt;
	&lt;li&gt;total threads (user+kernel)&lt;br/&gt;
TasksMax=infinity&lt;br/&gt;
TasksAccounting=false&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;Recommended limits for for mongod as specified in&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;Install&amp;#93;&lt;/span&gt;&lt;br/&gt;
WantedBy=multi-user.target&lt;/p&gt;

&lt;p&gt;On Sun, Jan 5, 2020 at 6:20 PM Mathew Robinson (Jira) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;



&lt;p&gt;&amp;#8211; &lt;br/&gt;
If you can&apos;t hear the dogwoods barking you&apos;re taking things too seriously.&lt;/p&gt;</comment>
                            <comment id="2704707" author="mathew.robinson" created="Sun, 5 Jan 2020 23:19:01 +0000"  >&lt;p&gt;Just for confirmation can you post the service file which produces this error as well? It looks like MongoDB is indeed trying to start before the network is available despite indicating &lt;tt&gt;After=network.target&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Can you run &lt;tt&gt;systemd-analyze critical-chain mongod.service&lt;/tt&gt; to show the dependency ordering? Might as well check &lt;tt&gt;systemd-analyze critical-chain network.target&lt;/tt&gt; as well.&lt;/p&gt;</comment>
                            <comment id="2703979" author="marsh.giguere@gmail.com" created="Sat, 4 Jan 2020 16:06:01 +0000"  >&lt;ul&gt;
	&lt;li&gt;mongod.service - MongoDB Database Server&lt;br/&gt;
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor&lt;br/&gt;
preset: enabled)&lt;br/&gt;
   Active: failed (Result: exit-code) since Sat 2020-01-04 10:53:59 EST;&lt;br/&gt;
8min ago&lt;br/&gt;
     Docs: &lt;a href=&quot;https://docs.mongodb.org/manual&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.org/manual&lt;/a&gt;&lt;br/&gt;
  Process: 1313 ExecStart=/usr/bin/mongod --config /etc/mongod.conf&lt;br/&gt;
(code=exited, status=48)&lt;br/&gt;
 Main PID: 1313 (code=exited, status=48)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Jan 04 10:53:59 xxxxx.xxxxx.xxx systemd&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: Started MongoDB Database Server.&lt;br/&gt;
Jan 04 10:53:59 xxxxx.xxxxx.xxx systemd&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: mongod.service: Main process&lt;br/&gt;
exited, code=exited, status=48/n/a&lt;br/&gt;
Jan 04 10:53:59 xxxxx.xxxxx.xxx systemd&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;: mongod.service: Failed with&lt;br/&gt;
result &apos;exit-code&apos;.&lt;/p&gt;

&lt;p&gt;On Thu, Jan 2, 2020 at 2:00 PM Mathew Robinson (Jira) &amp;lt;jira@mongodb.org&amp;gt;&lt;/p&gt;



&lt;p&gt;&amp;#8211; &lt;br/&gt;
If you can&apos;t hear the dogwoods barking you&apos;re taking things too seriously.&lt;/p&gt;</comment>
                            <comment id="2699140" author="mathew.robinson" created="Thu, 2 Jan 2020 18:59:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=marsh.giguere%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;marsh.giguere@gmail.com&quot;&gt;marsh.giguere@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can you post the output of &lt;tt&gt;systemctl status mongod&lt;/tt&gt; on the affected system without your Target=multi-user.target changes?&lt;/p&gt;

&lt;p&gt;(Please run the command after reverting your target changes and rebooting)&lt;/p&gt;</comment>
                            <comment id="2679237" author="marsh.giguere@gmail.com" created="Fri, 27 Dec 2019 22:32:31 +0000"  >&lt;p&gt;Yes.  No issues on 16.04 only 18.04, mongodb 4.2.2&lt;/p&gt;</comment>
                            <comment id="2678763" author="daniel.hatcher" created="Fri, 27 Dec 2019 16:11:51 +0000"  >&lt;p&gt;Thank you for the report; we&apos;ll look into it. To confirm, you are using 4.2.2 on Ubuntu 16.04 with no issues, it&apos;s specifically 4.2.2 on Ubuntu 18.04 that you have the problem?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="240885" name="mongod-log.txt" size="2219" author="marsh.giguere@gmail.com" created="Wed, 18 Dec 2019 20:36:13 +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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 27 Dec 2019 16:11:51 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            4 years, 2 weeks, 2 days ago
                        </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>april.schoffer@mongodb.com</customfieldvalue>
            <customfieldvalue>daniel.hatcher@mongodb.com</customfieldvalue>
            <customfieldvalue>marsh.giguere@gmail.com</customfieldvalue>
            <customfieldvalue>mathew.robinson@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hwc4m7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hw02e7:</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="3486">Dev Platform 2020-01-13</customfieldvalue>
    <customfieldvalue id="3532">Dev Platform 2020-01-27</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10750" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Steps To Reproduce</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;on Ubunt 18.04&lt;br/&gt;
upgrade to new mongo packages.&lt;br/&gt;
reboot, mongod will not have started.&lt;/p&gt;

&lt;p&gt;change file: /lib/systemd/system/mongod.server &lt;br/&gt;
After=network.target&lt;/p&gt;

&lt;p&gt;   to&lt;br/&gt;
After=netword.target multi-user.target&lt;/p&gt;

&lt;p&gt;Reboot, mongod now starts.&lt;/p&gt;</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|hwbqvj:</customfieldvalue>

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