New installation ... Icinga ... CentOS 7.4 .. Error ViewRender cannot locate module directory fpr module Setup

(Hans Kestler) #1

Hello …
I would like to change from Nagios 2012 to ICINGA2.

Unfortunately, I can not get on,

when the http://IP/Setup Url comes ICINGA ViewRenderer can not locate module directory for module "Setup"

Does anyone know the problem ?

many Greetings

(Michael Friedrich) #2

Please show the corresponding web server configuration, additional errors logs from Apache/Nginx and the specific Icinga Web 2 version and related packages (rpm -qa | grep icingaweb2).

(Hans Kestler) #3

Hello …

Do you speak German ?

The versions PHP
PHP 7.2.12 (cli) (built: Nov 6 2018 16:40:25) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.2.12, Copyright © 1999-2018, by Zend Technologies

The versions icingaweb2:

The version Apache:

Do you have an idea


(Michael Friedrich) #4

I prefer English to allow everyone in the community to join the conversation, so I’ve made this a general forum rule.

Did you modify the Apache configuration located in /etc/httpd/conf.d/icingaweb2.conf resp. can you show it?

Can you check the modules directory on disk, whether setup is located in there?

ls -lah /usr/share/icingaweb2/modules

Oh, and SELinux would be interesting as well, such as getenforce. This is a common error.

(Hans Kestler) #5

Helllo …
thanks for the information

the icingaweb2.conf is original:
Alias /icingaweb2 “/usr/share/icingaweb2/public”

<IfVersion < 2.4>
# Forward PHP requests to FPM
SetEnvIf Authorization “(.)" HTTP_AUTHORIZATION=$1
<LocationMatch "^/icingaweb2/(.
ProxyPassMatch “fcgi://$1”

<Directory “/usr/share/icingaweb2/public”>
Options SymLinksIfOwnerMatch
AllowOverride None

DirectoryIndex index.php

<IfModule mod_authz_core.c>
    # Apache 2.4
        Require all granted

<IfModule !mod_authz_core.c>
    # Apache 2.2
    Order allow,deny
    Allow from all

SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"

EnableSendfile Off

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /icingaweb2/
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

<IfModule !mod_rewrite.c>
    DirectoryIndex error_norewrite.html
    ErrorDocument 404 /icingaweb2/error_norewrite.html

<IfVersion >= 2.4>
    # Forward PHP requests to FPM
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    <FilesMatch "\.php$">
        SetHandler "proxy:fcgi://"
        ErrorDocument 503 /icingaweb2/error_unavailable.html

The setup module:
12K ./setup/application/clicommands
4,0K ./setup/application/controllers
92K ./setup/application/forms
104K ./setup/application/locale/de_DE/LC_MESSAGES
104K ./setup/application/locale/de_DE
100K ./setup/application/locale/it_IT/LC_MESSAGES
100K ./setup/application/locale/it_IT
204K ./setup/application/locale
20K ./setup/application/views/scripts/form
8,0K ./setup/application/views/scripts/index/parts
16K ./setup/application/views/scripts/index
36K ./setup/application/views/scripts
36K ./setup/application/views
348K ./setup/application
4,0K ./setup/library/Setup/Exception
24K ./setup/library/Setup/Requirement
48K ./setup/library/Setup/Steps
40K ./setup/library/Setup/Utils
4,0K ./setup/library/Setup/Web/Form/Validator
4,0K ./setup/library/Setup/Web/Form
4,0K ./setup/library/Setup/Web
8,0K ./setup/library/Setup/Webserver
196K ./setup/library/Setup
196K ./setup/library
24K ./setup/test/php/library/Setup
24K ./setup/test/php/library
24K ./setup/test/php
24K ./setup/test
572K ./setup

The selinux / config::

(Michael Friedrich) #6

I wanted to see ls -lah also for the reason of the user/group ownership. I suspect a permission problem here.

(Hans Kestler) #7

Hello …

I have to test **chmod -R 777 *** accomplished

[root@icinga-server setup]# ls -lah /usr/share/icingaweb2/modules
insgesamt 0
drwxrwxrwx. 6 root root 67 29. Nov 15:42 .
drwxrwxrwx. 7 root root 80 29. Nov 15:42 …
drwxrwxrwx. 6 root root 124 29. Nov 15:42 doc
drwxrwxrwx. 7 root root 136 29. Nov 15:42 monitoring
drwxrwxrwx. 5 root root 71 29. Nov 15:42 setup
drwxrwxrwx. 5 root root 70 29. Nov 15:42 translation

(Michael Friedrich) #8

Don’t use chmod -R 777 anywhere, never. This opens modifications and injections for anyone else than the group and user.

755 is totally fine for directories, 644 for files. Now that you’ve managed to break things here, I’d suggest to either re-install the package or fix the permissions.

find /usr/share/icingaweb2/modules -type d -exec sh -c 'chmod 755'
find /usr/share/icingaweb2/modules -type f -exec sh -c 'chmod 644'

Please also show the output of


as I really want to see if SELinux is disasbled.

(Hans Kestler) #9

Hello Michael …

the output of the comman is:
[root@icinga-server icingaweb2]# find /usr/share/icingaweb2/modules -type d -exec sh -c ‘chmod 755’
find: Fehlendes Argument für “-exec”.

[root@icinga-server icingaweb2]# getenforce

I have traveled 3 times reinstalled, always the same problem


(Roland) #10

please try

find /usr/share/icingaweb2/modules -type d -print0 | xargs -0 chmod 755

(Michael Friedrich) #11

Ups, please try

find /usr/share/icingaweb2/modules -type d -exec sh -c ‘chmod 755 {}’ \;

(Hans Kestler) #12

Hello Comand is ok … the same problem …
Can it be an Apache problem?

Here’s the log of Apache

[Fri Nov 30 11:20:42.504537 2018] [mpm_prefork:notice] [pid 4246] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Nov 30 11:20:43.588137 2018] [suexec:notice] [pid 4345] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using fe80::219:76bb:ca0d:ee5c. Set the ‘ServerName’ directive globally to suppress this message
[Fri Nov 30 11:20:43.613551 2018] [auth_digest:notice] [pid 4345] AH01757: generating secret for digest authentication …
[Fri Nov 30 11:20:43.614138 2018] [lbmethod_heartbeat:notice] [pid 4345] AH02282: No slotmem from mod_heartmonitor
[Fri Nov 30 11:20:43.640945 2018] [mpm_prefork:notice] [pid 4345] AH00163: Apache/2.4.6 (CentOS) PHP/7.1.24 configured – resuming normal operations
[Fri Nov 30 11:20:43.640977 2018] [core:notice] [pid 4345] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Fri Nov 30 11:21:00.174723 2018] [authz_core:error] [pid 4346] [client] AH01630: client denied by server configuration: /etc/httpd/htdocs
[Fri Nov 30 11:22:00.175583 2018] [authz_core:error] [pid 4347] [client] AH01630: client denied by server configuration: /etc/httpd/htdocs
[Fri Nov 30 11:23:00.175161 2018] [authz_core:error] [pid 4349] [client] AH01630: client denied by server configuration: /etc/httpd/htdocs


(Michael Friedrich) #13

That really looks odd. Can you please share your /etc/httpd/httpd.conf file, what exactly did you change in there?

(Hans Kestler) #14

Hello …

It works … I have reinstalled the system …
Thank you