HELP Icinga2 not start and Icinga2web with Error

Hello,

my Icinga2 can not running and the Web GUI shows the message

The monitoring backend “icinga” is not running.

I tried to restart of the icinga2 service but i haved only error messages.

root@ubuntu1804:/home/ubuntu# icinga2 daemon -C
[2020-09-22 16:23:50 +0200] information/cli: Icinga application loader (version: r2.12.0-1)
[2020-09-22 16:23:50 +0200] information/cli: Loading configuration file(s).
[2020-09-22 16:23:50 +0200] information/ConfigItem: Committing config item(s).
[2020-09-22 16:23:50 +0200] information/ApiListener: My API identity: ubuntu1804.linuxvmimages.local
[2020-09-22 16:23:50 +0200] critical/config: Error: An object with type ‘Service’ and name ‘ubuntu1804.linuxvmimages.local!disk /’ already exists (in /etc/icinga2/conf.d/services.conf: 118:1-118:53), new declaration: in /etc/icinga2/conf.d/services.conf: 65:1-65:53
Location: in /etc/icinga2/conf.d/services.conf: 65:1-65:53
/etc/icinga2/conf.d/services.conf(63): }
/etc/icinga2/conf.d/services.conf(64):
/etc/icinga2/conf.d/services.conf(65): apply Service for (disk => config in host.vars.disks) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/services.conf(66): import “generic-service”
/etc/icinga2/conf.d/services.conf(67):

[2020-09-22 16:23:50 +0200] critical/config: Error: An object with type ‘Service’ and name ‘ubuntu1804.linuxvmimages.local!disk’ already exists (in /etc/icinga2/conf.d/services.conf: 118:1-118:53), new declaration: in /etc/icinga2/conf.d/services.conf: 65:1-65:53
Location: in /etc/icinga2/conf.d/services.conf: 65:1-65:53
/etc/icinga2/conf.d/services.conf(63): }
/etc/icinga2/conf.d/services.conf(64):
/etc/icinga2/conf.d/services.conf(65): apply Service for (disk => config in host.vars.disks) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/services.conf(66): import “generic-service”
/etc/icinga2/conf.d/services.conf(67):

[2020-09-22 16:23:50 +0200] critical/config: 2 errors
[2020-09-22 16:23:50 +0200] critical/cli: Config validation failed. Re-run with ‘icinga2 daemon -C’ after fixing the config.

root@ubuntu1804:/home/ubuntu# systemctl restart icinga2
Job for icinga2.service failed because the control process exited with error code.
See “systemctl status icinga2.service” and “journalctl -xe” for details.

root@ubuntu1804:/home/ubuntu# systemctl status icinga2.service
● icinga2.service - Icinga host/service/network monitoring system
Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/icinga2.service.d
└─limits.conf
Active: failed (Result: exit-code) since Tue 2020-09-22 16:25:44 CEST; 4min 37s ago
Process: 4508 ExecStart=/usr/sbin/icinga2 daemon --close-stdio -e ${ICINGA2_ERROR_LOG} (code=exited, status=1/
Process: 4503 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/default/icinga2 (code=exited, status=0/SUCCESS)
Main PID: 4508 (code=exited, status=1/FAILURE)

Sep 22 16:25:44 ubuntu1804 icinga2[4508]: /etc/icinga2/conf.d/services.conf(64):
Sep 22 16:25:44 ubuntu1804 icinga2[4508]: /etc/icinga2/conf.d/services.conf(65): apply Service for (disk => conf
Sep 22 16:25:44 ubuntu1804 icinga2[4508]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 22 16:25:44 ubuntu1804 icinga2[4508]: /etc/icinga2/conf.d/services.conf(66): import “generic-service”
Sep 22 16:25:44 ubuntu1804 icinga2[4508]: /etc/icinga2/conf.d/services.conf(67):
Sep 22 16:25:44 ubuntu1804 icinga2[4508]: [2020-09-22 16:25:44 +0200] critical/config: 2 errors
Sep 22 16:25:44 ubuntu1804 icinga2[4508]: [2020-09-22 16:25:44 +0200] critical/cli: Config validation failed. Re
Sep 22 16:25:44 ubuntu1804 systemd[1]: icinga2.service: Main process exited, code=exited, status=1/FAILURE
Sep 22 16:25:44 ubuntu1804 systemd[1]: icinga2.service: Failed with result ‘exit-code’.
Sep 22 16:25:44 ubuntu1804 systemd[1]: Failed to start Icinga host/service/network monitoring system.

please Help…

Best regards

Lmarcelofc

Hi and Welcome!

as the error says, you have duplicate declarations. Check line 65 and 118 in your /etc/icinga2/conf.d/services.conf file.

Greetz

Hi FluxX

thanks a lot for the help.

sometimes the problem is in front of our nose and we can’t see.

with the most cordial lengths

Lmarcelofc