Error after upgrading Icingaweb to 2.12.x: Please check if a db instance exists at all

Written by - 0 comments

Published on - Listed in Icinga Linux Monitoring


After upgrading Icingaweb from 2.11.4 to 2.12.1 on a Ubuntu Linux server, most things seemed to work without a glitch. The dashboard showed recent alerts and recoveries - however when trying to configure anything in the UI, an error showed up.

Please check if a db instance exists at all

The error is also shown when simply trying to display the current Icingaweb2 information (Settings wheel -> About):

The error "Please check if a db instance exists at all" might not make sense at the beginning... unless this Icingaweb2 instance was configured with ini configuration files!

No more ini configuration files

Icingaweb2 has switched away from the initial configuration files (/etc/icingaweb2/*.ini) to a database backend. Following the Icingaweb upgrading notes does not show since when exactly the ini files are not working anymore. Only a deprecation warning shows up for version 2.9:

- The configuration backend type INI is not configurable anymore. A database is now mandatory.
- Existing configurations using this configuration backend type will stop working with the release of v2.11.
- To migrate your local user preferences to database, enable the migrate module and use the command icingacli migrate preferences. If you already setup the configuration database, it will work right away. If not, pass it the resource you’d like to use as configuration database with --resource=.
- Note that this only applies to user preferences. Other configurations are still stored in .ini files. (#3770)

Interestingly though, the ini configurations still worked fine with 2.11.4. Maybe a lucky situation, maybe this was still allowed "on purpose", who knows.

Anyway, with Icingaweb version 2.12.x, the ini configuration files are definitely not working anymore and a migration to a database backend is mandatory.

Note: This particular Icingaweb installation has been upgraded over several years - hence the ini configuration files. Newer Icingaweb versions already contain the database backend in the installation documentation.

Revert to Icingaweb 2.11.x

After reverting to Icingaweb 2.11.x (by downgrading the packages), the UI was working correctly again, including the About page.

root@icingaweb:~# apt-get install icingaweb2=2.11.4-1+ubuntu20.04 icingaweb2-common=2.11.4-1+ubuntu20.04 php-icinga=2.11.4-1+ubuntu20.04 icingacli=2.11.4-1+ubuntu20.04

root@icingaweb:~# apt-mark hold icingaweb2 icingaweb2-common php-icinga icingacli
icingaweb2 set on hold.
icingaweb2-common set on hold.
php-icinga set on hold.
icingacli set on hold.

Icingaweb2 user interface version
This is a short term fix, of course. The real solution will be to create and migrate to a database configuration backend and then upgrade Icingaweb again.


More recent articles:

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder   


Update cookies preferences