DB is not running

Hi, everything was working suddenly i notices this error message. here is the image:

.

I have tried “icinga2 feature enable icingadb” and “systemctl restart icinga2” but still getting this error.
Please i really need your help, thank you

I have a similar issue with icingadb after upgrade.

What kind of database are you using?
postgresql or mysql ?
local or remote database ?
icinga running on Linux ?

First try to connect to the database.
login as root and try mysqlshow …

@stheno42 thank you, exactly after i upgrade. DB is mysql, it is local.
after running mysql:

Could you please inspect your Icinga DB logs? Is Icinga DB running? Please feel free to post your (potentially redacted) Icinga DB logs, journalctl -u icingadb -n 100 (maybe increase the amount of lines if it seems necessary).

Furthermore, how is your Icinga 2 doing? Is it healthy? What about the Redis?

You posted that this happened after an upgrade. What did you upgrade? If this was an Icinga DB upgrade, you might need to upgrade its schema, Upgrading - Icinga DB.

@apenning by typing journalctl -u icingadb -n 100 here is the output root@icinga2server:/# journalctl -u icingadb -n 100Jul 05 10:49:03 icinga2serv - Pastebin.com, i have just run the command apt-get upgrade -y

Hi Jessica,
In the file /etc/icingaweb2/ressources.ini there are named MySQL databases.
You know the databases. Each database have a table host.
Try to select the number of host. Then you have the valid databases with data.
At my Installation there are only director and icinga2. And now a empty icingadb. There is my problem.

Thanks for providing the logs, Jessica. Please take a look at the repeating error message before the icingadb.service exits:

unexpected database schema version: v4 (expected v5), please make sure you have applied all database migration>

Your upgrade has affected Icinga DB, getting from version 1.1.1 to 1.2.0. As written in the release notes, this upgrade requires a database schema upgrade. Please read the following documentation chapter, leading you through the process: Upgrading - Icinga DB. After the schema upgrade has finished, please restart the icingadb.service.

1 Like

Thank you all for your help, please I would like to know if each time I run an apt-get upgrade it will produce this error. Is there a problem launching upgrade (apt-get upgrade)? is there a way to resolve this?

The problem lies in having to update the database schema. At the moment, we do not perform an automatic update, as this might take some time and users might get confused and interrupt this process. However, we are planning this feature for future versions, cmd/icingadb: automatically upgrade SQL schema by Al2Klimov · Pull Request #770 · Icinga/icingadb · GitHub.

For the time being, my advice would be to check what updates are being installed when you run apt-get upgrade. You may want to run it without the -y flag to have time to read what’s actually changing. If you see the icingadb package, please take the time to read the changelog. This is something to consider for many package updates.

2 Likes