Ubuntu

無法停止 nagios nrpe 伺服器

  • August 17, 2021

注意:我指的是舊的 Ubuntu 14.04 !:(別怪我,這不是我的錯。

我有這個過程

在此處輸入圖像描述

當我殺死時,某些東西會自動重新啟動它。

我需要阻止它!

我嘗試了以下沒有成功的方法

# systemctl disable nrpe.service
# systemctl stop nrpe.service
# systemctl status nrpe.service
nrpe.service - Nagios Remote Plugin Executor
  Loaded: loaded (/etc/systemd/system/nrpe.service; disabled)
  Active: failed (Result: exit-code) since Tue 2021-08-17 09:44:23 CEST; 14min ago
    Docs: http://www.nagios.org/documentation
Main PID: 21974 (code=exited, status=1/FAILURE)
  CGroup: name=dsystemd:/system/nrpe.service

Aug 17 09:44:23 localhost nrpe[21974]: Starting up daemon
Aug 17 09:44:23 localhost nrpe[21974]: Bind to port 5666 on 0.0.0.0 failed: Address already in use.

我也試過

# /etc/init.d/nagios-nrpe-server stop
# /etc/init.d/nagios-nrpe-server status
#

但在 htop 程序仍在執行

我使用舊方式查詢服務狀態

# service --status-all
[ - ]  nagios-nrpe-server

# service nagios-nrpe-server stop

但是程序仍然在這裡(使用不同的 PID,所以它會自動重啟)

# systemctl stop nagios-nrpe-server
Failed to issue method call: Unit nagios-nrpe-server.service not loaded.
# systemctl disable nagios-nrpe-server
Failed to issue method call: No such file or directory

解決 !

# stop nrpe
# rm -f /etc/init/nrpe.conf

在此處找到說明:https: //support.nagios.com/kb/print-741.html

引用自:https://unix.stackexchange.com/questions/665003