In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Zabbix is an enterprise-level open source solution that provides distributed system monitoring and network monitoring functions based on WEB interface. It can monitor various network parameters and ensure the safe operation of the server system. It also provides a flexible notification mechanism to enable system administrators to quickly locate / solve various problems.
As proponents of open source users, most of the software we use in our environment, including monitoring software, databases, inherited applications, operating systems, etc., are open source, such as centos, PG, zabbix, openshift, etc., but open source is good in maturity, but it is sometimes troublesome to install software, such as centos's security switch, which by default will cause us to fail in installing openshift, zabbix, etc. The error log prompts are often the same as the actual 103000 miles, but experienced people will consciously modify the configuration after installing the system to avoid unnecessary problems.
The following questions are asked:
Unable to start normally after installing and configuring zabbix, due to startup failure due to problems with SELINUX settings
Fault analysis:
[root@localhost zabbix] # systemctl start zabbix-server.service
Job for zabbix-server.service failed because a configured resource limit was exceeded. See "systemctl status zabbix-server.service" and "journalctl-xe" for details.
[root@localhost zabbix] # journalctl-xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-server.service has begun starting up.
15:21:17 localhost.localdomain systemd [1]: PID file / run/zabbix/zabbix_server.pid not readable (yet?) After start.
January 07 15:21:17 localhost.localdomain systemd [1]: zabbix-server.service never wrote its PID file. Failing.
January 07 15:21:17 localhost.localdomain systemd [1]: Failed to start Zabbix Server.
-- Subject: Unit zabbix-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-server.service has failed.
--
-- The result is failed.
January 07 15:21:17 localhost.localdomain systemd [1]: Unit zabbix-server.service entered failed state.
January 07 15:21:17 localhost.localdomain systemd [1]: zabbix-server.service failed.
January 07 15:21:17 localhost.localdomain polkitd: Unregistered Authentication Agent for unix-process:6787:8831344 (system bus name
January 07 15:21:24 localhost.localdomain polkitd: Registered Authentication Agent for unix-process:6797:8832061 (system bus name:
15:21:27 localhost.localdomain systemd [1]: zabbix-server.service holdoff time over, scheduling restart.
January 07 15:21:27 localhost.localdomain systemd [1]: Starting Zabbix Server...
-- Subject: Unit zabbix-server.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Unit zabbix-server.service has begun starting up.
15:21:27 localhost.localdomain systemd [1]: PID file / run/zabbix/zabbix_server.pid not readable (yet?) After start.
January 07 15:21:27 localhost.localdomain systemd [1]: zabbix-server.service never wrote its PID file. Failing.
January 07 15:21:27 localhost.localdomain systemd [1]: Failed to start Zabbix Server.
-- Subject: Unit zabbix-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit zabbix-server.service has failed.
--
-- The result is failed.
January 07 15:21:27 localhost.localdomain systemd [1]: Unit zabbix-server.service entered failed state.
January 07 15:21:27 localhost.localdomain systemd [1]: zabbix-server.service failed.
January 07 15:21:27 localhost.localdomain polkitd: Unregistered Authentication Agent for unix-process:6797:8832061 (system bus name
Lines 1907-1944 Compact 1944 (END)
Last login: Tue Jan 7 23:24:43 2020 from 10.100.81.67
View the zabbix log analysis:
Found that the log prompts permission issues:
5966:20200107:145500.376 using configuration file: / etc/zabbix/zabbix_server.conf
5966:20200107:145500.376 cannot set resource limit: [13] Permission denied
5966:20200107:145500.376 cannot disable core dump, exiting...
5976:20200107:145506.314 Starting Zabbix Server. Zabbix 4.4.4 (revision 3131fdac04
Root cause analysis of the problem:
[root@localhost logs] # getenforce
Enforcing- then found that the configuration of selinux was Enforcing.
[root@localhost logs] # sestatus
SELinux status: enabled
SELinuxfs mount: / sys/fs/selinux
SELinux root directory: / etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@localhost logs] # cd / etc/selinux
[root@localhost selinux] # ls
Config final semanage.conf targeted tmp
Just turn off selinux as follows:
[root@localhost selinux] # vi config
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
Enforcing-SELinux security policy is enforced.
Permissive-SELinux prints warnings instead of enforcing.
Disabled-No SELinux policy is loaded.
SELINUX=disabled
SELINUXTYPE= can take one of three two values:
Targeted-Targeted processes are protected
Minimum-Modification of targeted policy. Only selected processes are protected.
Mls-Multi Level Security protection.
SELINUXTYPE=targeted
Optimize and modify SELINUX=disabled
[root@localhost selinux] # vi config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing-SELinux security policy is enforced.
# permissive-SELinux prints warnings instead of enforcing.
# disabled-No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted-Targeted processes are protected
# minimum-Modification of targeted policy. Only selected # processes are protected.
# mls-Multi Level Security protection.
SELINUXTYPE=targeted
Restart:
[root@localhost ~] # systemctl start zabbix-server.service
[root@localhost ~] # systemctl status zabbix-server.service
● zabbix-server.service-Zabbix Server
Loaded: loaded (/ usr/lib/systemd/system/zabbix-server.service; disabled; vendor preset: disabled)
Active: active (running) since II 2020-01-07 15:26:56 CST; 6s ago
Process: 1529 ExecStart=/usr/sbin/zabbix_server-c $CONFFILE (code=exited, status=0/SUCCESS)
Main PID: 1531 (zabbix_server)
CGroup: / system.slice/zabbix-server.service
└─ 1531 / usr/sbin/zabbix_server-c / etc/zabbix/zabbix_server.conf
January 07 15:26:56 localhost.localdomain systemd [1]: Starting Zabbix Server...
15:26:56 localhost.localdomain systemd [1]: zabbix-server.service: Supervising process 1531 which is not our child. ... exits.
January 07 15:26:56 localhost.localdomain systemd [1]: Started Zabbix Server.
Hint: Some lines were ellipsized, use-l to show in full.
[root@localhost ~] #
Therefore, before installing some open source software, such as MYSQL, POSTGRES, zabbix, openshift, etc., check whether the corresponding version of the system is compatible with the software to be installed, and check whether the firewall and security are enabled, as follows:
1. Iptables on and off
2. SELinux on and off
3. Opening and closing of CentOS 6 and CentOS 7 firewalld firewalls, etc.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.