icingaweb2
icingaweb2 copied to clipboard
icingaweb2 fails to load after update to version 2.9
Describe the bug
After the update via yum icingaweb2 no longer runs properly...
Log
10.xx.xx.xx - - [18/Aug/2021:16:37:24 +0200] "GET /application-state HTTP/1.1" 500 1892 10.xx.xx.xx - - [18/Aug/2021:16:38:16 +0200] "GET /authentication/login HTTP/1.1" 200 6707 10.xx.xx.xx - - [18/Aug/2021:16:38:17 +0200] "GET /js/icinga.min.js HTTP/1.1" 304 - [Wed Aug 18 16:38:17.446345 2021] [php7:error] [pid 29120] [client 110.xx.xx.xx:58527] PHP Fatal error: Uncaught Less_Exception_Parser: Expected ')' got '!' in anonymous-file-0.less in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php:2653\nStack trace:\n#0 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(878): Less_Parser->Error('Expected ')' go...')\n#1 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1399): Less_Parser->expectChar(')')\n#2 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(799): Less_Parser->parseMixinCall()\n#3 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(945): Less_Parser->MatchFuncs(Array)\n#4 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1834): Less_Parser->parsePrimary()\n#5 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1888): Less_Parser->parseBlock()\n#6 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(799): Less_Parser->parseRuleset()\n#7 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(945): Less_Parser->MatchFuncs(Array)\n#8 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(628): Less_Parser->parsePrimary()\n#9 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(578): Less_Parser->GetRules(NULL)\n#10 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(420): Less_Parser->_parse()\n#11 /usr/share/icingaweb2/library/vendor/lessphp/lessc.inc.php(129): Less_Parser->parse('\n\n@font-face {\n...')\n#12 /usr/share/php/Icinga/Web/LessCompiler.php(272): lessc->compile('\n\n@font-face {\n...')\n#13 /usr/share/php/Icinga/Web/StyleSheet.php(226): Icinga\Web\LessCompiler->render()\n#14 /usr/share/php/Icinga/Web/StyleSheet.php(264): Icinga\Web\StyleSheet->render(true)\n#15 /usr/share/php/Icinga/Application/webrouter.php(62): Icinga\Web\StyleSheet::send(true)\n#16 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...')\n#17 {main}\n thrown in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php on line 2653, referer: https://monitoring.kdo.de/authentication/login 10.xx.xx.xx - - [18/Aug/2021:16:38:17 +0200] "GET /css/icinga.min.css HTTP/1.1" 200 1970 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /authentication/login HTTP/1.1" 200 6707 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-analytics.png HTTP/1.1" 200 232972 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-cloud.png HTTP/1.1" 200 294936 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-icinga.png HTTP/1.1" 200 259264 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-automation.png HTTP/1.1" 200 320334 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-metrics.png HTTP/1.1" 200 289015 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-notifications.png HTTP/1.1" 200 308893 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /img/orb-infrastructure.png HTTP/1.1" 200 293092 10.xx.xx.xx - - [18/Aug/2021:16:38:20 +0200] "GET /js/icinga.min.js HTTP/1.1" 200 392263
Screenshot
Your Environment
-
Icinga Web 2 version and modules (System - About):
-
Web browser used: Chrome, Firefox, Edge
-
Icinga 2 version used (
icinga2 --version
): 2.13.0 -
PHP version used (
php --version
): 7.2.34 -
Server operating system and version: CentOS 7 Kernel version: 3.10.0-1160.31.1.el7.x86_64
-
ICingaweb2 Modules:
MODULE VERSION STATE DIRECTORY businessprocess 2.3.1 disabled /usr/share/icingaweb2/modules/businessprocess cube 1.1.0 enabled /usr/share/icingaweb2/modules/cube director 1.8.0 enabled /usr/share/icingaweb2/modules/director doc 2.8.2 disabled /usr/share/icingaweb2/modules/doc elasticsearch 1.0.0 enabled /usr/share/icingaweb2/modules/elasticsearch grafana 1.4.2 enabled /usr/share/icingaweb2/modules/grafana graphite 0.0.0.5 disabled /usr/share/icingaweb2/modules/graphite incubator 0.6.0 enabled /usr/share/icingaweb2/modules/incubator ipl v0.5.0 enabled /usr/share/icingaweb2/modules/ipl monitoring 2.8.2 enabled /usr/share/icingaweb2/modules/monitoring pnp 1.0.1 disabled /usr/share/icingaweb2/modules/pnp reactbundle 0.9.0 enabled /usr/share/icingaweb2/modules/reactbundle setup 2.8.2 disabled /usr/share/icingaweb2/modules/setup translation 2.8.2 enabled /usr/share/icingaweb2/modules/translation vsphere 1.1.0 enabled /usr/share/icingaweb2/modules/vsphere vspheredb 1.1.0 enabled /usr/share/icingaweb2/modules/vspheredb
Hi,
first please make sure that the core modules (doc, monitoring, setup, translation) are at the same version as Icinga Web 2. They all show up as v2.8.2 still.
If that doesn't solve the issue already, another module might be the reason. Since the main suspects businessprocess and vspheredb are both up to date, it's one of the others.
The best way to track this down, is to disable each module one-by-one and load /icingaweb2/css/icinga.css in the browser after each. Once this doesn’t error anymore, you’ve found the erroneous module.
Though I've looked at all the modules you have enabled and none of them is the obvious suspect. So I guess it's one of the core modules.
Hi,
thanks for the answer.
The older versions come because I downgraded versions.
I updated again:
MODULE VERSION STATE DIRECTORY businessprocess 2.3.1 disabled /usr/share/icingaweb2/modules/businessprocess cube 1.1.0 enabled /usr/share/icingaweb2/modules/cube director 1.8.1 enabled /usr/share/icingaweb2/modules/director doc 2.9.3 disabled /usr/share/icingaweb2/modules/doc elasticsearch 1.0.0 enabled /usr/share/icingaweb2/modules/elasticsearch grafana 1.4.2 enabled /usr/share/icingaweb2/modules/grafana graphite 0.0.0.5 disabled /usr/share/icingaweb2/modules/graphite incubator 0.6.0 enabled /usr/share/icingaweb2/modules/incubator ipl v0.5.0 enabled /usr/share/icingaweb2/modules/ipl migrate 2.9.3 disabled /usr/share/icingaweb2/modules/migrate monitoring 2.9.3 enabled /usr/share/icingaweb2/modules/monitoring pnp 1.0.1 disabled /usr/share/icingaweb2/modules/pnp reactbundle 0.9.0 enabled /usr/share/icingaweb2/modules/reactbundle setup 2.9.3 disabled /usr/share/icingaweb2/modules/setup translation 2.9.3 enabled /usr/share/icingaweb2/modules/translation vsphere 1.1.0 enabled /usr/share/icingaweb2/modules/vsphere vspheredb 1.1.0 enabled /usr/share/icingaweb2/modules/vspheredb
I deactivated all modules - Problem exists.
load icinga.css:
Fatal error: Uncaught Less_Exception_Parser: Expected ')' got '!' in anonymous-file-0.less in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php:2653 Stack trace: #0 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(878): Less_Parser->Error('Expected ')' go...') #1 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1399): Less_Parser->expectChar(')') #2 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(799): Less_Parser->parseMixinCall() #3 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(945): Less_Parser->MatchFuncs(Array) #4 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1834): Less_Parser->parsePrimary() #5 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1888): Less_Parser->parseBlock() #6 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(799): Less_Parser->parseRuleset() #7 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(945): Less_Parser->MatchFuncs(Array) #8 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(628): Less_Parser->parsePrimary() #9 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(578): Less_Parser->GetRules(NULL) #10 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(420): Less_Parser->_parse() #11 /usr/share/icingaweb2/library/vendor/lessphp/lessc.inc.php(129): Less_Parser->parse('\n\n@font-face {\n...') #12 /usr/share/php/Icinga/Web/LessCompiler.php(272): lessc->compile('\n\n@font-face {\n...') #13 /usr/share/php/Icinga/Web/StyleSheet.php(226): Icinga\Web\LessCompiler->render() #14 /usr/share/php/Icinga/Web/StyleSheet.php(264): Icinga\Web\StyleSheet->render(false) #15 /usr/share/php/Icinga/Application/webrouter.php(59): Icinga\Web\StyleSheet::send() #16 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...') #17 {main} thrown in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php on line 2653
Sorry I thought this isn't necessary: Please make always a hard refresh (Ctrl+F5/R on windows/linux) of /icingaweb2/css/icinga.css.
same result...
Arg, then if you don't mind, please apply a small patch which then causes the error to be logged with an excerpt of the position where the error occurs. This hopefully gives a lead where to search further.
Apply patch 4510.txt with cat 4510.txt | patch -Np2
at /usr/share/php/
. Then reload and take a look at the log.
after patch the page is blank... :(
Yeah, but the log should include the error now + the mentioned excerpt :wink:
Log: 10.xx.xx.xx - - [19/Aug/2021:11:29:40 +0200] "GET /application-state HTTP/1.1" 500 1354 10.xx.xx.xx - - [19/Aug/2021:11:29:40 +0200] "GET /css/icinga.css HTTP/1.1" 304 -
Sorry, not the access log, Icinga Web 2's own log. That's either /var/log/icingaweb2/icingaweb2.log
or syslog or the php error log, depending on your config.
Aug 19 12:20:15 server icingaweb2[2172]: PDOException in /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php:401 with message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ICINGA_icingaweb.icingaweb_rememberme' doesn't exist #0 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(401): PDO->prepare(String) #1 /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php(489): ipl\Sql\Connection->prepexec(String) #2 /usr/share/php/Icinga/Web/RememberMe.php(170): ipl\Sql\Connection->delete(String, Array) #3 /usr/share/icingaweb2/application/controllers/ApplicationStateController.php(70): Icinga\Web\RememberMe::removeExpired() #4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\ApplicationStateController->indexAction() #5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String) #6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #7 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #8 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch() #9 /usr/share/icingaweb2/public/index.php(4): require_once(String) #10 {main}
That's a different error. The error is Base table or view not found: 1146 Table 'ICINGA_icingaweb.icingaweb_rememberme' doesn't exist
. (2.9 requires a db schema upgrade) What we're looking for here is still Expected ')' got '!' in anonymous-file-0.less
and the very next message following it.
I can't find anything about that... :(
Oh well, fine, then apply this patch, the same way: 4510.txt (Will only apply with the previous patch pre-applied)
Then /icingaweb2/css/icinga.css shows the details again.
`Expected ')' got '!' in anonymous-file-0.less #0 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(878): Less_Parser->Error('Expected ')' go...') #1 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1399): Less_Parser->expectChar(')') #2 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(799): Less_Parser->parseMixinCall() #3 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(945): Less_Parser->MatchFuncs(Array) #4 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1834): Less_Parser->parsePrimary() #5 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(1888): Less_Parser->parseBlock() #6 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(799): Less_Parser->parseRuleset() #7 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(945): Less_Parser->MatchFuncs(Array) #8 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(628): Less_Parser->parsePrimary() #9 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(578): Less_Parser->GetRules(NULL) #10 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(420): Less_Parser->_parse() #11 /usr/share/icingaweb2/library/vendor/lessphp/lessc.inc.php(129): Less_Parser->parse('\n\n@font-face {\n...') #12 /usr/share/php/Icinga/Web/LessCompiler.php(274): lessc->compile('\n\n@font-face {\n...') #13 /usr/share/php/Icinga/Web/StyleSheet.php(226): Icinga\Web\LessCompiler->render() #14 /usr/share/php/Icinga/Web/StyleSheet.php(264): Icinga\Web\StyleSheet->render(false) #15 /usr/share/php/Icinga/Application/webrouter.php(59): Icinga\Web\StyleSheet::send() #16 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...') #17 {main}
is once the containers are ready .impact { .transition(background-color 2s 1s linear !important); background-color: @gray-lighter !important; }
.impact > .controls, .impact li.active a { `
Ehrm, how did you install Icinga Web 2?
I found the piece of code, but not in the current version of Icinga Web 2. Only in an archived packaging repo are these lines, identical to those you have.
[root@server php]# yum info icingaweb2 Installierte Pakete Name : icingaweb2 Architektur : noarch Version : 2.9.3 Ausgabe : 1.el7.icinga Größe : 11 M Quelle : installed Aus Quelle : icinga-stable-release Zusammenfassung: Icinga Web 2 URL : https://icinga.com Lizenz : GPLv2+ and MIT and BSD Beschreibung: Icinga Web 2
Our packages only install the latest versions of files. These usually override old files, but I suspect this didn't happen at some point on your system.
Check /usr/share/icingaweb2/public/css/icinga/
if there's only a single base.less
, or is there maybe a backup file (e.g. base.original.less
) of sorts? If there's one, remove the existing base.less
and put the backup file in its place.
If there's none, replace base.less
with this: https://github.com/Icinga/icingaweb2/blob/support/2.9/public/css/icinga/base.less
after replace, error:
Fatal error: Uncaught Less_Exception_Chunk: ParseError: missing opening
{
in anonymous-file-0.less on line 10073, column 1 10071| // Fix that empty columns don't consume their width 10072| min-height: 1px; 10073| } 10074| 10075| .controls { 10076| [class^="col-"], in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php:631 Stack trace: #0 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(578): Less_Parser->GetRules(NULL) #1 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(420): Less_Parser->_parse() #2 /usr/share/icingaweb2/library/vendor/lessphp/lessc.inc.php(129): Less_Parser->parse('\n\n@font-face {\n...') #3 /usr/share/php/Icinga/Web/LessCompiler.php(272): lessc->compile('\n\n@font-face {\n...') #4 /usr/share/php/Icinga/Web/StyleSheet.php(226): Icinga\Web\LessCompiler->render() #5 /usr/share/php/Icinga/Web/StyleSheet.php(264): Icinga\Web\StyleSheet->render(false) #6 /usr/share/php/Icinga/Application/webrouter.php(59): Icinga\Web\StyleSheet::send() #7 /usr/share/icingaweb2/public/index.php(4): require_once('/usr/share/php/...') #8 {main} thrown in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php on line 631
Then it's not only this file. Uninstall Icinga Web 2 completely and perform a fresh re-install instead. If that doesn't help, I'm out of ideas.
same error after fresh reinstall. :-(
Okay, then this ends here I guess. This is most surely an issue on your system, I just don't know where to let you look further. Please ask on the forums for help, include there what you've done already.
Things to note:
- This is an issue with syntax errors in CSS/LESS files of either Icinga Web 2 (
/usr/share/icingaweb2/public/css
) or some module (<module-install-path>/public/css
) - To nail the location down, use the patches I've provided here and load
/icingaweb2/css/icinga.css
, but I think that's not necessary as you're only using official modules and I don't know of any issues with any of them (provided the latest version is used) - Maybe perform a fresh install on a clean Centos 7 VM/container to see where differences are
- Perform another fresh install of Icinga Web 2 and all modules and ensure that all files are gone after uninstalling before re-installing
Hello, I have the same problem after an update just today, here is my situation:
I'm on debian 10.10, I had the same visual result as you (a CSS load problem icinga.min.css as text/html returned instead of text/css).
To solve my update issue, I used the icingacli command to disable businessprocess AND ipl (which was 0.5.0).
then I did apt update then apt upgrade, and tha's it!
Best regards
Hello, I have the same problem after an update just today, here is my situation:
I'm on debian 10.10, I had the same visual result as you (a CSS load problem icinga.min.css as text/html returned instead of text/css).
To solve my update issue, I used the icingacli command to disable businessprocess AND ipl (which was 0.5.0).
then I did apt update then apt upgrade, and tha's it!
Best regards
Hi there,
unfortunately that is not the solution in my case. :(
Hi there Same problem on centos 7
Fatal error: Uncaught Less_Exception_Chunk: ParseError: Unexpected input in anonymous-file-0.less on line 13514, column 1
13512| .badge-missing { background: #ccc; }
13513| /** END Badges **/
13514| .badges
13515| /** BEGIN Tiles **/
13516| .tiles:after {
13517| content:''; in /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php:631
Stack trace:
#0 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(578): Less_Parser->GetRules(NULL)
#1 /usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php(420): Less_Parser->_parse()
#2 /usr/share/icingaweb2/library/vendor/lessphp/lessc.inc.php(129): Less_Parser->parse('\n\n// Style\n\n.co...')
#3 /usr/share/php/Icinga/Web/LessCompiler.php(272): lessc->compile('\n\n// Style\n\n.co...')
#4 /usr/share/php/Icinga/Web/StyleSheet.php(226): Icinga\Web\LessCompiler->render()
#5 /usr/share/php/Icinga/Web/StyleSheet.php(264): Icinga\Web\StyleSheet->render(true)
#6 /usr/share/php/Icinga/Application/webrouter.php(62): Icinga\Web\StyleSheet::send(true)
#7 /usr/s in
/usr/share/icingaweb2/library/vendor/lessphp/lib/Less/Parser.php on line 631
@bgoerner , thanks! after updating businessprocess it works fine again!
I'm on CentOS 7.9 and having the same issue. I tried disabling the two modules but that didn't work for me either. [Edit] - disabling vspheredb made it work for me.
In my case it was /usr/share/icingaweb2/public/css/themes/Dark.less and Dark2.less
Could be i had them installed years ago. Deleting the files fixed my problems.
In my case it was /usr/share/icingaweb2/public/css/themes/Dark.less and Dark2.less
Could be i had them installed years ago. Deleting the files fixed my problems.
Thanks for this hint! I've had this problem for months now and couldn't find a solution... In the end it was the old and obsolete 'Dark.less' theme!
After deleting this theme-file in '/usr/share/icingaweb2/public/css/themes/' the login page is displayed correctly!