Ad Widget

Collapse

Zabbix FPM problem

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alexsec
    Junior Member
    • Feb 2025
    • 2

    #1

    Zabbix FPM problem

    Hi all,

    I have fresh install Zabbix 7.0 on Ubuntu 22.04
    On server I have multiple php fpm versions serving different projects. Problem which I am having when restarting phpfpm8.1 it says that :

    [16-Apr-2025 20:38:18] ERROR: FPM initialization failed
    [16-Apr-2025 20:38:19] ERROR: Another FPM instance seems to already listen on /var/run/php/zabbix.sock

    Currently it is used by 5.6fpm:


    root@zwebb-fotografiska:/var/log# systemctl status php5.6-fpm.service
    ● php5.6-fpm.service - The PHP 5.6 FastCGI Process Manager
    Loaded: loaded (/lib/systemd/system/php5.6-fpm.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2025-04-17 10:39:33 CEST; 33min ago
    Docs: manhp-fpm5.6(8)
    Process: 1490786 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/5.6/fpm/pool.d/www.conf 56 (code=exited, status=0/SUCCESS)
    Main PID: 1490777 (php-fpm5.6)
    Status: "Processes active: 0, idle: 8, Requests: 4973, slow: 0, Traffic: 2req/sec"
    Tasks: 9 (limit: 9553)
    Memory: 59.0M
    CPU: 30.820s
    CGroup: /system.slice/php5.6-fpm.service
    ├─1490777 "php-fpm: master process (/etc/php/5.6/fpm/php-fpm.conf)" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1490779 "php-fpm: pool www" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1490780 "php-fpm: pool www" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1491468 "php-fpm: pool zabbix" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1491752 "php-fpm: pool zabbix" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1491753 "php-fpm: pool zabbix" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1491758 "php-fpm: pool zabbix" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    ├─1491760 "php-fpm: pool zabbix" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    └─1491764 "php-fpm: pool zabbix" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

    Apr 17 10:39:33 zwebb-fotografiska systemd[1]: Starting The PHP 5.6 FastCGI Process Manager...
    Apr 17 10:39:33 zwebb-fotografiska systemd[1]: Started The PHP 5.6 FastCGI Process Manager.

    NGNIX conf:


    location ~ [^/]\.php(/|$) {
    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;

    fastcgi_param DOCUMENT_ROOT /usr/share/zabbix;
    fastcgi_param SCRIPT_FILENAME /usr/share/zabbix$fastcgi_script_name;
    fastcgi_param PATH_TRANSLATED /usr/share/zabbix$fastcgi_script_name;

    include fastcgi_params;
    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;

    fastcgi_intercept_errors on;
    fastcgi_ignore_client_abort off;
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 180;
    fastcgi_read_timeout 180;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    }


    How I can change this behavior?


    thanks in advance
    Surba
  • Answer selected by alexsec at 22-04-2025, 09:32.
    tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    If you're going to run multiple different versions of PHP-FPM, you'll need to be sure that the pool configurations are kept separate.

    Does the 'zabbix.conf' pool configuration file exist in multiple directories? Or is the 5.6 php-fpm service set up to read from multiple php-fpm.d/ directories? Based on the service messages, it appears that the 5.6 php-fpm has taken over listening on the zabbix.sock, so that the 8.1 php-fpm can't create it and use it. It's an error with your configuration, but it could be a number of different things.

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #2
      If you're going to run multiple different versions of PHP-FPM, you'll need to be sure that the pool configurations are kept separate.

      Does the 'zabbix.conf' pool configuration file exist in multiple directories? Or is the 5.6 php-fpm service set up to read from multiple php-fpm.d/ directories? Based on the service messages, it appears that the 5.6 php-fpm has taken over listening on the zabbix.sock, so that the 8.1 php-fpm can't create it and use it. It's an error with your configuration, but it could be a number of different things.

      Comment

      • alexsec
        Junior Member
        • Feb 2025
        • 2

        #3
        Hi Tim,

        Actually installing Zabbix package created symbolic link zabbix-php-fpm.conf to /etc/zabbix/php-fpm.conf in every fpm version under pool.d, I removed from all except 8.1 and it is working. Thank you very much

        Comment

        Working...