<?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: Splunkをsystemdサービスとして停止するときの問題について in Security</title>
    <link>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452719#M13243</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:55:02 GMT</pubDate>
    <dc:creator>bandit</dc:creator>
    <dc:date>2019-12-31T18:55:02Z</dc:date>
    <item>
      <title>Splunkをsystemdサービスとして停止するときの問題について</title>
      <link>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452717#M13241</link>
      <description>&lt;P&gt;CentOS に 7.2.3 の Splunk Forwarder をインストールし、以下のマニュアルに記載された手順をもとに fowarder を systemd のサービスとして登録しました。&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;但し、"systemctl stop Splunkd.service" で forwarder を停止しようとしたときに、splunkのプロセスが強制終了されているように見えます。&lt;BR /&gt;
強制終了ではなく、"./splunk stop"のように終了する方法はありますでしょうか。&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 03:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452717#M13241</guid>
      <dc:creator>cweiliou_splunk</dc:creator>
      <dc:date>2019-03-22T03:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunkをsystemdサービスとして停止するときの問題について</title>
      <link>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452718#M13242</link>
      <description>&lt;P&gt;splunkd プロセスが強制終了される理由としては、systemd が SIGTERM シグナルを送っているためです。&lt;BR /&gt;
SIGTERM を SIGINT に変更することで強制終了の問題を回避することができます。&lt;BR /&gt;
なお、splunk の unit ファイルに「KillMode=mixed」および「KillSignal=SIGINT」を追加することで、SIGTERM から SIGINT に変更できます。&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# cat /etc/systemd/system/Splunkd.service
#This unit file replaces the traditional start-up script for systemd
#configurations, and is used when enabling boot-start for Splunk on
#systemd-based Linux distributions.

[Unit]
Description=Systemd service file for Splunk, generated by 'splunk enable boot-start'
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/home/splunk/723_so/splunk/bin/splunk _internal_launch_under_systemd
LimitNOFILE=65536
SuccessExitStatus=51 52
RestartPreventExitStatus=51
RestartForceExitStatus=52
User=splunk
Delegate=true
MemoryLimit=100G
CPUShares=1024
PermissionsStartOnly=true
ExecStartPost=/bin/bash -c "chown -R splunk:splunk /sys/fs/cgroup/cpu/system.slice/%n"
ExecStartPost=/bin/bash -c "chown -R splunk:splunk /sys/fs/cgroup/memory/system.slice/%n"
KillMode=mixed
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;また、splunk がシャットダウンに時間がかかる場合でも、強制終了される可能性がありますので、その際には、unitファイルに「TimeoutStopSec」を追加し、timeoutの時間を増やしてください。&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 03:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452718#M13242</guid>
      <dc:creator>cweiliou_splunk</dc:creator>
      <dc:date>2019-03-22T03:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunkをsystemdサービスとして停止するときの問題について</title>
      <link>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452719#M13243</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:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk%E3%82%92systemd%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%A8%E3%81%97%E3%81%A6%E5%81%9C%E6%AD%A2%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/m-p/452719#M13243</guid>
      <dc:creator>bandit</dc:creator>
      <dc:date>2019-12-31T18:55:02Z</dc:date>
    </item>
  </channel>
</rss>

