Bug#783407: aiccu: fails to start at boot-up due to unresolvable server

Cyril Brulebois kibi at debian.org
Sun Apr 26 20:13:04 BST 2015


Package: aiccu
Version: 20070115-15.2
Severity: serious
Tags: patch
Justification: daemon not starting

(X-d-cc: pkg-systemd-maintainers at lists.alioth.debian.org)

Hi,

on a jessie system (upgraded from wheezy), aiccu fails to start at
boot-up. systemd reports:
| root at glenfiddich:~# systemctl status aiccu
| ● aiccu.service - LSB: SixXS Automatic IPv6 Connectivity Client Utility
|    Loaded: loaded (/etc/init.d/aiccu)
|    Active: active (exited) since dim. 2015-04-26 17:34:18 CEST; 2h 42min ago
|   Process: 535 ExecStart=/etc/init.d/aiccu start (code=exited, status=0/SUCCESS)
| 
| avril 26 17:34:18 glenfiddich.mraw.org aiccu[593]: Couldn't resolve host tic.sixxs.net, service 3874
| avril 26 17:34:18 glenfiddich.mraw.org aiccu[593]: Couldn't connect to the TIC server tic.sixxs.net
| avril 26 17:34:18 glenfiddich.mraw.org aiccu[593]: Couldn't retrieve first tunnel for the above reason, aborting

As can be seen in LSB headers, it depends on $network; which translates
(according to systemd-analyze dump) into dependencies on:
 - nss-lookup.target
 - network-online.target

According to Marco on IRC those don't do much if at all on Debian, so
I've added the following workaround, and tested a reboot successfully
(needed a single sleep of 1 second on this particular server). That
belongs to do_start, before the s-s-d calls:


        # FIXME: Added by KiBi
        server=$(awk '/^server/ {print $2}' /etc/aiccu.conf)
        if [ -z "$server" ]; then
                log_failure_msg "AICCU has no configured server"
                exit 1;
        fi
        for i in $(seq 1 10); do
                if nslookup $server >/dev/null 2>&1; then
                        # success!
                        break
                else
                        if [ $i = 10 ]; then
                                log_failure_msg "AICCU couldn't resolve $server after $i tries, giving up"
                                exit 1
                        else
                                log_warning_msg "AICCU wouldn't resolve $server, waiting $i seconds"
                                sleep $i
                        fi
                fi
        done


I haven't butchered my server enough to simulate a permanent resolution
failure, but the exit 1 call should be straightforward enough to peer
review. ;)

Thanks for considering.

Mraw,
KiBi.



More information about the Pkg-systemd-maintainers mailing list