Jobs/Housekeeping on CLI not working

Hi,

I’m unable to get directors jobs on CLI and with daemonized service working - within web GUI everthing works fine.

How to debug this problem?

Best Regards,
Manfred

Parameter --verbose for command “icingacli director jobs run forever” doesn’t generate any output. Same with “icingacli director housekeeping tasks” - output always shows count 0 even if there are undeployed configs.
systemd unit file should be OK, service is running without visible errors.

My environment:
openSUSE Leap 15.0
PHP7.2
Icinga2 2.10.5
Icingaweb 2.6.3
Director (latest from Git some days ago)

Hi,
maybe this helps and is a small hint for you:
We had the same problem after playing arround with PostgreSQL. After switching back to MariaDB it was the same Situation in our case.
We had a config backup and restored it and then it worked like befor. It seems we forgot to change same config files back to the mariadb-database.

here some path to config files, where the db is saved:

  • /etc/icingaweb2/ressources.ini
  • /etc/icingaweb2/modules/director/config.ini

i hope it helps a little bit

Hi Stevie,

thanks for your tips, but I think it is not an access problem to these files.
It will not work even when I start the jobs as root.

Maybe it’s an issue with PHP’s cli config, but I’m not sure how to debug this.

Hi Manfred, with PHP Debugging I can’t help. We did a standard installation and configuration with php-fpm on CentOS like it’s written in the docs from icingaweb2.

That might be the culprit, you may have hit a bug. Any specific reason not to use latest stable, v1.6.2 at the time of writing? Or, does it work with that version?

Cheers,
Michael

I’ve used the git clone command to get the most recent version, IMHO it uses the master branch as default.
Icingaweb2 shows no specific version number in the modules view, only “master”.

How do I get version 1.6.2 from GitHub?
Is it branch “support/1.6”?

Cheers,
Manfred

Hmmm better go with the release tarballs, but anyways - releases are tagged in Git, v1.6.2 for example. You can use git checkout <tagname> to checkout a specific tag.

Cheers,
Michael

Switched to version 1.6.2 from tar ball, mySQL reports schema version 163:

ERROR: LogicException in /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php:655 with message: Trying to set invalid icinga_command key “is_string”. DB schema change?

Switched back to master branch with DB schema 163.

After some DB investigations I found out that sombody (myself!?) globally disabled jobs in settings table :woozy_face:

Problem solved, Drageekeksi have to change owner…

2 Likes

Hi Manfred,

Can you please help me to resolve this issue ?
I cannot understand how you resolve it.

Trying to set invalid icinga_command key “is_string”. DB schema change? (DbObject.php:655)

Hi Milos,

this error message raised because I started with the latest Director version/branch from GitHub instead of official released version 1.6.2. This branch includes a newer DB schema with additional fields which are added automatically by DB migration scripts. Release 1.6.2 was not able to handle the newer DB schema, so I had to switch back to newer Director version.

There was no bug, I’ve just disabled the execution of jobs globally by setting a parameter to “no” in Director’s Settings menu.

Cheers,
Manfred

2 Likes

Hi Manfred,

Thanks you very much for detailed explanation.

Best regards,
Miloš