Script failing after 24 hours

30 views
Skip to first unread message

Christopher Green

unread,
Jul 23, 2024, 4:18:34 PM7/23/24
to exabgp-users
Hi all,
   New to exabgp. Have it setup and working for about 24hours, then the DNS testing script seems to fail without stopping. This has happened on multiple servers and in my GNS lab setup so it must be something with the code.

exabgp.conf
process announce-routes {
  run /etc/exabgp/dns-check.sh;
  encoder text;
}

dns-check script:
#!/usr/bin/bash

while true; do
    if /usr/bin/dig eff.org @"Peer" > /var/log/exabgp.log;
    then
          echo "announce route "route" next-hop self"
  printf "\n" >> /var/log/exabgp.log
  printf "$(date +%Y-%m-%d_%H-%M-%S)" >> /var/log/exabgp.log
  printf "\n" >> /var/log/exabgp.log
    else
          echo "withdraw route "route" next-hop self"
  printf "$(date +%Y-%m-%d_%H-%M-%S)" >> /var/log/exabgp.log
    fi
    sleep 10;
done


After the script appears to be failed, not announcing the route any longer to the peer, I look at the processes and everything except the sleep command is running still.

BEFORE: working fine.
$ ps -ef |grep exa
exabgp    480882       1  0 Jul21 ?        00:01:11 /usr/bin/python3 /usr/sbin/exabgp -d /etc/exabgp/exabgp.conf
exabgp    480884  480882  0 Jul21 ?        00:00:01 /usr/bin/bash /etc/exabgp/dns-check.sh
exabgp    480885  480882  0 Jul21 ?        00:00:00 /usr/bin/python3 /usr/sbin/exabgp
exabgp    509120  480884  0 09:52 ?        00:00:00 sleep 10

AFTER 24hrs:
$ ps -ef |grep exa
exabgp    480882       1  0 Jul21 ?        00:02:15 /usr/bin/python3 /usr/sbin/exabgp -d /etc/exabgp/exabgp.conf
exabgp    480884  480882  0 Jul21 ?        00:00:03 /usr/bin/bash /etc/exabgp/dns-check.sh
exabgp    480885  480882  0 Jul21 ?        00:00:01 /usr/bin/python3 /usr/sbin/exabgp

I have full debug noted "-d" in the systemd service init, but am not sure where the logging of it is going.

Exabgp appears to not be the problem but the script sleep command. I believe that I can use a "monit" like watchdog but would like this work correctly without planning on it failing.

Any help would be appreciated.


Thomas Mangin

unread,
Jul 26, 2024, 5:12:10 PM7/26/24
to exabgp-users
The reason is the #1 issue people have due to how v3 and v4 differ.

Sorry for the short answer I am responding from my phone .

Thomas

Thomas Mangin

unread,
Jul 30, 2024, 8:46:48 AM7/30/24
to exabgp...@googlegroups.com

Hi Christopher,

The answer is probably https://github.com/Exa-Networks/exabgp/wiki/Migration-from-3.4-to-4.x#api

Good luck. Let me know if it was not.

Thomas

--
You received this message because you are subscribed to the Google Groups "exabgp-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exabgp-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/exabgp-users/47c0c2d2-badc-4661-addb-1c71386431fdn%40googlegroups.com.

Christopher Green

unread,
Jul 30, 2024, 8:46:54 AM7/30/24
to exabgp...@googlegroups.com
Hi Thomas, 
Thanks for responding. I have moved on to FRR and it seems to be working without issue. I really like your program, but have to get our Anycast DNS servers up and running. 
All the best.

Chris


--
You received this message because you are subscribed to the Google Groups "exabgp-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exabgp-users...@googlegroups.com.

Thomas Mangin

unread,
Jul 30, 2024, 10:03:46 AM7/30/24
to exabgp...@googlegroups.com
No worries. This was a bad choice with backward compatibility. It bites people way too much but I can not think of a way to detect if they consume the data or not and to stop sending on the pipe back, so we are stuck with it.

Thomas

Reply all
Reply to author
Forward
0 new messages