[ZBX-17836] Zabbix server 5.0 does not start under CentOS 8.1 Created: 2020 May 28  Updated: 2020 Jun 01  Resolved: 2020 Jun 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Gerd Assignee: Renats Valiahmetovs (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 8.1
Zabbix Server 5.0.1



 Description   

Hello,

i think it is a bug because the zabbix agent has both parameters set for systemd.

Steps to reproduce:

  1. When i use the orginal config under /usr/lib/systemd/system/zabbix-server.service
    the service doesn't start
  2. When i add in the Service config under /usr/lib/systemd/system/zabbix-server.servie
    User and Group  "zabbix" the Server Starts

Result:

STATUS Output:
zabbix-server.service - Zabbix Server
Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2020-05-28 16:54:44 CEST; 2s ago
Process: 7202 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=1/FAILURE)
Main PID: 6919 (code=exited, status=0/SUCCESS)

Messages LOG:

May 28 16:55:15 testserver zabbix_server[7211]: zabbix_server [7211]: Cannot initialize IPC services: Cannot access path "/var/run/zabbix": [13] Permission denied.
May 28 16:55:15 testserver systemd[1]: zabbix-server.service: Control process exited, code=exited status=1
May 28 16:55:15 testserver systemd[1]: zabbix-server.service: Failed with result 'exit-code'.
May 28 16:55:15 testserver systemd[1]: Failed to start Zabbix Server.
May 28 16:55:25 testserver systemd[1]: zabbix-server.service: Service RestartSec=10s expired, scheduling restart.
May 28 16:55:25 testserver systemd[1]: zabbix-server.service: Scheduled restart job, restart counter is at 98.
May 28 16:55:25 testserver systemd[1]: Stopped Zabbix Server.
May 28 16:55:25 testserver systemd[1]: Starting Zabbix Server...
May 28 16:55:25 testserver zabbix_server[7213]: zabbix_server [7213]: Cannot initialize IPC services: Cannot access path "/var/run/zabbix": [13] Permission denied.
May 28 16:55:25 testserver systemd[1]: zabbix-server.service: Control process exited, code=exited status=1
May 28 16:55:25 testserver systemd[1]: zabbix-server.service: Failed with result 'exit-code'.
May 28 16:55:25 testserver systemd[1]: Failed to start Zabbix Server.

 

[root@testserver zabbix]# ls -l /var/run/ | grep zabbix
drwxr-xr-x. 2 zabbix zabbix 120 May 28 16:38 zabbix

########

[Unit]
Description=Zabbix Server
After=syslog.target
After=network.target
After=mysql.service
After=mysqld.service
After=mariadb.service
After=postgresql.service

[Service]
Environment="CONFFILE=/etc/zabbix/zabbix_server.conf"
EnvironmentFile=-/etc/sysconfig/zabbix-server
Type=forking
Restart=on-failure
PIDFile=/run/zabbix/zabbix_server.pid
KillMode=control-group
ExecStart=/usr/sbin/zabbix_server -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
TimeoutSec=0
User=zabbix
Group=zabbix

[Install]
WantedBy=multi-user.target



 Comments   
Comment by Renats Valiahmetovs (Inactive) [ 2020 May 29 ]

Dear Gerd,

Unfortunately I am unable to reproduce the issue, however I'd like to check your zabbix-server.conf file, if possible.

Another thing that comes to mind, what is the status of SElinux?

Comment by Gerd [ 2020 May 29 ]

Hi Renats,

ok there is something wrong with selinux according to the zabbix documentation but I couldn't find anything in the standard RHEL/CentOS documentation either.

If I set "setenforce 0" now the service starts but it is not that cool. With the zabbix-agent it works with out, if I give the zabbix-server service the user and group "zabbix" in the service config  it works too. But I had now to notice that the Zabbix-Server restarts again and again some time, because it can't start certain socks because of selinux denied. Unfortunately there is nothing in the RHEL/CentOS manual how to set up selinux here for new Zabbix 5.0.

What I already noticed under CentOS 8.1 must be "setsebool -P zabbix_can_network on".
So sebool is zabbix_can_network --> on.

Otherwise neither the zabbix server nor the zabbix proxy can be reached over the network or cumunicate or is there another way ?
If not, I think this should be in the RHEL/CentOS 8.x documentation.

I have now tested a Debian system for comparison here is no problem if you go by the documentation.
To get the system (proxy/server) to the first start.

This is now a bug in the software including the "setsebool -P zabbix_can_network on" or an incorrect documentation?
You could also put these commands into the systemd service file, without -P and it would be out of the box.

All that remains are the socket errors caused by selinux which I do not understand at the moment.

Best Regards
Gerd

 

Comment by Renats Valiahmetovs (Inactive) [ 2020 Jun 01 ]

Hi Gerd,

 

While checking this, I've ran the following commands, which resulted in a stable zabbix server instance:

grep zabbix_agent_t /var/log/audit/audit.log | audit2allow -M zabbix_server_custom

semodule -i zabbix_server_custom.pp

 

I must however, let you know that this is an expected behavior with SELinux enabled, therefore this case cannot qualify as bug report case, so please reach out to [email protected] for commercial support or consultancy services. Alternatively, you can also use our IRC channel or community forum (https://www.zabbix.com/forum) for assistance.

 

With that said, I will be closing this ticket, I hope this helps and thank You for understanding.

Generated at Mon Jun 02 15:57:33 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.