Hi there
I am new to installing icinga2 for the first time. And hoping to install the icinga2 agent.
The “sudo icinga2 node wizard” command is failing for me. I am running the node wizard as root, and it still fails. Any ideas how to fix this?
uid=0(root) gid=0(root) groups=0(root)
# ls -ld /var/lib/icinga2/certs/
drwxr-xr-x 2 icinga icinga 4096 Jan 10 05:01 /var/lib/icinga2/certs/
# icinga2 node wizard
Welcome to the Icinga 2 Setup Wizard!
We will guide you through all required configuration details.
Please specify if this is an agent/satellite setup ('n' installs a master setup) [Y/n]:
Starting the Agent/Satellite setup routine...
Please specify the common name (CN) [<hostname_hidden>]: <hostname_hidden>
Please specify the parent endpoint(s) (master or satellite) where this node should connect to:
Master/Satellite Common Name (CN from your master/satellite node): <hostname_hidden>
Do you want to establish a connection to the parent node from this node? [Y/n]: y
Please specify the master/satellite connection information:
Master/Satellite endpoint host (IP address or FQDN): <hostname_hidden>
Master/Satellite endpoint port [5665]:
Add more master/satellite endpoints? [y/N]: n
critical/cli: chown() failed with error code 1, "Operation not permitted"
critical/SSL: Error while opening private RSA key file '/var/lib/icinga2/certs//<hostname_hidden>.key': 33558541, "error:0200100D:system library:fopen:Permission denied"
critical/cli: Failed to create new self-signed certificate for CN '<hostname_hidden>'. Please try again.
## Describe the bug
For a training we have pre-installed Icinga 2 using Puppe
…
t which sets file permssions for zones.conf to:
-rw-r-----. 1 root icinga 220 Apr 28 14:50 /etc/icinga2/zones.conf
If the command `icinga2 node wizard` is then run it complains about a failed chown:
Default global zones: global-templates director-global
Do you want to specify additional global zones? [y/N]:
critical/cli: chown() failed with error code 1, "Operation not permitted"
But the wizard does copy the file over and creates a new one without errors.
## To Reproduce
Just set the file permissions / ownership and run the wizard.
1. `chown root.icinga /etc/icinga2/zones.conf && chmod 0640 /etc/icinga2/zones.conf`
2. `icinga2 node wizard`
Can be repeated as often as necessary.
## Expected behavior
No chown is executed and / or no error is caused in this case because it is not required to move the file to .orig and create a new one.
## Your Environment
* Version used (`icinga2 --version`): 2.12.3
* Operating System and version: CentOS 7