Icinga Web 2 database missing tables (PGSQL)

Hello Community

I have a problem with my icingaweb2 setup procedure. I am getting this kind of error message at the end of the setup:

Unable to create user group “Administrators”. An error occured:
ERROR: Zend_Db_Statement_Exception in /usr/share/icingaweb2/library/vendor/Zend/Db/Statement/Pdo.php:225 with message: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation “icingaweb_group” does not exist
LINE 1: SELECT COUNT() AS cnt FROM icingaweb_group AS g WHERE (g.na…
^, query was: SELECT COUNT(
) AS cnt FROM icingaweb_group AS g WHERE (g.name = ‘Administrators’)

I did a lot of researche but i couldn’t find anything to solve this problem.

I am new to icinga and SQL and i need help for this problem.

Best Regards,
Valon Bajrami

Hello Valon,
Do you only have issues creating a group named “Administrators” or any group?

Hi and welcome :slight_smile:

Did the previous steps in the web setup all work?
Because it looks like you either have no database for icingaweb2 or the schema is missing.
Which linux distribution are you on?

All previous steps in the web setup did work.
I am using a REHL/CentOS 8 machine.

No, my only issue is to create a group named Administrators.

That seems kinda strange to me.

Can you login to the database with the root user and check what databases are there and what tables they have?

you can list all databases with show databases.
Check if you have one for icingaweb listed there.
then with use <databasename> you can swith to this particular db and with show tables list all the tables wof this database.

I am using PostgreSQL for my databases. You can ignore “icingaweb” database.


My main database “icinga” does have his tables but my “icingaweb2” database is empty.
image

Hm, then the setup did not create/import the schema for the database, I guess.
But I do not have experience with pgsql, not sure how or if the setup differs from the mysql approach.

Normally the setup asks for the database where the icingaweb2 stuff should be saved to. If this is not present the setup will ask for a privileged account to create the database.
Did this happen for you as well?