OPNsense Forum

Archive => 16.1 Legacy Series => Topic started by: Alphabet Soup on April 21, 2016, 03:22:17 pm

Title: apinger & PPPoE issue
Post by: Alphabet Soup on April 21, 2016, 03:22:17 pm
My opnsense 16.1 router has exhibited two problems in recent weeks, neither of which appeared during several months of use with 15.7.  Both seem related to the fact that my internet links are via PPPoE.

The apinger problem is mostly an annoyance, and I have a work-around:

After booting up, the apinger service has failed to start, and my gateway statuses only show "Pending..." forever.  Looking at the gateways.log shows e.g.
Apr 18 08:51:55 OPNsense apinger: Starting Alarm Pinger, apinger(6114)
Apr 18 08:51:55 OPNsense apinger: No usable targets found, exiting


I'm guessing the PPPoE connections haven't been made yet, so apinger figures there's nothing to do.  By the time I log into the web gui moments later, however, the PPPoE connections have come up, the IP addresses are shown in the Dashboard etc, and traffic is flowing nicely.  But apinger never seems to try again, I've tried waiting for hours.  My workaround is to log into the web gui and hit the Start Service button on the Gateways page.  Is there something I can do to fix this?  Either have apinger not bail out so fast, or retry again periodically, or something?
Title: Re: apinger & PPPoE issue
Post by: franco on April 21, 2016, 10:12:42 pm
Hi there,

I talked about fixing apinger for a while, never knowing which way to go. Long story short, here's a fix for your issue:

https://github.com/opnsense/apinger/commit/034691e793edfca9f9422b785f9bc14fdd7991dd

I will post a test package in a few minutes for amd64. If you use i386 instead, let me know.


Cheers,
Franco
Title: Re: apinger & PPPoE issue
Post by: franco on April 21, 2016, 10:38:21 pm
Here's the command from the console:

# pkg add -f https://pkg.opnsense.org/snapshots/apinger-0.6.1_6.txz

It should not die on boot, recover after a minute (to avoid spamming).
Title: Re: apinger & PPPoE issue
Post by: Alphabet Soup on April 22, 2016, 02:35:23 am
Thanks for the fix.  I've applied it and will let you know after next reboot.
Title: Re: apinger & PPPoE issue
Post by: franco on April 22, 2016, 08:37:35 am
If you can please use the following version. I found a second spot that should not be triggered on but but better safe than sorry. :)

# https://pkg.opnsense.org/snapshots/apinger-0.6.1_7.txz
Title: Re: apinger & PPPoE issue
Post by: Alphabet Soup on April 22, 2016, 04:12:31 pm
I have rebooted.  No improvement, although the service status shows apinger is running.  The gateways.log now shows:

Apr 22 22:25:24 OPNsense apinger: Starting Alarm Pinger, apinger(5361)
Apr 22 22:25:24 OPNsense apinger: No usable targets found, sleeping...
Apr 22 22:25:25 OPNsense apinger: No usable targets found, sleeping...
Apr 22 22:26:23 OPNsense apinger: No usable targets found, sleeping...


I tried clicking on the Stop Service and Restart Service buttons for apinger but they didn't seem to respond and the log kept on growing as above.  From the console I tried a '/usr/local/etc/rc.d/apinger stop' and it sat at 'Waiting for PIDS:' longer than my patience, so I just 'kill -KILL'ed the PID.  The status now showed Stopped, and clicking the Start Service button worked.  Then apinger was working properly and my gateway status updating properly.

For what it's worth this happened with both the _6 and _7 packages.
Title: Re: apinger & PPPoE issue
Post by: franco on April 22, 2016, 06:02:06 pm
This is interesting. This means apinger will never recover from the condition, but I really think it should. I will have to dig deeper into this and add deliver a new version on Monday.

# pkg install -fy apinger

Brings you back to the latest release version if you want (although except for the hang it's the same).