We have HBase service configured as follows:
[Unit]
Description=Hbase
[Service]
Type=forking
User=hbase
Group=hbase
WorkingDirectory=/opt/hbase
ExecStart=/opt/hbase/bin/hbase-daemon.sh start regionserver
ExecStop=/opt/hbase/bin/hbase-daemon.sh stop regionserver
LimitNOFILE=128000
TimeoutSec=300
Restart=always
RestartSec=300
StartLimitBurst=10
StartLimitInterval=3600
[Install]
WantedBy=multi-user.target
When I manually stop HBase using the command /opt/hbase/bin/hbase-daemon.sh stop regionserver
, systemd restarts the service automatically. However, when I use systemctl stop hbase, the service stops as expected and does not restart.
Could you please explain why this is occurring?
What does systemd
do in the background to determine the cause of a service stop?