Icinga / docker-icingaweb2

GNU General Public License v2.0
15 stars 11 forks source link

Pages seems to be in acessibility mode. #53

Closed tjapa closed 3 years ago

tjapa commented 3 years ago

Describe the bug

Pages seems to be in acessibility mode.

To Reproduce

Dockerfile to build image:

FROM alpine/git
WORKDIR /
RUN git clone https://github.com/Icinga/icingadb-web.git icingadb

FROM icinga/icingaweb2:2.9.3
USER root
RUN rm -rf /usr/share/icingaweb2/modules/icingadb/*
USER www-data
COPY --from=0 /icingadb /usr/share/icingaweb2/modules/icingadb

Screenshots

image

Your Environment

Icinga Web 2 Version 2.9.3 Git commit c757a17530c326c7d6daebd6171486cb8167a8a1 PHP Version 7.3.29-1~deb10u1 Git commit date Loaded Libraries Name Version icinga/icinga-php-thirdparty 0.10.0 icinga/icinga-php-library 0.6.1 Loaded Modules Name Version icingadb 1.0.0-rc1

Al2Klimov commented 3 years ago

Share the thoughts you had while transferring this issue.

nilmerg commented 3 years ago

It's related to the docker image and how it's used.

Al2Klimov commented 3 years ago

You've missed some dependencies. Disable the Icinga DB mod via docker exec and icingacli mod dis icingadb. Try to re-enable it via the web interface to see which dependencies are missing.

tjapa commented 3 years ago

I did what you said. Now I get the message: "Module "ipl" is not enabled. This module is mandatory for Icinga DB Web". The ipl module doesn't appear as a option in modules page.

Repeating the same process, but now with the module "ipl" enable via docker (which I think is wrong since it became the Icinga PHP Library), I get the last 2 screenshots.

Screenshots

image image image

Screenshots Test

image image

Al2Klimov commented 3 years ago

What if you use not 2.9.3, but master as base?

tjapa commented 3 years ago

Ignore the last reply and screenshots, I was using the wrong Dockerfile, sorry. The problem using 2.9.3 and master are the same from the start. Now the screenshoots are correctly. The last 2 screenshots with each docker image are the immediate result after enabling the icingadb module:

Screenshots - 2.9.3

image image image image image

Screenshots - Master

image image image image image

Al2Klimov commented 3 years ago

Are there any PHP exceptions in the container log?

tjapa commented 3 years ago

I disabled the monitoring module to not get the errors saying that the backend was not configured, so I managed to catch this error:

[Thu Aug 26 15:54:18.460553 2021] [php7:error] [pid 17] [client 172.16.0.67:57618] PHP Fatal error:  Uncaught Less_Exception_Compiler: .card is undefined in anonymous-file-0.less in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Tree/Mixin/Call.php:143\nStack trace:\n#0 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Tree/Ruleset.php(143): Less_Tree_Mixin_Call->compile(Object(Less_Environment))\n#1 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Tree/Ruleset.php(86): Less_Tree_Ruleset->EvalMixinCalls(Object(Less_Tree_Ruleset), Object(Less_Environment), 4)\n#2 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Tree/Ruleset.php(91): Less_Tree_Ruleset->compile(Object(Less_Environment))\n#3 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Tree/Ruleset.php(91): Less_Tree_Ruleset->compile(Object(Less_Environment))\n#4 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(185): Less_Tree_Ruleset->compile(Object(Less_Environment))\n#5 /usr/share/icingaweb2/library/vendor/lessphp/lessc.inc.php(130): Less_Parser->getCss()\n#6 /usr/share/icingaweb2/library/Icinga/Web/LessCompiler.php(272): in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Tree/Mixin/Call.php on line 143, referer: http://172.16.0.135:8080/dashboard
Al2Klimov commented 3 years ago

@nilmerg Has the monitoring mod to actually be enabled?

nilmerg commented 3 years ago

Not for Icinga DB Web master. .card is undefined is due to ipl-web being outdated. Isn't the master tag using the master/main branch everywhere?

Al2Klimov commented 3 years ago

Anyway:

@tjapa An upcoming Docker image will include the upcoming Icinga DB RC2/final. I consider waiting for it much easier.

tjapa commented 3 years ago

I understood. I will wait. Thank you very much.

dwt commented 3 years ago

@Al2Klimov I've just tried with master and it still seems to be waiting for rc2/final - any timeline when this can be tried again?

dwt commented 3 years ago

It seems that #58 might be the fix for these problems? If so, please comment.

julianbrost commented 3 years ago

Once the next icinga/icingaweb2:master image is pushed to Docker Hub (should happen tonight), that should include a working version of the current icingadb-web@master.

The Dockerfile in the first post of this issue still won't work, but that's because the version of icinga-php-library that's in icinga/icingaweb2:2.9.3 is not compatible with icingadb-web@master, so this mixes modules in incompatible versions. It might work when also updating icinga-php-library, but I'm not sure if that's all, there could be other incompatibilities.

dwt commented 3 years ago

@julianbrost I'm on this docker compose file: https://github.com/dwt/docker-compose-icinga, any info on required changes would be quite appreciated.

julianbrost commented 3 years ago

Hm, seems like the icinga/icingaweb2:master image on Docker Hub still uses the broken version combination. I'll try to get that fixed, for now you should be able to build a working image for youself by doing:

git clone https://github.com/Icinga/docker-icingaweb2.git
git clone https://github.com/Icinga/icingaweb2.git
cd docker-icingaweb2
./build.bash ../icingaweb2 master