OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: amichel on February 01, 2019, 12:51:59 am

Title: [Solved]: Ntpd stops every 10 minutes
Post by: amichel on February 01, 2019, 12:51:59 am
Hi,
So I am on V 19.1 on my Apu2c4 and all is fine, besides the fact that the ntp service stops after 10 minutes with an error stating that it nannot allocate memory.
So at the moment monit is configured to start the service but still that is an issue that appeared after the upgrade and worked before.
Is that a known issue?


Gesendet von meinem EML-L29 mit Tapatalk

Title: Re: Ntpd stops every 10 minutes
Post by: amichel on February 01, 2019, 09:03:03 am
So I looked at the general logs and it seems that this is triggerd by the renewal of the WAN IP Adress which is done approximately every 2 minutes:
Quote
Feb 1 08:53:33    kernel: ovpns2: link state changed to DOWN
Feb 1 08:53:32    opnsense: /usr/local/etc/rc.newwanip: Resyncing OpenVPN instances for interface WAN.
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: ROUTING: skipping IPv6 default route
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: ROUTING: keeping current default gateway 'xx.xx.xx.1'
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: ROUTING: setting IPv4 default route to xx.xx.xx.1
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: ROUTING: no IPv6 default gateway set, assuming wan
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: ROUTING: no IPv4 default gateway set, assuming wan
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: ROUTING: entering configure using 'wan'
Feb 1 08:53:24    opnsense: /usr/local/etc/rc.newwanip: On (IP address: xx.xx.xx.16) (interface: WAN[wan]) (real interface: igb2).

Has this been changed in 19.1. to renew that often ? do have a dynamic IP from my ISP but that usually has a lease time of two weeks.
Title: Re: IDENTIFIED: Ntpd stops every 10 minutes
Post by: amichel on February 01, 2019, 02:20:09 pm
So at the moment it looks the reason is that my WAN is running /usr/local/etc/rc.newwanip every two minutes.
So far nothing worked to change the behaviour here, even setting supersede dhcp-lease-time 600 in the options override did not work.
How can this be corrected? Any hint is appreiciated.
amichel
Title: Re: IDENTIFIED: Ntpd stops every 10 minutes
Post by: weust on February 01, 2019, 03:07:12 pm
The DHCP lease for WAN, in your case, would be set by the ISP I would think.
Can you check the lease information for WAN? It should mention the lease expiration time.
Title: Re: IDENTIFIED: Ntpd stops every 10 minutes
Post by: amichel on February 01, 2019, 03:39:30 pm
The DHCP lease for WAN, in your case, would be set by the ISP I would think.
Can you check the lease information for WAN? It should mention the lease expiration time.
Thank you- that was finally indeed the explanation. Turned out that the ISP changed the Lease Time from 24 hours to five minutes this night. and as I upgraded at almost the same time this coincidence was the effect.
Looking at the dhclient.leases.igb2 file I see the lease time set to 5 minutes.
amichel
Title: Re: [Solved]: Ntpd stops every 10 minutes
Post by: weust on February 01, 2019, 03:41:01 pm
I could imagine the ISP doing some kind of upgrade where they want all clients to get a new IP address ASAP for a short while.
Keep it in check, it shouldn't last more then a week I'd think. Maybe contact them just to be sure?
Title: Re: [Solved]: Ntpd stops every 10 minutes
Post by: amichel on February 01, 2019, 07:19:57 pm
I already did contact the isp and I also thought about that they do some maintainance. It might take up to 3 weeks for them to answer but I'll update this post once I have the answer.

Gesendet von meinem EML-L29 mit Tapatalk

Title: Re: [Solved]: Ntpd stops every 10 minutes
Post by: amichel on February 01, 2019, 08:03:54 pm
I checked with a different setup.
I am using a 3G/LTE connection with a Dovado Router in Bridge Mode. So in this configuration the Opnsense WAN port gets the IP Adress with a lease time of 5 Minutes.
When configuring the Dovado in NAT mode The Dovado gets the IPadress with a lease time of 6 days from the ISP and the Opnsense device gets the lease from the Dovado's DHCP with the configured lease timeof 12 hours.
Doublechecking with a laptop attached to the Dovado in bridge mode turned out that in bridge mode the lease time is always set to 5 mins. So it is caused by the Dovado device and not Opnsense.

amichel