<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why is Splunk not starting after upgrade to 8? in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478828#M10334</link>
    <description>&lt;P&gt;@Ivanreis, but the error says "Couldn't change ownership for /sys/fs/cgroup/cpu//system.slice/Splunkd.service", but "/sys/fs/cgroup/cpu//system.slice/Splunkd.service" does not even exist ???&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2019 05:53:54 GMT</pubDate>
    <dc:creator>48tfhd86gv</dc:creator>
    <dc:date>2019-11-06T05:53:54Z</dc:date>
    <item>
      <title>Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478826#M10332</link>
      <description>&lt;P&gt;Went to upgrade &lt;CODE&gt;splunk-7.3.0-657388c7a488-linux-2.6-amd64&lt;/CODE&gt;  to &lt;CODE&gt;splunk-8.0.0-1357bef0a7f6-linux-2.6-amd64.deb&lt;/CODE&gt; on a standalone instance of Splunk running on Debian 10.1.&lt;/P&gt;

&lt;P&gt;The install process went fine. The deb file recognised there was an existing vesion and shut it down before continuing.  however now v8 just won't start.&lt;/P&gt;

&lt;P&gt;Looking at &lt;CODE&gt;journalctl -xe&lt;/CODE&gt;, I'm seeing the following :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Nov 05 13:56:35  splunk[597]: Couldn't change ownership for /sys/fs/cgroup/cpu//system.slice/Splunkd.service: Operation not permitted                     
Nov 05 13:56:35  splunk[597]: Error perform systemd preparation: Operation not permitted                                                                  
Nov 05 13:56:35  systemd[1]: Splunkd.service: Main process exited, code=exited, status=1/FAILURE    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The cited file &lt;CODE&gt;/sys/fs/cgroup/cpu//system.slice/Splunkd.service&lt;/CODE&gt; does not exist ? Is this something the installer should have created ?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 14:02:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478826#M10332</guid>
      <dc:creator>48tfhd86gv</dc:creator>
      <dc:date>2019-11-05T14:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478827#M10333</link>
      <description>&lt;P&gt;Per the error message it seems to be a permission issue. The splunk process is trying to load, but the Debian is not allowing to start. Check which account was created to run the splunkd service. I believe you have the redeploy the ownership the user created to run splunkd service.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 04:28:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478827#M10333</guid>
      <dc:creator>ivanreis</dc:creator>
      <dc:date>2019-11-06T04:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478828#M10334</link>
      <description>&lt;P&gt;@Ivanreis, but the error says "Couldn't change ownership for /sys/fs/cgroup/cpu//system.slice/Splunkd.service", but "/sys/fs/cgroup/cpu//system.slice/Splunkd.service" does not even exist ???&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 05:53:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478828#M10334</guid>
      <dc:creator>48tfhd86gv</dc:creator>
      <dc:date>2019-11-06T05:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478829#M10335</link>
      <description>&lt;P&gt;I mean that it is possible the account that is being used to start the splunk service does not have all the required access to start splunkd service, so this process splunkd should run successfully, so if for some reason the user is not able to start this service, it is potential problem. Use the root user to try to redploy the permission for the user you have created to start splunk. &lt;BR /&gt;
If it did not work, try to reinstall the previous version and after that redeploy Splunk 8 again.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 06:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478829#M10335</guid>
      <dc:creator>ivanreis</dc:creator>
      <dc:date>2019-11-06T06:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478830#M10336</link>
      <description>&lt;P&gt;Hi @48tfhd86gv,&lt;/P&gt;

&lt;P&gt;From &lt;CODE&gt;"Error perform systemd preparation: Operation not permitted "&lt;/CODE&gt; Seems like the Splunk user is trying to create Splunkd.service and doesn't have the permissions. Try starting Splunk with the root user then reverting the file ownership back to the splunk user.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 07:40:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478830#M10336</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-11-06T07:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478831#M10337</link>
      <description>&lt;P&gt;@DavidHourani Perfect, that worked. Thank you for saving me from the nightmare of having to re-install !&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:47:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478831#M10337</guid>
      <dc:creator>48tfhd86gv</dc:creator>
      <dc:date>2019-11-06T16:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478832#M10338</link>
      <description>&lt;P&gt;You're welcome! Please accept the answer if it was helpful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 17:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478832#M10338</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-11-06T17:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478833#M10339</link>
      <description>&lt;P&gt;I would also make sure everything on your instance is compatible with 8.0&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 21:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478833#M10339</guid>
      <dc:creator>sarweins</dc:creator>
      <dc:date>2019-11-06T21:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478834#M10340</link>
      <description>&lt;P&gt;We had some issues running Splunk 8 as a non-privileged user (i.e. not root).&lt;/P&gt;

&lt;P&gt;The directories &lt;CODE&gt;/sys/fs/cgroup/cpu/system.slice/Splunkd.service&lt;/CODE&gt; and &lt;CODE&gt;/sys/fs/cgroup/memory/system.slice/Splunkd.service&lt;/CODE&gt; are created when the Splunkd.service is started by systemd. They are used to influence the cgroup that the Splunk service is running under, and can be used to control CPU and Memory usage by the service.&lt;/P&gt;

&lt;P&gt;In previous versions of Splunk, the systemd unit file generated by &lt;CODE&gt;splunk enable boot-start -user splunk&lt;/CODE&gt; contained two &lt;CODE&gt;ExecStartPost&lt;/CODE&gt; statements that changed the permissions for the cgroup directories. It also set &lt;CODE&gt;User=splunk&lt;/CODE&gt; in the unit file. You can still see remains from this &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/Workloads/Configuresystemd#systemd_unit_file_properties"&gt;in the online documentation&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;With Splunk 8, it seems that the Splunk process itself tries to manipulate these directories. When started with &lt;CODE&gt;User=splunk&lt;/CODE&gt; (or a different non-privileged user), this is denied by the system, as these folders are owned by the root user. This also happens so soon in the startup process that Splunk terminates before the &lt;CODE&gt;ExecStartPost&lt;/CODE&gt; hooks are run by systemd. If started without the &lt;CODE&gt;User=&lt;/CODE&gt; statement in the unit file, Splunk starts as root, and drops privileges to &lt;CODE&gt;SPLUNK_OS_USER&lt;/CODE&gt; from &lt;CODE&gt;${SPLUNK_HOME}/etc/splunk-launch.conf&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;There are two options on how to fix this issue if you have been running Splunk as a non-privileged user via systemd:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Don't use &lt;CODE&gt;User=splunk&lt;/CODE&gt; in the unit file (and also drop the &lt;CODE&gt;ExecStartPost&lt;/CODE&gt; statements). As long as &lt;CODE&gt;SPLUNK_OS_USER=splunk&lt;/CODE&gt; in &lt;CODE&gt;${SPLUNK_HOME}/etc/splunk-launch.conf&lt;/CODE&gt;, Splunk will fix the permissions and drop privileges.&lt;/LI&gt;
&lt;LI&gt;Change the &lt;CODE&gt;ExecStartPost&lt;/CODE&gt; statements to &lt;CODE&gt;ExecStartPre&lt;/CODE&gt;. This ensures that systemd changes the permissions before Splunk is actually started.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 07 Nov 2019 11:17:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478834#M10340</guid>
      <dc:creator>yaunj</dc:creator>
      <dc:date>2019-11-07T11:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478835#M10341</link>
      <description>&lt;P&gt;Thanks for the great insight @yaunj .  I actually think your answer should be the accepted one as it provides much better explanation and background detail.&lt;/P&gt;

&lt;P&gt;I have to say, that based on this and prior experiences, although Splunk is a great product, some aspects of their documentation and software development are of questionable quality.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 19:03:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478835#M10341</guid>
      <dc:creator>48tfhd86gv</dc:creator>
      <dc:date>2019-11-07T19:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478836#M10342</link>
      <description>&lt;P&gt;yeah totally agree with @48tfhd86gv, nice work @yaunj &lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 19:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478836#M10342</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-11-07T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478837#M10343</link>
      <description>&lt;P&gt;Thanks! this solved my issue also...&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 16:14:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478837#M10343</guid>
      <dc:creator>aoleske</dc:creator>
      <dc:date>2020-02-11T16:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478838#M10344</link>
      <description>&lt;P&gt;I wonder if running &lt;CODE&gt;splunk disable boot-start&lt;/CODE&gt; followed by &lt;CODE&gt;splunk enable boot-start -user splunk&lt;/CODE&gt; following the upgrade would repair the pre 8.x unit files?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 16:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/478838#M10344</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-11T16:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/521924#M10345</link>
      <description>&lt;P&gt;Great Job!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/521924#M10345</guid>
      <dc:creator>Spranta</dc:creator>
      <dc:date>2020-09-29T07:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not starting after upgrade to 8?</title>
      <link>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/549961#M10346</link>
      <description>&lt;P&gt;Awesome, thanks.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It worked. Note that in my case I also changed for SystemD :&lt;/P&gt;&lt;PRE&gt;splunk enable boot-start -systemd-managed 1 -user splunk&lt;/PRE&gt;&lt;P&gt;PS : I didn't find how to format the code like the others (inline, red text and pink background)&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sleepy_face:"&gt;😪&lt;/span&gt; that's the best I could do...&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 06:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Why-is-Splunk-not-starting-after-upgrade-to-8/m-p/549961#M10346</guid>
      <dc:creator>MichaelPolla</dc:creator>
      <dc:date>2021-04-30T06:43:31Z</dc:date>
    </item>
  </channel>
</rss>

