polkit启动失败_zabbix4.4 启动失败分析

polkit启动失败_zabbix4.4 启动失败分析zabbix是基于WEB界面提供分布式系统监视以及网络监视功能的企业级开源解决方案,能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。做为开源用户的支持者,我们大部分环境用的软件包含监控软件、数据库、继承应用、操作系统等都是用开源的,例如centos、PG、zabbix、openshift等,但是开源的在成熟度上是不错,但是安装软件有时比…

大家好,又见面了,我是你们的朋友全栈君。

zabbix是基于WEB界面提供分布式系统监视以及网络监视功能的企业级开源解决方案,能监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。

做为开源用户的支持者,我们大部分环境用的软件包含监控软件、数据库、继承应用、操作系统等都是用开源的,例如centos、PG、zabbix、openshift等,但是开源的在成熟度上是不错,但是安装软件有时比较麻烦,例如centos的安全开关,默认情况下会导致我们在安装openshift、zabbix等导致失败,而错误日志提示往往与实际十万三千里,但是有经验的在安装完系统后会有意识性的去修改配置,避免不必要的问题,

如下问题:

在安装配置好zabbix后无法正常启动,原因是SELINUX设置问题导致启动失败,

故障分析:

[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.

1月 07 15:21:17 localhost.localdomain systemd[1]: PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start.

1月 07 15:21:17 localhost.localdomain systemd[1]: zabbix-server.service never wrote its PID file. Failing.

1月 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.

1月 07 15:21:17 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state.

1月 07 15:21:17 localhost.localdomain systemd[1]: zabbix-server.service failed.

1月 07 15:21:17 localhost.localdomain polkitd[804]: Unregistered Authentication Agent for unix-process:6787:8831344 (system bus name

1月 07 15:21:24 localhost.localdomain polkitd[804]: Registered Authentication Agent for unix-process:6797:8832061 (system bus name :

1月 07 15:21:27 localhost.localdomain systemd[1]: zabbix-server.service holdoff time over, scheduling restart.

1月 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.

1月 07 15:21:27 localhost.localdomain systemd[1]: PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start.

1月 07 15:21:27 localhost.localdomain systemd[1]: zabbix-server.service never wrote its PID file. Failing.

1月 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.

1月 07 15:21:27 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state.

1月 07 15:21:27 localhost.localdomain systemd[1]: zabbix-server.service failed.

1月 07 15:21:27 localhost.localdomain polkitd[804]: Unregistered Authentication Agent for unix-process:6797:8832061 (system bus name

lines 1907-1944/1944 (END)

Last login: Tue Jan 7 23:24:43 2020 from 10.100.81.67

查看 zabbix 日志分析:

发现日志提示权限问题:

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@localhost logs]# getenforce

Enforcing——这时发现selinux的配置是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

直接把selinux 关掉如下:

[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

优化修改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

重新启动:

[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 二 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

1月 07 15:26:56 localhost.localdomain systemd[1]: Starting Zabbix Server…

1月 07 15:26:56 localhost.localdomain systemd[1]: zabbix-server.service: Supervising process 1531 which is not our child. …exits.

1月 07 15:26:56 localhost.localdomain systemd[1]: Started Zabbix Server.

Hint: Some lines were ellipsized, use -l to show in full.

[root@localhost ~]#

因此,一般在安装一些开源软件,如MYSQL、POSTGRES、zabbix、openshift等,在安装前先检查下系统对应版本是否与需安装的软件兼容性、在检查下下,防火墙、安全等是否开启,如下:

1、iptables开启和关闭

2、SELinux开启和关闭

3、CentOS 6和CentOS 7 firewalld防火墙的开与关等

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/151184.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 1M等于多少字节[通俗易懂]

    1M等于多少字节[通俗易懂]1M=1024k=1048576字节算法是:1Byte(字节)=8bit(位)1KB=1024Byte(字节)1MB=1024KB1GB=1024MB1TB=1024GB一个汉字要占用2个字节如果换算成中文汉字那么就是1M=524288个汉字…

    2022年5月26日
  • Python lambda和reduce函数

    Python lambda和reduce函数

    2022年1月26日
  • 业务架构师如何进阶成长[通俗易懂]

    业务架构师如何进阶成长[通俗易懂]一、前言接触业务架构工作之后,除了单位提供的方法论外,为了做好这项工作,认真学习了软件过程、系统分析与设计、架构设计、设计模式、Java语言等内容,并研读了敏捷开发、领域驱动设计、工作流分析等方面的书籍,为了拓展对新技术的理解,在人工智能和区块链两方面也阅读了一些著作,总体而言,不够系统,都是为了能够更好地理解企业级业务架构的方法论及其向技术端的传导。除了恶补基础知识,更重要的当然是实践,珍惜每一个设计任务,珍惜每一次与业务人员、技术人员的沟通机会…

    2022年10月12日
  • 源码免杀教程 源码免杀思路详解

    绝对不一样的源码免杀教程!绝对不一样的免杀实战体验!清晰的思路!细致全面的思路详解!让你感到免杀原来可以这么简单!教你如何在源代码中找出被杀代码,修改代码从而达到免杀效果!免杀之-网络攻防入门书籍推荐《精通黑客免杀》一部关于黑客免杀技术的书籍,学习各种免杀,躲避杀毒软件的追杀,为自己的马放下一道赦免令。目前国内关于黑客免杀技术的书籍应该很少的,大致可以说是没有。在本书中所介绍的启发式扫描免杀…

    2022年4月4日
  • 六个主要的社会网络分析软件的比较

    六个主要的社会网络分析软件的比较
    UCINET简介  
        UCINET为菜单驱动的Windows程序,可能是最知名和最经常被使用的处理社会网络数据和其他相似性数据的综合性分析程序。与UCINET捆绑在一起的还有Pajek、Mage和NetDraw等三个软件。UCINET能够处理的原始数据为矩阵格式,提供了大量数据管理和转化工具。该程序本身不包含网络可视化的图形程序,但可将数据和处理结果输出至NetDraw、Pajek、Mage和KrackPlot等软件作图。UCINET包含大量包括探测凝聚子群(cliq

    2022年6月21日
  • window10怎么提供管理员权限删除文件_如何用管理员权限删除文件

    window10怎么提供管理员权限删除文件_如何用管理员权限删除文件http://www.xitongcity.com/jiaocheng/win8_content_3473.html很多win8.1系统用户在对磁盘文件进行清理时,经常会遇到“文件夹访问被拒绝,您需

    2022年8月1日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号