OPNsense Forum

Archive => 16.1 Legacy Series => Topic started by: interfaSys on May 11, 2016, 01:47:06 pm

Title: apinger completely unreliable on 16.1.13
Post by: interfaSys on May 11, 2016, 01:47:06 pm
I have a gateway group with 3 tiers.
Traffic fails to switch to tier2 when tier1 is down.

I get lots of these errors in the logs:

Code: [Select]
May 11 13:28:22 apinger: Error while starting command form alarm(down) on target(8.8.4.4-VPN_TCP_VPNV4)
May 11 13:28:12 apinger: ALARM: VPN_TCP_VPNV4(8.8.4.4) *** down ***

which seem to indicate that the tier switch action fails to be triggered

And also these

Code: [Select]
apinger: command (al/opnsense/service/configd_ctl.py -m 'dyndns reload VPN_TCP_VPNV4' 'ipsecdns reload' 'openvpn reload VPN_TCP_VPNV4' 'filter reload' ) exited with status: 127
But that could be because it's trying to reload ipsec when ipsec has not even been setup.
Title: Re: apinger completely unreliable on 16.1.13
Post by: AdSchellevis on May 11, 2016, 02:47:49 pm
can you try the version from 16.1.12 to confirm that your issue started with the apinger version in 16.1.13?

Code: [Select]
pkg add -f https://pkg.opnsense.org/FreeBSD:10:amd64/16.1.12/OpenSSL/All/apinger-0.6.1_8.txz
(and restart the service)

Maybe Franco has some other things to inspect later on, but this one should be easy to test.
Title: Re: apinger completely unreliable on 16.1.13
Post by: interfaSys on May 11, 2016, 02:56:01 pm
Good idea, thanks. I've switched and will monitor the situation.
Title: Re: apinger completely unreliable on 16.1.13
Post by: interfaSys on May 11, 2016, 04:39:38 pm
I can confirm that things behave better with that previous version.

Code: [Select]
May 11 15:03:15 opnsense: /usr/local/etc/rc.filter_configure_sync: Could not find IPv6 gateway for interface(wan).
May 11 15:03:14 opnsense: /usr/local/etc/rc.filter_configure_sync: MONITOR: VPN_TCP_VPNV4 is down, removing from routing group VPN
Title: Re: apinger completely unreliable on 16.1.13
Post by: interfaSys on May 11, 2016, 10:54:28 pm
Actually, that wasn't it. The exact same error came back later on when the gateway went down. Tier switching doesn't seem to work.
Title: Re: apinger completely unreliable on 16.1.13
Post by: franco on May 17, 2016, 10:06:54 am
Sorry I was on holiday... I don't believe this has anything to do with my rework so far, it looks like a memory corruption, the log line should yield a full command, but the command is mangled:

command (al/opnsense/service/configd_ctl.py -m 'dyndns reload VPN_TCP_VPNV4' 'ipsecdns reload' 'openvpn reload VPN_TCP_VPNV4' 'filter reload' )

The code responsible hasn't been touched...

https://github.com/opnsense/apinger/blob/master/src/apinger.c#L194

I will take a look at this later.