Hi all,
I hope everyone is taking care and safe.
Ok, so I have a new build of Zabbix 4.4 and I have never encountered so many problems before with a new build Zabbix, I did quite a few installs with 3.* and they all worked seamlessly but selinux has and is screwing my latest build up.
Here is my build:
CentOS8
PHP7.2
MySQL 8
Apache
To start off, I cannot find the zabbix-server.pid file anywhere, its not in /run/zabbix nor is it in /var/run/zabbix, I tried changing the location it looks for the pid in the zabbix service file to /var/run/zabbix/zabbix-server.pid and still nothing, the agent is in both directories but not the server pid?
I used the following script to add selinux modules:
module zabbix_server_add 1.1;
require {
type zabbix_var_run_t;
type tmp_t;
type zabbix_t;
class sock_file { create unlink write };
class unix_stream_socket connectto;
class process setrlimit;
class capability dac_override;
}
#============= zabbix_t ============== #
!!!! This avc is allowed in the current policy (Edit by James; please bare in mind self: process need to go together, had to put a space due to emojis)
allow zabbix_t self: process setrlimit;
#!!!! This avc is allowed in the current policy
allow zabbix_t self:unix_stream_socket connectto;
#!!!! This avc is allowed in the current policy
allow zabbix_t tmp_t:sock_file { create unlink write };
#!!!! This avc is allowed in the current policy
allow zabbix_t zabbix_var_run_t:sock_file { create unlink write };
#!!!! This avc is allowed in the current policy
allow zabbix_t self:capability dac_override;
And also did the following:
And still nothing:
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# service zabbix-server start
Redirecting to /bin/systemctl start zabbix-server.service
^C
[root@localhost ~]# cd /run/zabbix/
[root@localhost zabbix]# ll
total 4
-rw-rw-r--. 1 zabbix zabbix 3 Mar 30 16:29 zabbix_agentd.pid
[root@localhost zabbix]# php -v
All the correct firewall rules are in place, on the server so I don't understand where I am going wrong now.
Any help would be really appreciated.
Kind Regards,
James
I hope everyone is taking care and safe.
Ok, so I have a new build of Zabbix 4.4 and I have never encountered so many problems before with a new build Zabbix, I did quite a few installs with 3.* and they all worked seamlessly but selinux has and is screwing my latest build up.
Here is my build:
CentOS8
PHP7.2
MySQL 8
Apache
To start off, I cannot find the zabbix-server.pid file anywhere, its not in /run/zabbix nor is it in /var/run/zabbix, I tried changing the location it looks for the pid in the zabbix service file to /var/run/zabbix/zabbix-server.pid and still nothing, the agent is in both directories but not the server pid?
I used the following script to add selinux modules:
module zabbix_server_add 1.1;
require {
type zabbix_var_run_t;
type tmp_t;
type zabbix_t;
class sock_file { create unlink write };
class unix_stream_socket connectto;
class process setrlimit;
class capability dac_override;
}
#============= zabbix_t ============== #
!!!! This avc is allowed in the current policy (Edit by James; please bare in mind self: process need to go together, had to put a space due to emojis)
allow zabbix_t self: process setrlimit;
#!!!! This avc is allowed in the current policy
allow zabbix_t self:unix_stream_socket connectto;
#!!!! This avc is allowed in the current policy
allow zabbix_t tmp_t:sock_file { create unlink write };
#!!!! This avc is allowed in the current policy
allow zabbix_t zabbix_var_run_t:sock_file { create unlink write };
#!!!! This avc is allowed in the current policy
allow zabbix_t self:capability dac_override;
checkmodule -M -m -o zabbix_server_add.mod zabbix_server_add.te
semodule_package -m zabbix_server_add.mod -o zabbix_server_add.pp
semodule -i zabbix_server_add.pp
setsebool -P httpd_can_network_connect 1
setsebool -P httpd_can_connect_zabbix 1
setsebool zabbix_can_network on
semodule_package -m zabbix_server_add.mod -o zabbix_server_add.pp
semodule -i zabbix_server_add.pp
setsebool -P httpd_can_network_connect 1
setsebool -P httpd_can_connect_zabbix 1
setsebool zabbix_can_network on
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# service zabbix-server start
Redirecting to /bin/systemctl start zabbix-server.service
^C
[root@localhost ~]# cd /run/zabbix/
[root@localhost zabbix]# ll
total 4
-rw-rw-r--. 1 zabbix zabbix 3 Mar 30 16:29 zabbix_agentd.pid
[root@localhost zabbix]# php -v
All the correct firewall rules are in place, on the server so I don't understand where I am going wrong now.
Any help would be really appreciated.
Kind Regards,
James
ahha.there nothing in apache error log, message log, php log or zabbix logs pointing to what may be causing this so I am stuck again
Comment