BGP dies randomly, write error: Operation not permitted & No buffer space avail
-
Errors in the log:
Apr 21 05:43:29 bgpd[93927]: neighbor x.x.x.x (STORM): pfkey setup failed
Apr 21 05:43:29 bgpd[93927]: writev (8/104): No buffer space available
Apr 21 05:43:28 bgpd[93927]: writev (6/80): No buffer space available
Apr 21 05:42:58 bgpd[93927]: neighbor x.x.x.x (STORM): state change Established -> Idle, reason: Fatal error
Apr 21 05:42:58 bgpd[93927]: neighbor x.x.x.x (STORM): write error: Operation not permittedI'm running 2.2.4 and ipsec/bgpd on the same box (I was reading this is my issue when trying to update to 2.3.3)
This happened after 9 hours from last reboot. it used to happen all the time and then stopped happening for a while then came back after the last reboot. I end up losing my BGP default gateway in the middle of the night which breaks all my subnets.
Is there a way to restart the bgp service if it throws the error state change Established -> Idle as a stop-gap until I can determine the root cause?
I looked for these settings which supposedly fixed the VPN/BGPD issues in 2.3.3 but I couldnt find them.
net.inet.raw.maxdgram 131072
net.inet.raw.recvspace 1048576
net.raw.recvspace 1048576
net.raw.sendspace 1048576 -
I think I figured this one out!
My dang syslog was logging to a remote site over a tunnel, and the tunnel was flaky at random times so the syslogd was filling up the tcp buffer.
I'll report back if it's stable for multiple days.