Open jwilliams-shadowsoft opened 4 years ago
@jwilliams-shadowsoft: please check whether the user icingadirector
is able to read those files
Thanks @Thomas-Gelf -- first thing I checked. Also turned off SELinux and behavior was the same.
What else can I check @Thomas-Gelf ?
not sure if postgres does not need it or applicable, but for mysql there is another flag in the resources.ini
use_ssl = "0" or use_ssl = "1"
the other thought is to force the port value for postgres. port = "5432"
I bet you had the same issue as me: a special character in the resources.ini file that prevented it from being parsed
Had the same problem as described. The culprit were indeed "special" chars in resources.ini
file.
I have a LDAP resource in my resources.ini
, where root_dn
, bind_dn
contain commas (,
) and bind_pw
contains an exclamation mark (!
). When I put those values in quotes, director service started fine. When any of them were unquoted, director failed with DB configuration is not valid
.
Now, I use ansible module ini_file
to write my resources.ini
and ansible didn't put in quotes. I don't know enough about ini file format to say whether Ansible or icingadirector handles writing/parsing ini files wrong. But all other Icinga web2 components seem to work fine with those values without quotes, so I'd expect Director should as well.
Edit: (forgot to include version info):
Installed on CentOS 7, from RPM packages.
Loaded Libraries:
Loaded Modules:
I just had a recurrence of this on director v1.9.1 and the tip about quoting funny strings in my resources.ini
works. So thanks @drallgood !
@matejv So do I, I think I can stick some extra quotes in my .j2 template to compensate for this.
Now, I use ansible module [
ini_file
]
I ran into the same problem because my database password contained a "(". After enclosing the password with quotes, the daemon started to run. Afterwards i tried to change the ressource config using the icingaweb UI and suddenly all the config strings were enclosed with quotes.
I also ran into this problem, we use icinga in docker configured via env vars, those also do not render the quotes into the resources.ini
file. In our case LDAP settings where also the cause.
Running icingacli director daemon run
outputted the DB configuration is not valid
without any indication about what is wrong. The web itself and all our modules (director, icingadb, reporting) all worked without any issue. Also running kickstart and migrations in the same container (from the cli) also worked like expected. Seems like a bug in the daemon.
Adding escaped quotes to the env var helped us. Thanks @matejv, @drallgood!
Expected Behavior
icinga-director daemon should run with no errors.
Current Behavior
icingacli director daemon run --db-resource director-db
produces same error.--debug
and--trace
gives no additional information.Possible Solution
It seems that the daemon process cannot find the connection information.
Steps to Reproduce (for bugs)
systemctl start icinga-director
Your Environment
icinga2 --version
): 2.10.5/etc/icingaweb2/resources.ini
(partial, redacted)/etc/icingaweb2/modules/director/config.ini