<?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: Systemd support with Splunk does not work on SLES in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412388#M173584</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:44:48 GMT</pubDate>
    <dc:creator>bandit</dc:creator>
    <dc:date>2019-12-31T18:44:48Z</dc:date>
    <item>
      <title>Systemd support with Splunk does not work on SLES</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412383#M173579</link>
      <description>&lt;P&gt;When we set up Splunk to start under systemd it prompts us recursively for the root password even we're running Splunk as root Or we're running under sudo.&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/bin/splunk enable boot-start -user splunk&lt;BR /&gt;
$SPLUNK_HOME/bin/splunk start&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:49:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412383#M173579</guid>
      <dc:creator>dchoi_splunk</dc:creator>
      <dc:date>2020-09-29T22:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd support with Splunk does not work on SLES</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412384#M173580</link>
      <description>&lt;P&gt;After enabling auto-start under systemd : no issue here&lt;BR /&gt;
$SPLUNK_HOME/bin/splunk enable boot-start -user splunk&lt;BR /&gt;
$SPLUNK_HOME/bin/splunk start&lt;/P&gt;

&lt;P&gt;Starting splunk via systemctl from the root user works as expected&lt;BR /&gt;
Starting splunk as per the doco ($SPLUNK_HOME/bin/splunk start) as below,&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/RunSplunkassystemdservice#Configure_systemd_using_enable_boot-start" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/RunSplunkassystemdservice#Configure_systemd_using_enable_boot-start&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;To start splunkd.&lt;BR /&gt;
[sudo] $SPLUNK_HOME/bin/splunk start&lt;BR /&gt;
This starts splunkd as a systemd service.&lt;/P&gt;

&lt;P&gt;Getting into the following:&lt;/P&gt;

&lt;P&gt;Stopped helpers. &lt;BR /&gt;
Removing stale pid file... done.&lt;BR /&gt;
Splunk&amp;gt; The Notorious B.I.G. D.A.T.A.&lt;BR /&gt;
Checking prerequisites... &lt;BR /&gt;
Checking http port [8000]: open &lt;BR /&gt;
Checking mgmt port [8089]: open &lt;BR /&gt;
Checking appserver port [127.0.0.1:8065]: open &lt;BR /&gt;
Checking kvstore port [8191]: open &lt;BR /&gt;
Checking configuration... Done. &lt;BR /&gt;
Checking critical directories... Done &lt;BR /&gt;
Checking indexes... &lt;BR /&gt;
Validated: _audit _internal _introspection _telemetry _thefishbucket history main summary &lt;BR /&gt;
Done &lt;BR /&gt;
Checking filesystem compatibility... Done &lt;BR /&gt;
Checking conf files for problems... &lt;BR /&gt;
Done &lt;BR /&gt;
Checking default conf files for edits... &lt;BR /&gt;
Validating installed files against hashes from '/opt/splunk/splunk-7.2.3-06d57c595b80-linux-2.6-x86_64-manifest' &lt;BR /&gt;
All installed files intact. &lt;BR /&gt;
Done &lt;BR /&gt;
All preliminary checks passed.&lt;BR /&gt;
Starting splunk server daemon (splunkd)... &lt;BR /&gt;
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === &lt;BR /&gt;
Authentication is required to start 'Splunkd.service'. &lt;BR /&gt;
Authenticating as: root &lt;BR /&gt;
Password:&lt;/P&gt;

&lt;P&gt;Once you're running into the issue, you'll be able to get the Splunk started with below workaround:&lt;/P&gt;

&lt;P&gt;Under the path for SLES 12,  /etc/polkit-1/rules.d, making a rule for Splunk user and org.freedesktop.systemd1.manage-units as below:&lt;/P&gt;

&lt;H1&gt;cat /etc/polkit-1/rules.d/10-splunk.rules&lt;/H1&gt;

&lt;P&gt;polkit.addRule(function(action, subject) {&lt;BR /&gt;
  if(action.id == "org.freedesktop.systemd1.manage-units" &amp;amp;&amp;amp; subject.user == "splunk") {&lt;BR /&gt;
    return polkit.Result.YES;&lt;BR /&gt;
  }&lt;BR /&gt;
});&lt;/P&gt;

&lt;P&gt;It would allow the Splunk service to start as normal.&lt;BR /&gt;
In addition, Splunk will be working further under SPL-164816, which systemd configuration on SLES prompts root password when starting for the fix. Stay tuned.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412384#M173580</guid>
      <dc:creator>dchoi_splunk</dc:creator>
      <dc:date>2020-09-29T22:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd support with Splunk does not work on SLES</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412385#M173581</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
do you have an update regarding that issue? We are having the same problems and the workaround didn't work. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;
Alex&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 11:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412385#M173581</guid>
      <dc:creator>Spranta</dc:creator>
      <dc:date>2019-11-12T11:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd support with Splunk does not work on SLES</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412386#M173582</link>
      <description>&lt;P&gt;Try &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>Wed, 13 Nov 2019 01:51:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412386#M173582</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2019-11-13T01:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd support with Splunk does not work on SLES</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412387#M173583</link>
      <description>&lt;P&gt;also not working on SuSe Enterprise Server 12 &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 07:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412387#M173583</guid>
      <dc:creator>Spranta</dc:creator>
      <dc:date>2019-11-13T07:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd support with Splunk does not work on SLES</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412388#M173584</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:44:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Systemd-support-with-Splunk-does-not-work-on-SLES/m-p/412388#M173584</guid>
      <dc:creator>bandit</dc:creator>
      <dc:date>2019-12-31T18:44:48Z</dc:date>
    </item>
  </channel>
</rss>

