Ad Widget

Collapse

[Zabbix Server] Changing ListenPort from 10051

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StealthJoe
    Member
    • Mar 2019
    • 44

    #1

    [Zabbix Server] Changing ListenPort from 10051

    Hi, I'm trying to set a custom port for Zabbix to listen on for active agents. I've done this before but running into an issue and can't remember how I solved it.

    First I change "ListenPort" in "zabbix_server.conf" to my desired port.

    I then change the port also in "zabbix.conf.php".

    When I do this I get error "listener failed: bind() for [[-]:10052 failed: [13] Permission denied" and the service keeps trying to reboot.

    Then I run "setenforce 0" and the server starts up no problem. I enabled all the Zabbix related options for SELinux, httpd_can_connect_zabbix --> on | zabbix_can_network --> on | zabbix_run_sudo --> on but this made no difference.

    I have a feeling the issue is then related to httpd and there is a different SELinux rule that I need to enable.

    Does anyone know how to fix this? I would prefer to keep SELinux enforcing.

    Thanks!
  • StealthJoe
    Member
    • Mar 2019
    • 44

    #2
    Very quickly I found the answer after running "journalctl | grep zabbix".

    The command to fix this is: "semanage port -a -t zabbix_port_t -p tcp 10052" (or whatever your custom port it)

    Figured I should put this out here since I couldn't' find anything online.

    FYI I am running CentOS 8.

    Cheers

    Comment

    Working...