Update script not updating Zabbix #423

Closed
opened 2026-02-04 18:46:36 +03:00 by OVERLORD · 13 comments
Owner

Originally created by @TheChrisK on GitHub (Feb 2, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Zabbix

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zabbix.sh)"

📝 Provide a clear and concise description of the issue.

I am on Zabbix 7.0.7 currently. When running update or bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zabbix.sh)" the script goes through the steps, rather quickly, then completes and restarts the services. Zabbix comes back but is till on 7.0.7.

The shell goes back to the user but the spinner animation still runs until exiting the shell. No errors are showing when running in verbose mode.

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

  1. Ran update in console, waited for completion then checked version
  2. Ran bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zabbix.sh)" in LXC console, waited and checked version
  3. Ran dpkg -i zabbix-release_latest+debian12_all.deb and got the following output:

(Reading database ... 34190 files and directories currently installed.)
Preparing to unpack zabbix-release_latest+debian12_all.deb ...
Unpacking zabbix-release (1:7.2-1+debian12) over (1:7.2-1+debian12) ...
Setting up zabbix-release (1:7.2-1+debian12) ...

Paste the full error output (if available).

✔️ Stopped Zabbix Services
✔️ Started Zabbix Services
✔️ Cleaned
✔️ Updated Successfully
⠧root@zabbix:~#

🖼️ Additional context (optional).

I ran a fresh install to test the script and a new LXC was created for the correct version. I would rather not rebuild from scratch. Not sure of any other logs I can provide.

Originally created by @TheChrisK on GitHub (Feb 2, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Zabbix ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zabbix.sh)" ### 📝 Provide a clear and concise description of the issue. I am on Zabbix 7.0.7 currently. When running `update` or `bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zabbix.sh)"` the script goes through the steps, rather quickly, then completes and restarts the services. Zabbix comes back but is till on 7.0.7. The shell goes back to the user but the spinner animation still runs until exiting the shell. No errors are showing when running in verbose mode. ### ⚙️ What settings are you using? - [ ] Default Settings - [x] Advanced Settings ### 🖥️ Which Linux distribution are you using? _Debian 12_ ### 🔄 Steps to reproduce the issue. 1. Ran `update` in console, waited for completion then checked version 2. Ran `bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/zabbix.sh)"` in LXC console, waited and checked version 3. Ran `dpkg -i zabbix-release_latest+debian12_all.deb` and got the following output: > (Reading database ... 34190 files and directories currently installed.) > Preparing to unpack zabbix-release_latest+debian12_all.deb ... > Unpacking zabbix-release (1:7.2-1+debian12) over (1:7.2-1+debian12) ... > Setting up zabbix-release (1:7.2-1+debian12) ... ### ❌ Paste the full error output (if available). ✔️ Stopped Zabbix Services ✔️ Started Zabbix Services ✔️ Cleaned ✔️ Updated Successfully ⠧root@zabbix:~# ### 🖼️ Additional context (optional). I ran a fresh install to test the script and a new LXC was created for the correct version. I would rather not rebuild from scratch. Not sure of any other logs I can provide.
Author
Owner

@tremor021 commented on GitHub (Feb 2, 2025):

can you also do:

apt install zabbix-apache-conf
systemctl restart apache2

and then check? Upgrade instructions say you might need to clear your browsers cache also

@tremor021 commented on GitHub (Feb 2, 2025): can you also do: ``` apt install zabbix-apache-conf systemctl restart apache2 ``` and then check? Upgrade instructions say you might need to clear your browsers cache also
Author
Owner

@TheChrisK commented on GitHub (Feb 2, 2025):

can you also do:

apt install zabbix-apache-conf
systemctl restart apache2

and then check? Upgrade instructions say you might need to clear your browsers cache also

So this morning, using the Zabbix official guide, I was able to upgrade to 7.0.9 and now the dashboard says "up to date" even though 7.2 is the newest version. I ran another apt install zabbix-apache-conf and the output shows up-to-date as well.

I am going to try to run the update script again as soon as I take a snapshot of my LXC.

@TheChrisK commented on GitHub (Feb 2, 2025): > can you also do: > > ``` > apt install zabbix-apache-conf > systemctl restart apache2 > ``` > > and then check? Upgrade instructions say you might need to clear your browsers cache also So this morning, using the Zabbix official guide, I was able to upgrade to 7.0.9 and now the dashboard says "up to date" even though 7.2 is the newest version. I ran another `apt install zabbix-apache-conf` and the output shows up-to-date as well. I am going to try to run the update script again as soon as I take a snapshot of my LXC.
Author
Owner

@TheChrisK commented on GitHub (Feb 3, 2025):

After working through this for hours, I have given up and migrated my config and database to a new container with 7.2.3 installed. Met several errors along the way but it's finally working. Not sure if there is still an issue with the update script but I was unable to manually update using Zabbix documentation so perhaps it's a Zabbix issue for this version.

Thank you for all your work on these scripts!

@TheChrisK commented on GitHub (Feb 3, 2025): After working through this for hours, I have given up and migrated my config and database to a new container with 7.2.3 installed. Met several errors along the way but it's finally working. Not sure if there is still an issue with the update script but I was unable to manually update using Zabbix documentation so perhaps it's a Zabbix issue for this version. Thank you for all your work on these scripts!
Author
Owner

@zov-wvg commented on GitHub (Feb 4, 2025):

@TheChrisK mind sharing how you migrated? I have the same issue with Zabbix as you.

@zov-wvg commented on GitHub (Feb 4, 2025): @TheChrisK mind sharing how you migrated? I have the same issue with Zabbix as you.
Author
Owner

@TheChrisK commented on GitHub (Feb 4, 2025):

@TheChrisK mind sharing how you migrated? I have the same issue with Zabbix as you.

@zov-wvg

It's quite a process. I'll try to explain as best I can.

  1. Spin up a new LXC with a fresh install of Zabbix. Ensure it is on version 7.2.3

  2. Backup your current install:
    a. Either run the update script which accomplishes this or run the following
    cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
    cp /etc/apache2/conf-enabled/zabbix.conf /opt/zabbix-backup/
    cp -R /usr/share/zabbix/ /opt/zabbix-backup/
    b. Dump your current postgres db:
    pg_dump -U zabbix -h localhost -p 5432 zabbixdb > zabbixdb.sql

  3. Move all backup files from /opt/zabbix-backup/ and your zabbixdb.sql dump to the new LXC

  4. Stop all zabbix services on the new LXC

  5. Login to your postgres database as user postgres and run:
    DROP DATABASE zabbixdb;

  6. Re-create a blank zabbix database:
    CREATE DATABASE zabbixdb
    TEMPLATE = template0
    OWNER = zabbix
    ENCODING 'UTF8';

  7. Restore the databse from backup (this may take a while, ensure enough disk space is available):
    psql -U zabbix -h localhost -d zabbixdb -f zabbixdb.sql

  8. Restore Zabbix config files (reverse of step 2a).

  9. Start services service zabbix-server start && service zabbix-agent2 start

  10. Wait and monitor database auto update cat /var/log/zabbix/zabbix_server.log | grep database

  11. Once complete, ensure UI is up and accessible with no errors (I encountered a few but YMMV).

  12. Shutdown both Zabbix installs and update the IP address of the new LXC to match the old.
    a. This is easier than reconfiguring all your agents.

@TheChrisK commented on GitHub (Feb 4, 2025): > [@TheChrisK](https://github.com/TheChrisK) mind sharing how you migrated? I have the same issue with Zabbix as you. @zov-wvg It's quite a process. I'll try to explain as best I can. 1. Spin up a new LXC with a fresh install of Zabbix. Ensure it is on version 7.2.3 2. Backup your current install: a. Either run the update script which accomplishes this or run the following `cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/` `cp /etc/apache2/conf-enabled/zabbix.conf /opt/zabbix-backup/` `cp -R /usr/share/zabbix/ /opt/zabbix-backup/` b. Dump your current postgres db: `pg_dump -U zabbix -h localhost -p 5432 zabbixdb > zabbixdb.sql` 3. Move all backup files from `/opt/zabbix-backup/` and your zabbixdb.sql dump to the new LXC 4. Stop all zabbix services on the new LXC 5. Login to your postgres database as user `postgres` and run: `DROP DATABASE zabbixdb;` 6. Re-create a blank zabbix database: `CREATE DATABASE zabbixdb` `TEMPLATE = template0` `OWNER = zabbix` `ENCODING 'UTF8';` 7. Restore the databse from backup (this may take a while, ensure enough disk space is available): `psql -U zabbix -h localhost -d zabbixdb -f zabbixdb.sql` 8. Restore Zabbix config files (reverse of step 2a). 9. Start services `service zabbix-server start && service zabbix-agent2 start` 10. Wait and monitor database auto update `cat /var/log/zabbix/zabbix_server.log | grep database` 11. Once complete, ensure UI is up and accessible with no errors (I encountered a few but YMMV). 12. Shutdown both Zabbix installs and update the IP address of the new LXC to match the old. a. This is easier than reconfiguring all your agents.
Author
Owner

@zov-wvg commented on GitHub (Feb 4, 2025):

Sorry for being a bit ignorant, but how do you do step 3?

  1. Move all backup files from /opt/zabbix-backup/ and your zabbixdb.sql dump to the new LXC

did you use SSH or can you access the data via Proxmox?

@zov-wvg commented on GitHub (Feb 4, 2025): Sorry for being a bit ignorant, but how do you do step 3? > 3. Move all backup files from /opt/zabbix-backup/ and your zabbixdb.sql dump to the new LXC did you use SSH or can you access the data via Proxmox?
Author
Owner

@TheChrisK commented on GitHub (Feb 4, 2025):

Oh, I use Terminus (an SSH client) that has a built in SFTP function. You can do this by shell command but the built in SFTP is just quicker making it a drag and drop.

@TheChrisK commented on GitHub (Feb 4, 2025): Oh, I use Terminus (an SSH client) that has a built in SFTP function. You can do this by shell command but the built in SFTP is just quicker making it a drag and drop.
Author
Owner

@zov-wvg commented on GitHub (Feb 5, 2025):

I got there somehow... only took 3 hours.

but it will not work.

The Zabbix database version does not match current requirements. Your database version: 7020000. Required version: 7000000. Please contact your system administrator.

cat /var/log/zabbix/zabbix_server.log | grep database

shows that the upgrade was successful, so I am not sure what to do. (probably just give up and hope the original one is fixed.)

@zov-wvg commented on GitHub (Feb 5, 2025): I got there somehow... only took 3 hours. but it will not work. > The Zabbix database version does not match current requirements. Your database version: 7020000. Required version: 7000000. Please contact your system administrator. > cat /var/log/zabbix/zabbix_server.log | grep database shows that the upgrade was successful, so I am not sure what to do. (probably just give up and hope the original one is fixed.)
Author
Owner

@TheChrisK commented on GitHub (Feb 5, 2025):

Ah, I have a fix for that.

Let me find the article and get back to you. It's a minor change with the Apache "zabbix.conf"

Edit:

From https://medium.com/@michael.giesen/zabbix-upgrade-from-v7-0-to-7-2-52189fbdaaec

Zabbix changed the directory structure:

‘/usr/share/zabbix’ to ‘/user/share/zabbix/ui’

So you need to make a few changes to get it running.

First of all update the documentroot paths in the apache configurations;

vi /etc/apache2/conf-enabled/zabbix.conf
vi /etc/apacke2/sites-enabled/default-ssl.conf

Everywhare you see /usr/share/zabbix add ‘ui’ to this line.

/usr/share/zabbix/ui

Make sure to apply this change to all directories, not only the top one!

@TheChrisK commented on GitHub (Feb 5, 2025): Ah, I have a fix for that. Let me find the article and get back to you. It's a minor change with the Apache "zabbix.conf" Edit: From https://medium.com/@michael.giesen/zabbix-upgrade-from-v7-0-to-7-2-52189fbdaaec Zabbix changed the directory structure: ‘/usr/share/zabbix’ to ‘/user/share/zabbix/ui’ So you need to make a few changes to get it running. First of all update the documentroot paths in the apache configurations; `vi /etc/apache2/conf-enabled/zabbix.conf` `vi /etc/apacke2/sites-enabled/default-ssl.conf` Everywhare you see `/usr/share/zabbix` add ‘ui’ to this line. `/usr/share/zabbix/ui` Make sure to apply this change to all directories, not only the top one!
Author
Owner

@zov-wvg commented on GitHub (Feb 6, 2025):

Well, that didn't work either.

Not Found
The requested URL was not found on this server.

@zov-wvg commented on GitHub (Feb 6, 2025): Well, that didn't work either. > Not Found > The requested URL was not found on this server.
Author
Owner

@TheChrisK commented on GitHub (Feb 6, 2025):

It took me several hours as well and a lot of searching and reading. I completed a lot of trial and error and didn't document every step. Sorry it's not working out for you.

@TheChrisK commented on GitHub (Feb 6, 2025): It took me several hours as well and a lot of searching and reading. I completed a lot of trial and error and didn't document every step. Sorry it's not working out for you.
Author
Owner

@zov-wvg commented on GitHub (Feb 6, 2025):

I wonder if anyone else struggles with the same...
I think we will give up and use a clean server.

@zov-wvg commented on GitHub (Feb 6, 2025): I wonder if anyone else struggles with the same... I think we will give up and use a clean server.
Author
Owner

@TheChrisK commented on GitHub (Feb 27, 2025):

Just an update to this.

I continue to have issues updating Zabbix using this script. Even on a fresh container. Updating from 7.2.3 to 7.2.4 does not work. Same as initially described above. I have migrated my install and database to a docker compose solution on a fresh LXC and will sunset my use of this script.

@TheChrisK commented on GitHub (Feb 27, 2025): Just an update to this. I continue to have issues updating Zabbix using this script. Even on a fresh container. Updating from 7.2.3 to 7.2.4 does not work. Same as initially described above. I have migrated my install and database to a docker compose solution on a fresh LXC and will sunset my use of this script.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#423