Bird4 not starting after reboot

Hi,

I have noticed that this behaviour changed. A few months ago we’ve implemented dynamic routing with bird4 and this problem didn’t exist, I was able to start/stop processes correctly.
Right now, after one of last updates, we have broken init script for bird4 - which in end effect also causes service to be not started after reboot:
# BIRD not running:
root@turris-bnd:~# ps ax | grep bird
12789 pts/0 S+ 0:00 grep bird

# Starting with init script fails silently:
root@turris-bnd:~# /etc/init.d/bird4 start
root@turris-bnd:~# ps ax | grep bird
12803 pts/0    S+     0:00 grep bird

# Starting process manually works fine
root@turris-bnd:~# bird4 -c /etc/bird4.conf
root@turris-bnd:~# ps ax | grep bird
12816 ?        Ss     0:00 bird4 -c /etc/bird4.conf
12818 pts/0    S+     0:00 grep bird

What should I do in order to restore functionality of the init script?

Best,
Marek Obuchowicz - KoreKontrol.eu

Hello,

Would you please share your Turris OS version and your model of the router?

Hardware: Turris Omnia 2 GB Wi-Fi
Turris OS: 3.11.10
Kernel: 4.4.196-a890a5a94ebb621f8f1720c24d12fef1-0
Package version: bird4 - 1.6.8-1

When I look on release notes, I see that bird was updated in version 3.11.8 (released on 14th October 2019) and while I can’t prove it right now, it seems like a time match - as far as I remember, it was in late October / early November when init script was broken.

Best,
Marek Obuchowicz - KoreKontrol.eu

Hello Marek,
how do you manage your bird setup? Do you use UCI for management?

Would you please share the result of
opkg list-installed | grep bird

Thank you.

Hi, I have installed and configured bird via CLI (opkg install and manually created /etc/bird4.conf).

# opkg list-installed | grep bird
bird4 - 1.6.8-1
bird4-uci - 0.2
birdc4 - 1.6.8-1
birdcl4 - 1.6.8-1
luci-app-bird4 - 0.2

Hi,
as you manage the bird4 by direct editing of /etc/bird4.conf, can you try to uninstall the bird4-uci and luci-app-bird4 packages?

The uninstallation should restore the original init script shipped with bird4 package.
Let me know the result.

Regards, Jan

Hello Jan,

I uninstalled those packages - and also tried uninstalling all packages and installing then just bird4+birdc4. Still same result, calling init script does not start the service. This made me think that something can be broken on my side. I figured out that I’ve started the service once as root and this created logfiles - starting with init script drops user to bird, who couldn’t write to the log file. Thanks for your suggestions, problems is solved.
I might suggest that we could maybe not “lose” the error message from bird4 (or any other service handled by rc.common) and display it when service fails to start:

# start-stop-daemon -S -p /var/run/bird4.pid -x /usr/sbin/bird4 -- -d -u bird -g bird -c /etc/bird4.conf -P /var/run/bird4.pid
bird: /etc/bird4.conf:1:5 Unable to open log file `/srv/bird4.log': Permission denied

but that’s another story i guess :slight_smile:

Best regards,
Marek

1 Like