<?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 and manual detention in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580897#M11147</link>
    <description>&lt;P&gt;Actually removing manual detention commands service starts without any error or warning.&lt;/P&gt;&lt;P&gt;On the other hand, instead, once I start the service replication factor and search factor remain unsatisfied, while putting the node in manual detention before the service restart then replication and search factor are met.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jan 2022 07:41:39 GMT</pubDate>
    <dc:creator>nicofantinato</dc:creator>
    <dc:date>2022-01-13T07:41:39Z</dc:date>
    <item>
      <title>Systemd and manual detention</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580790#M11135</link>
      <description>&lt;P&gt;Hello to everyone,&lt;/P&gt;&lt;P&gt;on my indexers I just configured Splunk as a service with systemd, start command works fine but stop command (systemctl stop Splunkd), instead, returns some errors:&lt;/P&gt;&lt;PRE&gt;[root@pe-sec-idx-02 system]# systemctl status Splunkd&lt;BR /&gt;● Splunkd.service - Systemd service file for Splunk, generated by 'splunk enable boot-start'&lt;BR /&gt;Loaded: loaded (/etc/systemd/system/Splunkd.service; enabled; vendor preset: disabled)&lt;BR /&gt;Active: failed (Result: exit-code) since Wed 2022-01-12 15:18:32 CET; 9s ago&lt;BR /&gt;Process: 1462 ExecStop=/opt/splunk/bin/splunk _internal_launch_under_systemd (code=exited, status=1/FAILURE)&lt;BR /&gt;Process: 31484 ExecStop=/bin/sleep 10 (code=exited, status=0/SUCCESS)&lt;BR /&gt;Process: 31225 ExecStop=/sbin/runuser -l splunk -c /opt/splunk/bin/splunk edit cluster-config -manual_detention on -auth admin:D1c3mbr3Sec (code=exited, status=0/SUCCESS)&lt;BR /&gt;Process: 20750 ExecStartPost=/bin/bash -c chown -R 1001:1001 /sys/fs/cgroup/memory/system.slice/%n (code=exited, status=0/SUCCESS)&lt;BR /&gt;Process: 20746 ExecStartPost=/bin/bash -c chown -R 1001:1001 /sys/fs/cgroup/cpu/system.slice/%n (code=exited, status=0/SUCCESS)&lt;BR /&gt;Process: 20643 ExecStartPost=/sbin/runuser -l splunk -c /opt/splunk/bin/splunk edit cluster-config -manual_detention off -auth admin:D1c3mbr3Sec (code=exited, status=0/SUCCESS)&lt;BR /&gt;Process: 19156 ExecStartPost=/bin/sleep 60 (code=exited, status=0/SUCCESS)&lt;BR /&gt;Process: 19155 ExecStart=/opt/splunk/bin/splunk _internal_launch_under_systemd (code=exited, status=52)&lt;BR /&gt;Main PID: 19155 (code=exited, status=52)&lt;BR /&gt;&lt;BR /&gt;Jan 12 15:12:20 pe-sec-idx-02 splunk[19155]: All installed files intact.&lt;BR /&gt;Jan 12 15:12:20 pe-sec-idx-02 splunk[19155]: Done&lt;BR /&gt;Jan 12 15:12:21 pe-sec-idx-02 splunk[19155]: Checking replication_port port [9887]: 2022-01-12 15:12:21.354 +0100 splunkd started (build 7651b7244cf2)&lt;BR /&gt;Jan 12 15:13:17 pe-sec-idx-02 systemd[1]: Started Systemd service file for Splunk, generated by 'splunk enable boot-start'.&lt;BR /&gt;Jan 12 15:18:03 pe-sec-idx-02 systemd[1]: Stopping Systemd service file for Splunk, generated by 'splunk enable boot-start'...&lt;BR /&gt;Jan 12 15:18:16 pe-sec-idx-02 systemd[1]: Splunkd.service: control process exited, code=exited status=1&lt;BR /&gt;Jan 12 15:18:16 pe-sec-idx-02 splunk[19155]: 2022-01-12 15:18:16.021 +0100 Interrupt signal received&lt;BR /&gt;Jan 12 15:18:34 pe-sec-idx-02 systemd[1]: Stopped Systemd service file for Splunk, generated by 'splunk enable boot-start'.&lt;BR /&gt;Jan 12 15:18:34 pe-sec-idx-02 systemd[1]: Unit Splunkd.service entered failed state.&lt;BR /&gt;Jan 12 15:18:34 pe-sec-idx-02 systemd[1]: Splunkd.service failed.&lt;/PRE&gt;&lt;P&gt;Despite the output, service stops successfully.&lt;/P&gt;&lt;P&gt;As you can see, I added some instructions in the service unit file to put the indexer (which is part of a cluster) in manual detention before stopping it, and also it turns manual detention off once Splunk is started. I say again that stop/start commands work good, but in any case I get the above error messages when I stop the service.&lt;/P&gt;&lt;P&gt;Am I doing something wrong?&lt;/P&gt;&lt;P&gt;This is my service unit file:&lt;/P&gt;&lt;PRE&gt;#This unit file replaces the traditional start-up script for systemd&lt;BR /&gt;#configurations, and is used when enabling boot-start for Splunk on&lt;BR /&gt;#systemd-based Linux distributions.&lt;BR /&gt;&lt;BR /&gt;[Unit]&lt;BR /&gt;Description=Systemd service file for Splunk, generated by 'splunk enable boot-start'&lt;BR /&gt;After=network.target&lt;BR /&gt;&lt;BR /&gt;[Service]&lt;BR /&gt;Type=simple&lt;BR /&gt;Restart=always&lt;BR /&gt;ExecStart=/opt/splunk/bin/splunk _internal_launch_under_systemd&lt;BR /&gt;ExecStartPost=/bin/sleep 60&lt;BR /&gt;ExecStartPost=/sbin/runuser -l splunk -c '/opt/splunk/bin/splunk edit cluster-config -manual_detention off -auth admin:D1c3mbr3Sec'&lt;BR /&gt;ExecStop=/sbin/runuser -l splunk -c '/opt/splunk/bin/splunk edit cluster-config -manual_detention on -auth admin:D1c3mbr3Sec'&lt;BR /&gt;ExecStop=/bin/sleep 10&lt;BR /&gt;ExecStop=/opt/splunk/bin/splunk _internal_launch_under_systemd&lt;BR /&gt;LimitNOFILE=64000&lt;BR /&gt;LimitNPROC=16000&lt;BR /&gt;SuccessExitStatus=51 52&lt;BR /&gt;RestartPreventExitStatus=51&lt;BR /&gt;RestartForceExitStatus=52&lt;BR /&gt;User=splunk&lt;BR /&gt;Delegate=true&lt;BR /&gt;CPUShares=1024&lt;BR /&gt;CPUQuota=1400%&lt;BR /&gt;MemoryLimit=30G&lt;BR /&gt;PermissionsStartOnly=true&lt;BR /&gt;ExecStartPost=/bin/bash -c "chown -R 1001:1001 /sys/fs/cgroup/cpu/system.slice/%n"&lt;BR /&gt;ExecStartPost=/bin/bash -c "chown -R 1001:1001 /sys/fs/cgroup/memory/system.slice/%n"&lt;BR /&gt;KillMode=mixed&lt;BR /&gt;KillSignal=SIGINT&lt;BR /&gt;TimeoutStopSec=10min&lt;BR /&gt;&lt;BR /&gt;[Install]&lt;BR /&gt;WantedBy=multi-user.target&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 15:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580790#M11135</guid>
      <dc:creator>nicofantinato</dc:creator>
      <dc:date>2022-01-12T15:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd and manual detention</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580805#M11137</link>
      <description>&lt;P&gt;If you remove the manual detention command does the error still occur?&lt;/P&gt;&lt;P&gt;There's no need to put the indexer into detention because a stopped indexer can't receive data, anyway.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 15:27:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580805#M11137</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-12T15:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Systemd and manual detention</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580897#M11147</link>
      <description>&lt;P&gt;Actually removing manual detention commands service starts without any error or warning.&lt;/P&gt;&lt;P&gt;On the other hand, instead, once I start the service replication factor and search factor remain unsatisfied, while putting the node in manual detention before the service restart then replication and search factor are met.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 07:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Systemd-and-manual-detention/m-p/580897#M11147</guid>
      <dc:creator>nicofantinato</dc:creator>
      <dc:date>2022-01-13T07:41:39Z</dc:date>
    </item>
  </channel>
</rss>

