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

Hello.
I donā€™t know if this is the right thread but Iā€™ll try. Iā€™m using Icinga2 in a containerized architecture (Docker) with major components as follow:

  • icinga2:2.13.6
  • icingadb:1.1.0
  • icingadbredis:7.0.4
  • icingaweb2:2.11.3

I pulled version 2.11.4 of the Icinga Web 2 image and built my own image on it as before. Unfortunately, the icingaweb2:2.11.4 container does not start and get the following error on its startup:

ERROR: RuntimeException in /usr/share/icingaweb2/library/Icinga/Util/File.php:39 with message: SplFileObject::__construct(/usr/share/icingaweb2/etc/schema/mysql.schema.sql): failed to open stream: No such file or directory

So far, there have been no such problems, that is, the updates were successful. From my point of view, the problem appeared in version 2.11.4 of the Icinga Web 2 image.
My question is where can I find the file /usr/share/icingaweb2/etc/schema/mysql.schema.sql for version 2.11.4 of the Icinga Web 2 image?

Regards,
Jaroslaw K.