<?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: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423110#M3575</link>
    <description>&lt;P&gt;You are totally correct.  Splunk &lt;EM&gt;TOTALLY&lt;/EM&gt; borked the &lt;CODE&gt;systemd&lt;/CODE&gt; unit files and indeed it is force killing splunk, which is a VERY dangerous thing to do on indexers.  That is why in version 7.3 (just released), they switched back to &lt;CODE&gt;init.d&lt;/CODE&gt; boot start as the default.  This is an ongoing tragedy that is mostly documented in the 3 links below the the bottom line for now is there is NO WAY to make systemd work that is as secure as it should be (e.g. without modifying &lt;CODE&gt;polkit&lt;/CODE&gt; to be too permissive) so for now, stick to the &lt;CODE&gt;init.d&lt;/CODE&gt; method by using the &lt;CODE&gt;-systemd-managed 0&lt;/CODE&gt; argument.&lt;/P&gt;

&lt;P&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;BR /&gt;
&lt;A href="https://github.com/duckfez/splunk_systemd"&gt;https://github.com/duckfez/splunk_systemd&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/738877/splunk-systemd-unit-file-in-versions-722-and-newer.html"&gt;https://answers.splunk.com/answers/738877/splunk-systemd-unit-file-in-versions-722-and-newer.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2019 15:45:04 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-06-14T15:45:04Z</dc:date>
    <item>
      <title>Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423109#M3574</link>
      <description>&lt;P&gt;The linux admin chose to use the systemctl option for controlling stop|start|restart splunkd as described here...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.0/Admin/RunSplunkassystemdservice#Configure_systemd_using_enable_boot-start" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.0/Admin/RunSplunkassystemdservice#Configure_systemd_using_enable_boot-start&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However, now when I do a systemctl restart splunkd, the shutdown and restart is so fast it makes me think it is not gracefully shutting down and finishing whatever the splunk node was processing at the time.&lt;/P&gt;
&lt;P&gt;Besides checking journalctl -u splunkd for logs, is there a way to verify we are not losing data or data processing during a stop|restart?&lt;/P&gt;
&lt;P&gt;Is there a way to make systemctl stop|restart|start splunkd verbose?&lt;/P&gt;
&lt;P&gt;In 7.3.0 docs it appears there is an indication to choose init script or splunkd.service, is there a benefit to one over the other ? is init more compatible?&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 02:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423109#M3574</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2020-06-06T02:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423110#M3575</link>
      <description>&lt;P&gt;You are totally correct.  Splunk &lt;EM&gt;TOTALLY&lt;/EM&gt; borked the &lt;CODE&gt;systemd&lt;/CODE&gt; unit files and indeed it is force killing splunk, which is a VERY dangerous thing to do on indexers.  That is why in version 7.3 (just released), they switched back to &lt;CODE&gt;init.d&lt;/CODE&gt; boot start as the default.  This is an ongoing tragedy that is mostly documented in the 3 links below the the bottom line for now is there is NO WAY to make systemd work that is as secure as it should be (e.g. without modifying &lt;CODE&gt;polkit&lt;/CODE&gt; to be too permissive) so for now, stick to the &lt;CODE&gt;init.d&lt;/CODE&gt; method by using the &lt;CODE&gt;-systemd-managed 0&lt;/CODE&gt; argument.&lt;/P&gt;

&lt;P&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;BR /&gt;
&lt;A href="https://github.com/duckfez/splunk_systemd"&gt;https://github.com/duckfez/splunk_systemd&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/738877/splunk-systemd-unit-file-in-versions-722-and-newer.html"&gt;https://answers.splunk.com/answers/738877/splunk-systemd-unit-file-in-versions-722-and-newer.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 15:45:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423110#M3575</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-14T15:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423111#M3576</link>
      <description>&lt;P&gt;So adding the below options to the Service stanza in the systemd unit file does not actually allow graceful shutdown?  There is definitely a difference with the time it takes to execute systemctl restart splunkd when the below options are set.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;KillMode=mixed&lt;BR /&gt;
KillSignal=SIGINT&lt;BR /&gt;
TimeoutStopSec=10min&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 14 Jun 2019 16:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423111#M3576</guid>
      <dc:creator>livesplunkcomsk</dc:creator>
      <dc:date>2019-06-14T16:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423112#M3577</link>
      <description>&lt;P&gt;It does but, if you read the links, that is only 1 of a significant list of very serious problems with the &lt;CODE&gt;systemd&lt;/CODE&gt; implementation for splunk.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2019 22:17:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423112#M3577</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-15T22:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423113#M3578</link>
      <description>&lt;P&gt;Hey @woodcock, do you know where the documentation is referencing the change to boot start?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 12:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423113#M3578</guid>
      <dc:creator>jazzypai</dc:creator>
      <dc:date>2019-06-17T12:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423114#M3579</link>
      <description>&lt;P&gt;I could not find it in the documentation but try it and you will see with your own eyes.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 13:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423114#M3579</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-17T13:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Version 7.2.6 - how to verify systemctl restart|stop splunkd is shutting down gracefully?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423115#M3580</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 19:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Version-7-2-6-how-to-verify-systemctl-restart-stop-splunkd-is/m-p/423115#M3580</guid>
      <dc:creator>bandit</dc:creator>
      <dc:date>2019-12-31T19:01:05Z</dc:date>
    </item>
  </channel>
</rss>

