前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >polkit启动失败_zabbix4.4 启动失败分析

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

作者头像
全栈程序员站长
发布于 2022-06-25 08:04:50
发布于 2022-06-25 08:04:50
3K0
举报

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

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.cn/151184.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
大数据CDH平台安装部署再也不用愁了
随着公司发展,业务数据量增涨,越来越多的公司都开始利用大数据平台,分析业务,但是大数据平台构建比较复杂,如果完全手动安装(其实非常不方便,组件和版本都要关联对应)。有没有方便一点的安装呢?,有,目前主流大数据平台集成环境安装:分别是CDH 或者Ambari.本文主要介绍CDH 安装。
Linux运维技术之路
2022/06/07
1.2K0
大数据CDH平台安装部署再也不用愁了
%E5%8C%85%E5%AD%90
使用systemctl status firewalld查看防火墙的状态,如下(默认开启)
知忆
2021/06/11
5330
CentOs7安装部署Zabbix3.4 原
[root@localhost ~]# getenforce   Disabled                                     #Disabled 为关闭
拓荒者
2019/03/11
6080
CentOs7安装部署Zabbix3.4
                                                                            原
MySQL PXC 5.7 invalid user‘@MYSQLD_USER@’
最近的PXC 5.7启动的时候收到一个无效用户的提示,invalid user ‘@MYSQLD_USER@’,这个问题还真是头一次碰到,而且这个MYSQLD_USER压根也是一个不存在的用户,到底是哪里的问题呢?见下文描述及其解决方案。
Leshami
2018/08/06
1.9K0
Mysql报错:InnoDB: Operating system error number 13 in a fil..的解决方法
查看日志后可以看到日志中的ERROR信息,不懂的地方可以翻译一下,方便理解,寻找有用的信息。
非著名运维
2022/06/22
1.5K0
PXC 5.7 WSREP_SST: [ERROR] xtrabackup_checkpoints missing
前阵子在配置好了PXC5.7之后,在启动其中的一个节点,碰到了 [ERROR] xtrabackup_checkpoints missing. xtrabackup/SST failed on DONOR。关于这个错误,需要从其它节点来获取更详细的日志描述。下文是对这个问题的描述及解决,供大家参考。
Leshami
2018/08/06
2K0
centos7安装docker
Docker从1.13版本之后采用时间线的方式作为版本号,分为社区版CE和企业版EE。
周小董
2019/03/25
1.2K0
centos7安装docker
数字证书系列--用证书搭建https网站
在前面一节介绍了如何创建CA, 以及如何用CA对CSR 证书请求文件进行签名,从而生成签名的服务器端证书。生成签名证书不是我们的最终目的,利用生成的签名证书来加密通信才是我们要达到的目的;这里跟我一起来学习如何使用这个签名的证书来搭建最简单的https网站:
qsjs
2020/06/09
1.6K0
【Ceph】 OSD data directory /var/lib/ceph/osd/ceph-xxx does not exist; bailing out.
今天巡检集群的时候发现一个老 ceph 群有一个 osd 挂了,具体报错如下,本人介绍一下处理的方法。
runzhliu
2021/03/02
9220
启动zabbix 报错
启动zabbix,提示报错 [root@hf-01 ~]# systemctl start zabbix-server 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@hf-01 ~]# systemctl stat
运维小白
2018/02/07
1.8K0
docker 启动失败:Failed to start Docker Application Container Engine
突然出现,并不是刚安装出现,唯一能得到的信息是:Failed to start Docker Application Container Engine,但是并没有明确的提示
卓越笔记
2023/03/04
4K0
docker 启动失败:Failed to start Docker Application Container Engine
Centos7.9安装phpldapadmin
亲测可用,之前搜索了很多博客,啥样的都有,就是不介绍报错以及配置用处,根本不懂照抄那些配置是干啥的,稀里糊涂的按照博客搭完也跑不起来,因此记录这个。
刘大猫
2025/01/19
770
[ERROR] WSREP no such a transition REPLICATING
满心欢喜的测试高大上的PXC,还没折腾几天就碰到了Bug,主要的错误提示为[ERROR] WSREP: FSM: no such a transition REPLICATING -> REPLICATING,后面的描述是碰到了Bug。本文是具体描述及其解决方案。
Leshami
2018/08/06
1.1K0
记一次 Windows MySQL 恢复
因为本地的服务器硬件出现故障,导致一台 Windows 系统的开发环境挂了,且无法短时间内恢复状态。
星哥玩云
2022/08/18
4700
记一次 Windows MySQL 恢复
Centos7.9安装openldap
亲测可用,之前搜索了很多博客,啥样的都有,就是不介绍报错以及配置用处,根本不懂照抄那些配置是干啥的,稀里糊涂的按照博客搭完也跑不起来,因此记录这个。
刘大猫
2025/01/20
830
CentOS 7 部署RabbitMQ 服务
版权声明:本文为木偶人shaon原创文章,转载请注明原文地址,非常感谢。 https://blog.csdn.net/wh211212/article/details/53127078
shaonbean
2019/05/29
1.6K0
rabbitmq无法重新加入集群,启动失败的问题
问题描述 原有的 rabbitmq 集群出现问题,无法启动,尝试删除 /var/lib/rabbitmq/.erlang.cookie 重新组集群,依旧无法启动 复制 # systemctl start rabbitmq-server.service Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.
tanmx
2018/07/16
3.5K0
zabbix5.0安装以及配置中文
zcat /usr/share/doc/zabbix-server-mysql-5.0.21/create.sql.gz > zabbix.sql
黑马金牌编程
2022/04/09
5560
centos7解决修改httpd端口无法重启问题
这是由于SELinux引发的问题,然后运用临时禁止即可启动成功。现记录至此以备以后运用。
一朵灼灼华
2022/08/05
1.1K0
CentOS 7.x基本设置
Hosts是一个没有扩展名的系统文件(文本文件),可以用记事本等工具打开,其作用就是将一些常用的网址IP地址与对应的域名建立一个关联“数据库”,当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,系统会立即打开对应网页,如果没有找到,则系统会再将网址提交DNS域名解析服务器进行IP地址的解析。
程裕强
2019/05/27
6650
相关推荐
大数据CDH平台安装部署再也不用愁了
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文