搭建环境 | 系统:centos 7 | Java 1.8 | zabbix 3.4
代码语言:javascript复制[root@master web]# systemctl status zabbix-server.service
● zabbix-server.service - Zabbix Serve
Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
Active: deactivating (stop-sigterm) (Result: exit-code) since 三 2018-09-12 13:09:29 CST; 1 weeks 1 days ago
Main PID: 30527 (code=exited, status=0/SUCCESS)
Tasks: 2
Memory: 5.3M
CGroup: /system.slice/zabbix-server.service
├─30548 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
└─30562 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
9月 12 13:09:38 master kill[30613]: -a, --all do not restrict...es
9月 12 13:09:38 master kill[30613]: with the same uid as the present process
9月 12 13:09:38 master kill[30613]: -s, --signal <sig> send specified ...al
9月 12 13:09:38 master kill[30613]: -q, --queue <sig> use sigqueue(2)...2)
9月 12 13:09:38 master kill[30613]: -p, --pid print pids with...em
9月 12 13:09:38 master kill[30613]: -l, --list [=<signal>] list signal nam...me
9月 12 13:09:38 master kill[30613]: -L, --table list signal nam...rs
9月 12 13:09:38 master kill[30613]: -h, --help display this help and exit
9月 12 13:09:38 master kill[30613]: -V, --version output version informat...it
9月 12 13:09:38 master kill[30613]: For more details see kill(1).
Hint: Some lines were ellipsized, use -l to show in full.
systemctl restart zabbix-server.service 卡死不动
代码语言:javascript复制[root@master web]# systemctl status zabbix-agent
● zabbix-agent.service - Zabbix Agent
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
Active: active (running) since 四 2018-09-20 15:06:36 CST; 17h ago
Process: 25531 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 25538 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
Main PID: 25542 (zabbix_agentd)
Tasks: 6
Memory: 2.0M
CGroup: /system.slice/zabbix-agent.service
├─25542 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
├─25544 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
├─25545 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
├─25546 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
├─25547 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
└─25548 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
9月 20 15:06:33 master systemd[1]: Starting Zabbix Agent...
9月 20 15:06:35 master systemd[1]: PID file /run/zabbix/zabbix_agentd.pid not readable (yet?) after start.
9月 20 15:06:36 master systemd[1]: zabbix-agent.service: Supervising process 25542 which is not our child. We'll most like... exits.
9月 20 15:06:36 master systemd[1]: Started Zabbix Agent.
Hint: Some lines were ellipsized, use -l to show in full.
systemctl status zabbix-agent 正常启动
查看zabbix的服务进程存在
[root@master web]# ps -ef|grep zabbix-serve
代码语言:javascript复制root 24021 22785 54 08:24 pts/0 00:00:00 grep --color=auto zabbix-serve
[root@master web]# ps -ef|grep zabbix
root 24027 22785 74 08:24 pts/0 00:00:00 grep --color=auto zabbix
zabbix 30548 1 0 9月12 ? 00:00:00 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
zabbix 30562 1 0 9月12 ? 00:00:00 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
全部杀掉,进程存在可能和卸载zabbix有关系(之前安装过一次,因为密码错误卸掉重装)
[root@master web]# systemctl start zabbix-serve
[root@master web]# systemctl status zabbix-server
重新启动后正常
代码语言:javascript复制● zabbix-server.service - Zabbix Server
Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
Active: active (running) since 五 2018-09-21 08:25:36 CST; 4s ago
Process: 24119 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
Main PID: 24122 (zabbix_server)
Tasks: 14
Memory: 4.4M
CGroup: /system.slice/zabbix-server.service
├─24122 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─24124 /usr/sbin/zabbix_server: configuration syncer [waiting 60 sec for processes]
├─24125 /usr/sbin/zabbix_server: alerter [connecting to the database]
├─24127 /usr/sbin/zabbix_server: alerter [connecting to the database]
├─24128 /usr/sbin/zabbix_server: alerter [connecting to the database]
├─24129 /usr/sbin/zabbix_server: housekeeper [startup idle for 30 minutes]
├─24130 /usr/sbin/zabbix_server: timer #1 [processed 0 triggers, 0 events in 0.000000 sec, 0 maintenances in 0.000000 s...
├─24132 /usr/sbin/zabbix_server: http poller #1 [got 0 values in 0.021361 sec, idle 5 sec]
├─24134 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─24135 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─24137 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─24138 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─24139 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
├─24140 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
└─24141 /usr/sbin/zabbix_server -c /etc/zabbix/zabbix_server.conf
9月 21 08:25:34 master systemd[1]: Starting Zabbix Server...
9月 21 08:25:35 master systemd[1]: PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start.
9月 21 08:25:36 master systemd[1]: zabbix-server.service: Supervising process 24122 which is not our child. We'll most lik... exits.
9月 21 08:25:36 master systemd[1]: Started Zabbix Server.
Hint: Some lines were ellipsized, use -l to show in full.
进zabbix web里提示zabbix server is not running: the information displayed may not be current!
修改 /etc/zabbix/zabbix_server.conf 里DBPort、DBPassword、DBUser、DBName
有注释掉的全部放开,重启zabbix-serve.service