Ad Widget

Collapse

Update Zabbix 6LTS to 7TLS

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sined_r
    Junior Member
    • Jun 2024
    • 12

    #1

    Update Zabbix 6LTS to 7TLS

    Hello everyone,

    today I updated from zabbix6 to zabbix 7 on a test machine (clone of my Zabbix server).
    The base system was a Debian 11.

    Basically I only had to update to Debian 12, update Nginx and TimescaleDB. Everything else matched the versions. + a few database adjustments of all hypertables and co...
    So far everything has worked except for one small thing.

    After restarting the server, I get a "Bad Gateway" back when I call up the web address.
    The Nginx error log then says "..../var/run/php/zabbix.sock failed (13: Permission denied)..."
    If I look at the file, only www-data has access to it.
    With nginx >1.16 a new user "nginx" was added, which now executes everything by default.
    I installed nginx via the official repro "https://nginx.org/en/linux_packages.html#Debian"
    Now the question is, how do I solve this problem? Sure, I can probably put the nginx user in the www-data group.
    But is that the way to go or do I somehow tell nginx, "hey take the user www-data"?
    Or is there a completely different way.

    Many thanks for your help.
  • Answer selected by Sined_r at 03-08-2024, 15:05.
    Sined_r
    Junior Member
    • Jun 2024
    • 12

    Thanks for the hint, I have now installed debian 12 again and realized that nginx V 1.22 comes with it by itself. So a version with which Zabbix 7 can work.

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #2
      Originally posted by Sined_r
      The Nginx error log then says "..../var/run/php/zabbix.sock failed (13: Permission denied)..."
      If I look at the file, only www-data has access to it.
      With nginx >1.16 a new user "nginx" was added, which now executes everything by default.
      I installed nginx via the official repro "https://nginx.org/en/linux_packages.html#Debian"
      You're running into this issue because you're running an upstream package (from nginx) that isn't as well-tailored to your Linux distro as the distro official packages are. If you were using the Debian 12 nginx package, you almost certainly wouldn't be having this issue.

      If there's some reason why you want to use the non-Debian package, then just edit the PHP-FPM pool configuration file for the 'zabbix' pool of workers and change either the "user = <whatever>" or "group = www-data" to match what your nginx package is using, then restart php-fpm.

      This does assume that the permissions on all of the web files and directories are such that nginx can read them. If that's not true (like if some of them are only readable by www-data) then you may run into other permission problems.

      Comment

      • Sined_r
        Junior Member
        • Jun 2024
        • 12

        #3
        Thanks for the hint, I have now installed debian 12 again and realized that nginx V 1.22 comes with it by itself. So a version with which Zabbix 7 can work.

        Comment

        Working...