Cannot deploy changes with Icinga2 Director API, Can deploy using config files on server

Hello everybody. I have followed tutorials to install Icinga 2 on my environment and I have succeed. However the Icinga director does not work for me. I am new using Icinga so any help will be well received. What I have found is that if I put the configurations manually on configurations files, Icinga takes them and adds the new server/monitoring etc. But If I try to deploy using director I got an error:

API request failed: Stage creation failed. (RestApiResponse.php:96)

I have 12 pending changes according to Icinga Director. None of them can be deployed. Maybe it is a permission matter but I have not been able to find documentation for this.

Thanks in advance.


please share more insights how you’ve setup the components and their components. E.g. which ApiUser object did you create and which permissions are assigned?


Hello, thansk for your response

My configuration:
I have created an Api user “icingaweb2” with its respective credentials and all permissions in /etc/icinga2/conf.d/api-users.conf. I have tested it using curl command:

curl -k -s -u icingaweb2:1c1NG4.2019# 'https://localhost:5665/v1' <html><head><title>Icinga 2</title></head><h1>Hello from Icinga 2 (Version: 2.11.0-1)!</h1><p>You are authenticated as <b>icingaweb2</b>. Your user has the following permissions:</p> <ul><li>*</li></ul><p>More information about API requests is available in the <a href="" target="_blank">documentation</a>.</p></html>

This is the same user configured in icingaweb

which is validated.

In addition I have found in the log /var/log/icinga2/icinga2.log this records when I launch the director to deploy the changes

[2019-10-28 10:54:04 -0500] critical/ThreadPool: Exception thrown in event handler:
Error: getrandom

        (0) icinga2: icinga::Downtime::AddDowntime(boost::intrusive_ptr<icinga::Checkable> const&, icinga::String const&, icinga::String const&, double, double, bool, icinga::String const&, double, icinga::String const&, icinga::String const&, icinga::String const&, boost::intrusive_ptr<icinga::MessageOrigin> const&) (+0x84) [0x9c57b4]
        (1) icinga2: icinga::ScheduledDowntime::CreateNextDowntime() (+0x497) [0xa649f7]
        (2) icinga2: icinga::ScheduledDowntime::TimerProc() (+0x223) [0xa65583]
        (3) /usr/lib64/icinga2/sbin/icinga2() [0x7869dc]
        (4) icinga2: icinga::Timer::Call() (+0x28) [0xb6ede8]
        (5) /usr/lib64/icinga2/sbin/icinga2() [0x90da93]
        (6) icinga2: boost::asio::detail::executor_op<boost::asio::detail::work_dispatcher<bool icinga::ThreadPool::Post<std::function<void ()> >(std::function<void ()>, icinga::SchedulerPolicy)::{lambda()#1}>, std::allocator<void>, boost::asio::detail::scheduler_operation>::do_complete(void*, std::allocator<void>*, boost::system::error_code const&, unsigned long) (+0x106) [0xc06326]
        (7) /usr/lib64/icinga2/sbin/icinga2() [0x637c51]
        (8) /usr/lib64/icinga2/sbin/icinga2() [0x637fa2]
        (9) icinga2: boost_asio_detail_posix_thread_function (+0xf) [0x82e3ef]
        (10) <unknown function> (+0x7dc5) [0x7f1684513dc5]
        (11) clone (+0x6d) [0x7f1684240ced]

Hello, In additión I have figured out that I cannot create a new ca using icinga2 pki new-ca with the same error: get random.
So I think my issue is related with because my kernel is 3.10.0-327.36.3.el7.x86_64. Is there any solution to this?

Except from upgrading the host system, I’m afraid not.

Thanks for your prompt response. I will try the kernel update.