I am not sure if this is a bug or something i have missed while setting up Icinga.
I am trying to enable API on my Icinga Master server, which is throwing this message below:
Guide i am following to set up my master server :
root@MEL04MON07-1:/# icinga2 api setup
information/cli: Generating new CA.
warning/cli: CA files ‘/var/lib/icinga2/ca//ca.crt’ and ‘/var/lib/icinga2/ca//ca.key’ already exist.
warning/cli: Found CA, skipping and using the existing one.
information/cli: Private key file ‘/var/lib/icinga2/certs//MEL04MON07-1.key’ already exists, not generating new certificate.
information/cli: Adding new ApiUser ‘root’ in ‘/etc/icinga2/conf.d/api-users.conf’.
critical/Application: Error: Function call ‘mkstemp’ for file ‘/etc/icinga2/conf.d/api-users.conf.XXXXXX’ failed with error code 13, ‘Permission denied’
Additional information is available in ‘/var/log/icinga2/crash/report.1600062349.563251’
@@below is my output from the crash report file.
Caught unhandled exception.
Current time: 2020-09-14 15:45:49 +1000
Application version: r2.11.2-1
Platform version: 20.04.1 LTS (Focal Fossa)
Kernel version: 5.4.0-45-generic
Compiler: GNU 9.2.1
Build host: lcy01-amd64-022
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
Error: Function call ‘mkstemp’ for file ‘/etc/icinga2/conf.d/api-users.conf.XXXXXX’ failed with error code 13, ‘Permission denied’
- This would indicate a runtime problem or configuration error. If you believe this is a bug in Icinga 2
- please submit a bug report at https://github.com/Icinga/icinga2 and include this stack trace as well as any other
- information that might be useful in order to reproduce this problem.
Failed to launch GDB: No such file or directory
Now, i am stuck and unable to complete my initial icinga2web setup.
Did anyone had this issue on Icinga API setup? Any input much appreciated.