jjethwa / icinga2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getentropy()

sztridaa opened this issue · comments

I am deploying the container on my Synology with the latest available software (DS1513+, on DSM 6.2.3-25426 Update 2, Docker 18.09.0-0513).
Configured for use of internal MySQL, config and log directories are mounted from host, necessry ports are published
After startup it polpulates the database, and some initial config then crashes:
`[2020-09-25 12:48:31 +0000] information/WorkQueue: #5 (IdoMysqlConnection, ido-mysql) items: 181, rate: 31.5333/s (1892/min 1892/5min 1892/15min); empty in less than 1 millisecond
[2020-09-25 12:48:32 +0000] information/IdoMysqlConnection: Finished reconnecting to 'ido-mysql' database 'icinga2idomysql' in 50.068 second(s).
[2020-09-25 12:48:41 +0000] information/WorkQueue: #5 (IdoMysqlConnection, ido-mysql) items: 41, rate: 34.5833/s (2075/min 2075/5min 2075/15min);
[2020-09-25 12:48:42 +0000] critical/ThreadPool: Exception thrown in event handler:
Error: getentropy

(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&) (+0xa5) [0x7f693f211625]
(1) icinga2: icinga::ScheduledDowntime::CreateNextDowntime() (+0x517) [0x7f693f1b4747]
(2) icinga2: icinga::ScheduledDowntime::TimerProc() (+0x248) [0x7f693f1b5048]
(3) icinga2: <unknown function> (+0x6cecf9) [0x7f693f3d1cf9]
(4) icinga2: icinga::Timer::Call() (+0x2d) [0x7f693f3f0afd]
(5) icinga2: <unknown function> (+0x6e516d) [0x7f693f3e816d]
(6) icinga2: boost::asio::detail::executor_op<boost::asio::detail::work_dispatcher<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) (+0xc5) [0x7f693f39dbd5]
(7) icinga2: <unknown function> (+0x74c84b) [0x7f693f44f84b]
(8) icinga2: <unknown function> (+0x696b25) [0x7f693f399b25]
(9) icinga2: boost_asio_detail_posix_thread_function (+0xf) [0x7f693f4475ef]
(10) libpthread.so.0: <unknown function> (+0x7fa3) [0x7f693ec37fa3]
(11) libc.so.6: clone (+0x3f) [0x7f693e20f4cf]`

Initially it had errors when generating its own CA cert, I had an attampt to generate it elsewhere and copied to the config, it colud go further but the messages above keep coming.

It might be due to the fact synology is late with updating to more recent docker version, or has special restrictions on authorisation system?

Can you please inspect if there is a way to make it work?

Thx,

Ákos

Hi @sztridaa

I haven't run into this error before and don't have a Synology device to test on, but tried to look it up. I think it might be due to the Linux distribution not supporting the getentropy function. It looks like this is provided at the kernel level. I'll see what else I can find out

Hello, just ran into this issue, too. This happens on a Synology DS916+.

icinga2-1.txt

@sztridaa or @danielbierstedt

Did this work in a previous Synology release?

This was my first try, so I can only speak for this particular combination of hardware and software.

Did a quick test on my laptop and it worked fine. Although, I did not try to configure an external database, as I did on synology (separate container). Will test that tomorrow, but I think it will work. I suspect it to be something with the CPU.

@sztridaa or @danielbierstedt

Did this work in a previous Synology release?

For me it was the 1st attampt to deploy too. According to some articles In another forum however it seems that it was workin:
https://community.icinga.com/t/icinga-on-synology-docker/5449

Ákos

Still looking into this as time permits. In the meantime, do you mind checking with the Synology folks on the availability of the entropy functions? I saw some older posts (2011) complaining about what was available, but those have to be updated by now I would imagine.

Sorry it took so long. I did not realize that the first attempts to create a ticket at Synology did not work.

Ticket: #2633780

Okay so, Synology supports answer:

Dear Customer,

Thank you for contacting Synology Technical Support.

The Function does no appear to exist on the NAS.

You can check whether it does exist on your DSM Version by issuing following Command via SSH:

find /lib/modules/ -type f -name '*.ko' | grep getentropy

Needless to say that it did not find anything. Extended the search over the whole box, but nothing. Gonna ask if we can install that libs.

Thanks, @danielbierstedt

If they can supply a compiled version of the lib, it would be great. It seems like all the functionality is already supplied by the standard Linux kernel, but that's where it starts to get a bit esoteric for me 😛

Yes that was my reply. Let's wait... But I have little hope.

Update from Synology Support:

Dear Customer,

Thank you for contacting Synology Technical Support.

I've submitted a Feature Request regarding this Library. Currently it is on our internal Wishlist.

We do not have any Information on when this may become available.

Installing Kernel Modules manually is not supported and will render DSM in an unsupported state. Therefore we are not able to provide any Instructions on how to install Kernel Modules or Functions.

Please let me know if you have any questions.

Best Regards,

Haseeb Sheikh
Technical Support Engineer

Thanks for the update, @danielbierstedt

That's promising! I'm wondering if it would also be worthwhile to request an alternative library call, if available, to the main Icinga2 project as well.

Whatever helps... But that would be up to you, since I don't know enough about it.
Whenever you got the time - I know that the group of people having this issue is small.

I run into the same issue on my Synology DS916ü. Is there a fix available?

Hi @steamfan

I'll let one of the other guys respond as the only suggestion I had was to get Synology to get the proper kernel modules working

This is the answer from synology support

`
Hi Daniel,

Thanks for providing valuable feedback regarding updating kernel version to support RNG functionality in the Docker package for DS916+.

Unfortunately, we don't plan to update kernel version for DS916+, but we will keep maintaining it.

Currently, DS920+ is based on kernel 4.10 which you may consider it in the future.
`

And:
`Thank you for contacting Synology Technical Support.

I've submitted a Feature Request regarding this Library. Currently it is on our internal Wishlist.

We do not have any Information on when this may become available.

Installing Kernel Modules manually is not supported and will render DSM in an unsupported state. Therefore we are not able to provide any Instructions on how to install Kernel Modules or Functions.

`

To my understanding this means that this Docker package will not run on the DS916+. Correct? Or is it possible to install getentropy library somehow?

Thanks for the update, @danielbierstedt

@steamfan it appears that it won't because of kernel version. I'm not sure about how you would be able to get the module added to your kernel and if you do try, please be careful so you don't brick your device.

I will definitely not change my kernel, this is far beyond my knowledge. So I don't see any issue here.

My further question is: is it possible to add 'something' to the Docker image so that this issue does not occur anymore?

@steamfan not that I know, any changes to use a different library would need to be done upstream, so the main Icinga2 project or one of the libs they consume