Sorry! Failed to set up Icinga Web 2 successfully

Hi, all
when i set up icingaweb2, i encountered the following problems.
I have a separate RHEL 6 server for the web and separate RHEL 6 server for the IDO backend.
The database icingaweb2 can be created successfully, but There are no tables in the database! i have show all privileges for icngaweb2.

Regards,
liuyana

I have solved this problem through dump mysql schema from https://github.com/Icinga/icingaweb2/blob/master/etc/schema/mysql.schema.sql

Hi @liuyanagit,

glad that you fixed your issue. Just a note on your solution:
There is always a risk that the code and configuration files in the master branch are more recent than your deployed version for example. So to avoid issues due to mismatches here I would recommend to refer to the file on your server.

You should find it here: /usr/share/icingaweb2/etc/schema/mysql.schema.sql

This way, you can always be sure that you create exactly the schema that is expected by the running icingaweb2 version. :slight_smile:

Thank you very much for your reminder. I’ve tried to find the file locally, but i cannot found. Therefor ,i copy the file from git.
I don’t know why this file is not available locally.


There is no “etc” folder in this directory.

Could be in:
/usr/share/doc/icingaweb2/schema/mysql.schema.sql

1 Like

thank you so much! I find it in the “/usr/share/doc/icingaweb2/schema/mysql.schema.sql”
thank you so much!:grinning:

1 Like

but ,the file is empty!:slightly_frowning_face:

And that is why the installation failed. I am guessing corrupt package but could be anything.

1 Like

yes, it is possible that the package is wrong. I install icinga_web by ‘yum install icingaweb2 icingacli’, maybe something else is wrong.

Could be a glitch in remote server or your internet connection.
Try to clean up yum cache and fetching the file manually:

yum clean all
yum --download-only icingaweb2

and examine how big is the RPM and the contents if you have the time.

1 Like

Actually that’s a problem with Docker where the base image for Centos disables the entire content for packages populating /usr/share/doc. I’ve been debugging this for hours in the past.

# docs are not installed by default https://github.com/docker/docker/issues/10650 https://registry.hub.docker.com/_/centos/
# official docs are wrong, go for http://superuser.com/questions/784451/centos-on-docker-how-to-install-doc-files
# we'll need that for mysql schema import for icingaweb2
RUN [ -f /etc/rpm/macros.imgcreate ] && sed -i '/excludedocs/d' /etc/rpm/macros.imgcreate || exit 0
RUN [ -f /etc/yum.conf ] && sed -i '/nodocs/d' /etc/yum.conf || exit 0