monitoringartist / dockbix-xxl

:whale: Dockerized Zabbix - server, web, proxy, java gateway, snmpd with additional extensions
https://hub.docker.com/u/monitoringartist/
GNU General Public License v2.0
377 stars 136 forks source link

The frontend does not match Zabbix database #87

Closed paulz1 closed 7 years ago

paulz1 commented 7 years ago

Sorry, to disturb... But again I have a problem with MariaDb update. 1) I did docker pull monitoringartist/zabbix-db-mariadb 2) Restart zabbix using docker-compose. 3) And now zabbix does not start with folowing message :

The frontend does not match Zabbix database. Current database version (mandatory/optional): 3030068/3030068. Required mandatory version: 3020000.

The strange thing that now even if I roll-back to previous zabbix-db-mariadb image, it's still does not work. Hmmm... may be because the database was changed.

Does anybody understand where is the problem? And obviously how to fix it?

Some additiopnal info :

[root@796446c79024 /]# zabbix_server --version
zabbix_server (Zabbix) 3.2.6 (2017-05-24)
Revision 67849 4 May 2017, compilation time: May 24 2017 12:48:56
jangaraj commented 7 years ago

It's not a clear what do you have in your docker compose. Just manually delete the container, where zabbix-server is running and start it again. Zabbix server will upgrade zabbix db schema during startup process automatically.

It's not a docker image issue, so I am closing issue.

paulz1 commented 7 years ago

Sorry, the question and my explanations were not very clear, because the situation is not clear for me as well.

Remove zabbix-server container and start it again does not solve the problem.

So, the problem is that zabbix does not start because : "Current database version (mandatory/optional): 3030068/3030068. Required mandatory version: 3020000" Zabbix server does not upgrade db schema on startup. I do not know why. May be because the current database version is more recent than required version?

Before restart zabbix-server I did two things. 1) Pull a new version of monitoringartist/zabbix-db-mariadb At first, I thought that it was a source of problem. But now it seems that it's not.

2) The second thing I rebuilded my zabbix-server container. Globally I use the same Dockerfile as in https://github.com/monitoringartist/zabbix-xxl/tree/master/Dockerfile/zabbix-xxl

just install some additional python packages for developpement purposes. But I find out that actually we also use ZABBIX 3.2.6 and before it was a trunk version.

So I roll-back to previous zabbix-server image, restart zabbix and it works.

Do you think that changing zabbix-server image to 3.2.6 could be incompatible with database used with trunk version?

jangaraj commented 7 years ago

"Current database version (mandatory/optional): 3030068/3030068. Required mandatory version: 3020000"

3030068 > 3020000 => you need DB downgrade, zabbix-server is able to handle only DB upgrades.

Please don't ask me how to downgrade or how to solve it. Unfortunately, I'm not a free Zabbix support. If you need, then I'm happy to help you on commercial basis. Otherwise http://zabbix.org/wiki/Getting_help

paulz1 commented 7 years ago

Oh, I'm sorry. I understand that it's not your job to take care about our zabbix problems.

But, as I said, it seems to me that it's more general problem. Here is the very generic example :

1) get your git repository corresponding to 92f4f57 hash.

cd Docker/zabbix-xxl
git reset --hard 92f4f57

2) build zabbix image :

cd Dockerfile/zabbix-xxl/
docker build -t monitoringartist/zabbix-xxl .

3) run zabbix :

docker-compose -f ~/Docker/zabbix-xxl/Dockerfile/zabbix-xxl/docker-compose.yml up -d

Zabbix works very well.

Now

4) pull new monitoringartist image (or return to latest version of git and rebuild it) and restart zabbix

docker pull monitoringartist/zabbix-xxl:latest
docker-compose -f ~/Docker/zabbix-xxl/Dockerfile/zabbix-xxl/docker-compose.yml up -d

It does not work with the same message :

The frontend does not match Zabbix database. Current database version (mandatory/optional): 3030140/3030140. Required mandatory version: 3020000.

Do I something wrong? Or there is a problem?

jangaraj commented 7 years ago
cd Docker/zabbix-xxl
git reset --hard 92f4f57

-> that's build for Zabbix trunk version (see env variable ZABBIX_VERSION=trunk used in Dockerfile) trunk=unreleased 3.4 Zabbix version (image monitoringartist/zabbix-xxl:dev), which has probably upgraded your DB to version 3030140. Image monitoringartist/zabbix-xxl:latest = image monitoringartist/zabbix-xxl:3.2.6, which requires DB version 3020000. It's not a general problem. You are mixing versions. Be sure what are you building and using. I use proper git/docker image tags, so please use them correctly.