IcingaDB: unexpected database schema version: v3 (expected v4)

Hi,

I´ve searched a little bit at the community and it seems that there were similar problems, but I couldn´t solve it by the advices given so far. I can´t start IcingaDB anymore at my ubuntu vm. Error:
unexpected database schema version: v3 (expected v4), please make sure you have applied all database migrations after upgrading Icinga DB

I´ve checked if there are open migration at icinga director and with

icingacli director migration pending --verbose

Also I tried:

 icinga-redis-cli flushall

But nothing helped so far: I haven´t found any upgrade schema at /usr/share/doc/icingadb/ or /usr/share/icingadb/schema/mysql/upgrades/ which could be related to the problem. The most recent upgrade version is 1.1.1.sql. Has anyone a hint, how I could solve / debug this further?

1 Like

Hi.

As you said, there is a schema upgrade to 1.1.1.
Did you do this schema upgrade to version 1.1.1?

E.g.:

mysql -u root -p icingadb < /usr/share/icingadb/schema/mysql/upgrades/1.1.1.sql

This solved the problem for me.

Edit: Releasing Icinga DB 1.1.1

Greetings.

2 Likes

Thanks, that did the trick. The version numbers at the log were misleading.

Can I somehow prevent icinga from auto-updating? So that I can prevent the mismatch between icinga, icingadb and the mysql database scheme?

And instead do the update of the packages and scheme manually?

if you are on debian/ ubuntu you can do an apt-mark hold

1 Like

There is no auto-updating mechanism in Icinga. Updates are only triggered by your package manager.

If you are manually performing upgrades, you can hold packages as @moreamazingnick suggested. If you are using unattended upgrades, you can exclude packages (Unattended-Upgrade::Package-Blacklist for Debian/Ubuntu).

In general, it is advisable to not auto-upgrade Icinga packages since there are certain version upgrades requiring manual intervention. Personally, I have excluded all icinga packages from unattended upgrades and monitor required upgrades to not miss any.

thanks, of course I could put packages on hold. I thought Icinga itself also had some kind of mechanism itself.

Then I will chose the option to configure it via package manager.