<?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: Major boot-start change with 7.2.3 in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452632#M8219</link>
    <description>&lt;P&gt;This is only partially Splunk's issue, the systemd replacement for init.d is complicated and has it's own flaws.&lt;/P&gt;

&lt;P&gt;However if Splunk wanted to introduce systemd support, they should have added a flag to run the systemctl commands with a sudo option, as most distributions do not have any other option! (Redhat 7 for example)&lt;/P&gt;

&lt;P&gt;I have an open case on this issue currently as I've had issues with the init.d scripts (due to the OS systemd causing issues), and now I have issues with the new Splunk systemd support not quite working either!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2019 04:57:17 GMT</pubDate>
    <dc:creator>gjanders</dc:creator>
    <dc:date>2019-02-07T04:57:17Z</dc:date>
    <item>
      <title>Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452629#M8216</link>
      <description>&lt;P&gt;&lt;EM&gt;Update: Trick to force bootstarting with init.d instead of systemd: &lt;CODE&gt;splunk enable boot-start -systemd-managed 0&lt;/CODE&gt;  (credit goes to @dimrirahul below)&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Update #2 (2019-07): with version 7.3.0, the default mode for boot-start reverted back from systemd back to init.d&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Splunk snuck a major change in a minor release.  Updating from 7.2.1 to 7.2.3 changes the way &lt;CODE&gt;splunk enable boot-start&lt;/CODE&gt;is processed on Nix.  Instead of installing scripts in /etc/init.d, enabling boot-start now installs scripts in /etc/systemd.  According to documentation, the installation falls back to init.d if the OS does not offer systemd, but there's no documented way for the user to force init.d on an OS that supports systemd.&lt;/P&gt;

&lt;P&gt;In some environments, the scripts may prove buggy.  If the user-account you are running splunkd under is associated with a nonstandard group, splunk startup will fail with error  &lt;CODE&gt;Failed to start Systemd service file for Splunk, generated by 'splunk enable boot-start'.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;There doesn't appear to be a way to specify the groupname at installation.  The command &lt;CODE&gt;splunk enable boot-start -user &amp;lt;username&amp;gt;&lt;/CODE&gt; throws errors with parameter &lt;CODE&gt;-user &amp;lt;username&amp;gt;:&amp;lt;groupname&amp;gt;&lt;/CODE&gt;.  That syntax is not supported.  The workaround is to manually edit the file /etc/systemd/system/SplunkForwarder.service and change:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;ExecStartPost=/bin/bash -c "chown -R username:username /sys/fs/cgroup/cpu/system.slice/%n"&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;ExecStartPost=/bin/bash -c "chown -R username:username /sys/fs/cgroup/memory/system.slice/%n"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;to:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;ExecStartPost=/bin/bash -c "chown -R username:groupname /sys/fs/cgroup/cpu/system.slice/%n"&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;ExecStartPost=/bin/bash -c "chown -R username:groupname /sys/fs/cgroup/memory/system.slice/%n"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Which can be scripted by running &lt;CODE&gt;sed -i 's/username:username/username:groupname/g' /etc/systemd/system/SplunkForwarder.service&lt;/CODE&gt;' followed by &lt;CODE&gt;systemctl daemon-reload&lt;/CODE&gt; and &lt;CODE&gt;systemctl restart SplunkForwarder.service&lt;/CODE&gt; assuming it's a UF.&lt;/P&gt;

&lt;P&gt;Documentation reference:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.3/Admin/RunSplunkassystemdservice"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.3/Admin/RunSplunkassystemdservice&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;also informative:&lt;BR /&gt;
&lt;A href="https://www.duanewaddle.com/splunk-7-2-2-and-systemd/"&gt;https://www.duanewaddle.com/splunk-7-2-2-and-systemd/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 17:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452629#M8216</guid>
      <dc:creator>satyenshah</dc:creator>
      <dc:date>2019-02-04T17:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452630#M8217</link>
      <description>&lt;P&gt;It is a total disaster.   There are currently no valid and secure configurations to make this new &lt;CODE&gt;systemd&lt;/CODE&gt; method work.  To make it worse, as you pointed out, there doesn't seem to be a supported way to make the tried and true &lt;CODE&gt;init.d&lt;/CODE&gt; method work.  Splunk is well aware of the situation.  Version 7.2.4 should be dropping any day now I and I fully expect the entire "feature" to be removed.  We shall see.&lt;/P&gt;

&lt;P&gt;My guidance to clients right now is to avoid all versions of the 7.2.* stream like the plague and wait for 7.2.4, which &lt;EM&gt;probably&lt;/EM&gt; will be production ready.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 18:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452630#M8217</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-04T18:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452631#M8218</link>
      <description>&lt;P&gt;I'm happy that strides are being made to conform to the Systemd architecture. I noticed long ago that the automatic boot functions used the /etc/init.d scripts - so I ended up writing my own for RHEL 7 servers. You can use the following as "/etc/systemd/system/SplunkForwarder.service" without having to use Splunk's boot-start at all:&lt;/P&gt;

&lt;P&gt;[Unit]&lt;BR /&gt;
Description=Splunk Universal Forwarder&lt;BR /&gt;
After=network-online.target rsyslog.service&lt;/P&gt;

&lt;P&gt;[Service]&lt;BR /&gt;
User=splunk&lt;BR /&gt;
Group=splunk&lt;BR /&gt;
ExecStart=/opt/splunkforwarder/bin/splunk start&lt;BR /&gt;
ExecStop=/opt/splunkforwarder/bin/splunk stop&lt;BR /&gt;
StandardOutput=syslog&lt;BR /&gt;
Type=oneshot&lt;BR /&gt;
RemainAfterExit=yes&lt;/P&gt;

&lt;P&gt;[Install]&lt;BR /&gt;
Alias=splunk.service&lt;BR /&gt;
WantedBy=multi-user.target&lt;BR /&gt;
WantedBy=graphical.target&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 18:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452631#M8218</guid>
      <dc:creator>davemackey</dc:creator>
      <dc:date>2019-02-05T18:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452632#M8219</link>
      <description>&lt;P&gt;This is only partially Splunk's issue, the systemd replacement for init.d is complicated and has it's own flaws.&lt;/P&gt;

&lt;P&gt;However if Splunk wanted to introduce systemd support, they should have added a flag to run the systemctl commands with a sudo option, as most distributions do not have any other option! (Redhat 7 for example)&lt;/P&gt;

&lt;P&gt;I have an open case on this issue currently as I've had issues with the init.d scripts (due to the OS systemd causing issues), and now I have issues with the new Splunk systemd support not quite working either!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 04:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452632#M8219</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2019-02-07T04:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452633#M8220</link>
      <description>&lt;P&gt;Actually there is a way to force init.d use flag "-systemd-managed 0" when running enable boot-start, this may be less documented. Essentially if this flag is not present splunk tries to detect the environment that it is running in and tries to do the right thing, if you set this flag to 0, it overrides the detection and tries to install script using init.d flavor if you set it to '1' then it just tries to create a unit file even though your system may not be running systemd. Hope this was useful in some way&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2019 01:13:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452633#M8220</guid>
      <dc:creator>dimrirahul</dc:creator>
      <dc:date>2019-02-09T01:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452634#M8221</link>
      <description>&lt;P&gt;@gjanders ,&lt;BR /&gt;
The way its envisioned is that setting up of any systemd service is an systemd admin action, more specifically when you configure splunk to run you must have authorization to make that change, and then systemd takes care of managing lifecycle of splunk service. There is also the notion of who the service is being run as, for example "Joe", you could specify this with the -user flag. &lt;BR /&gt;
Kindly look at my response above how to co-erce splunk to choose what configuration type to use(systemd vs init.d)&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2019 01:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452634#M8221</guid>
      <dc:creator>dimrirahul</dc:creator>
      <dc:date>2019-02-09T01:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452635#M8222</link>
      <description>&lt;P&gt;Thanks for this, I notified the docs team to add this to the docs.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2019 03:39:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452635#M8222</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-02-09T03:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452636#M8223</link>
      <description>&lt;P&gt;Workaround posted by @dimrirahul above.  Command to force init.d:  &lt;CODE&gt;splunk enable boot-start -systemd-managed 0&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2019 06:12:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452636#M8223</guid>
      <dc:creator>satyenshah</dc:creator>
      <dc:date>2019-02-09T06:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452637#M8224</link>
      <description>&lt;P&gt;@dimrirahul thanks for the information. My Linux OS using init.d (which is under systemd) has issues with Splunk stop under some circumstances, I was hoping upgrading to 7.2.3 + systemd would help this but I still have some complications here...if Splunk adds sudo into the new systemd feature then I believe it will resolve my issues.&lt;/P&gt;

&lt;P&gt;I have a case open with support and will see how that goes.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2019 07:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452637#M8224</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2019-02-09T07:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452638#M8225</link>
      <description>&lt;P&gt;It &lt;EM&gt;IS&lt;/EM&gt; Splunk's problem because they did not offer a way to do it either way.  They got rid of a tried-and-true way (yes, with it's own well-understood minor flaws) and replaced it with a giant security hole.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Feb 2019 16:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452638#M8225</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-09T16:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452639#M8226</link>
      <description>&lt;P&gt;its finally official in 7.2.4 docs&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/RunSplunkassystemdservice"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/RunSplunkassystemdservice&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Additional options for enable boot-start
The enable boot-start command supports these additional options in version 7.2.2 and later:

Install splunk init script
In version 7.2.2 and later, enable boot-start includes a -systemd-managed 0|1 option that controls whether to install the splunk init script in /etc/init.d or the splunkd unit file in /etc/systemd/system. If you do not specify the -systemd-managed option, enable boot-start defaults to -systemd-managed 1 and installs the splunkd unit file.

To override the default and install the splunk init script, specify -systemd-managed 0. For example:

$SPLUNK_HOME/bin/splunk enable boot-start -systemd-managed 0 -user &amp;lt;username&amp;gt;
Init script installed at /etc/init.d/splunk.
Init script is configured to run at boot.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Mar 2019 18:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452639#M8226</guid>
      <dc:creator>smitra_splunk</dc:creator>
      <dc:date>2019-03-05T18:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452640#M8227</link>
      <description>&lt;P&gt;Don't forget that if you have boot-start enabled by one method and you want to swap to the other then you have to run two commands:-&lt;/P&gt;

&lt;P&gt;splunk disable boot-start&lt;BR /&gt;
splunk enable boot-start -systemd-managed 0&lt;/P&gt;

&lt;P&gt;or visa-versa to swap to systemctl from initd scripts&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 17:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452640#M8227</guid>
      <dc:creator>mikecarden</dc:creator>
      <dc:date>2019-05-30T17:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452641#M8228</link>
      <description>&lt;P&gt;Also refer to &lt;A href="https://answers.splunk.com/answers/738877/splunk-systemd-unit-file-in-versions-722-and-newer.html"&gt;Splunk systemd unit file in versions 7.2.2 and newer - how do I stop this prompting for the root password? (Q&amp;amp;A)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 21:56:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452641#M8228</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2019-05-30T21:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Major boot-start change with 7.2.3</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452642#M8229</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Summary of the issue:&lt;/STRONG&gt;&lt;BR /&gt;
Splunk 6.0.0 - Splunk 7.2.1 defaults to using &lt;STRONG&gt;init.d&lt;/STRONG&gt; when enabling boot start&lt;BR /&gt;
Splunk 7.2.2 - Splunk 7.2.9 defaults to using &lt;STRONG&gt;systemd&lt;/STRONG&gt; when enabling boot start&lt;BR /&gt;
Splunk 7.3.0 - Splunk 8.x defaults to using &lt;STRONG&gt;init.d&lt;/STRONG&gt; when enabling boot start&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;systemd&lt;/STRONG&gt; defaults to prompting for root credentials upon stop/start/restart of Splunk&lt;/P&gt;

&lt;P&gt;Here is a simple fix if you have encountered this issue and prefer to use the traditional &lt;STRONG&gt;init.d&lt;/STRONG&gt; scripts vs &lt;STRONG&gt;systemd&lt;/STRONG&gt;. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Splunk Enterprise/Heavy Forwarder example&lt;/STRONG&gt; (note: replace the splunk user below with the account you run splunk as):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sudo /opt/splunk/bin/splunk disable boot-start
sudo /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Splunk Universal Forwarder example&lt;/STRONG&gt; (note: replace the splunk user below with the account you run splunk as):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sudo /opt/splunkforwarder/bin/splunk disable boot-start
sudo /opt/splunkforwarder/bin/splunk enable boot-start -user splunk -systemd-managed 0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Dec 2019 18:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Major-boot-start-change-with-7-2-3/m-p/452642#M8229</guid>
      <dc:creator>bandit</dc:creator>
      <dc:date>2019-12-31T18:56:55Z</dc:date>
    </item>
  </channel>
</rss>

