OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: Fatmouse69 on October 16, 2018, 01:55:41 pm

Title: [SOLVED] ntpd can't allocate memory
Post by: Fatmouse69 on October 16, 2018, 01:55:41 pm
Hi,

I set up a new OPNsense 18.7. Upgraded to 18.7.4 successfully and wanted to test out 2FA with a TOTP server as documented here: https://docs.opnsense.org/manual/how-tos/two_factor.html.

Unfortunately this does not work as expected. As the TOTP highly depends on time sync I checked NTP and it seems that there are some problems regarding this service. I get the following log messages while analyzing the log of ntpd:

ntpd[27311]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
ntpd[27311]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
ntpd[27311]: mlockall(): Cannot allocate memory


Can this be the cause of a nonfunctional TOTP server? How can I solve this?

Thank you very much for you help.

UPDATE:
Yesterday, I totally ignored the fact, that I had selected a token length of 8 and my OTP-Generator (FreeOTP app) is only capable of generating tokens with a length of 6 digits (douh!). After changing this to 6 digits, the 2FA functionality works. Nevertheless, does the inability of allocating memory mean any problems?
Title: Re: ntpd can't allocate memory
Post by: franco on October 17, 2018, 05:06:35 pm
I think this mlockall() error is normal in HardenedBSD due to memory access restrictions / exploit mitigation. No operational problems though. :)


Cheers,
Franco
Title: Re: ntpd can't allocate memory
Post by: Fatmouse69 on October 18, 2018, 07:13:26 am
Hey Franco,
thanks for taking the time to explain the reason behind those messages.  :)
Best regards, David