#17744: aiccu doesn't start on boot due to DNS and time issues
-----------------------+------------------------
Reporter: lorenzo@… | Owner: developers
Type: defect | Status: new
Priority: normal | Milestone:
Component: packages | Version: Trunk
Keywords: |
-----------------------+------------------------
I'm using aiccu to set up an IPv6-in-IPv4 tunnel on barrier breaker
14.07-rc3. Unfortunately it doesn't work when the box boots, for the two
reasons below.
The fact that it doesn't start on boot is particularly bad due to sixxs',
let's say, aggressive stance in banning clients that auto-reconnect, which
means that aiccu.sh never retries.
Reason 1 is because aiccu.sh is started as soon as the WAN interface comes
up, but in order for aiccu to start it needs to do a DNS lookup for
tic.sixxs.net, and the DNS servers aren't configured yet. (DHCP has
returned them, but dnsmasq hasn't been reconfigured yet).
Tue Sep 2 14:29:06 2014 daemon.notice netifd: wan (1264): Lease of
100.96.57.160 obtained, lease time 14400
Tue Sep 2 14:29:06 2014 daemon.notice netifd: Interface 'wan6' is setting
up now
Tue Sep 2 14:29:07 2014 daemon.info named[955]: error (unexpected RCODE
REFUSED) resolving 'tic.sixxs.net/A/IN': 127.0.0.1#1053
Tue Sep 2 14:29:07 2014 local7.err syslog: Couldn't resolve host
tic.sixxs.net, service 3874
Tue Sep 2 14:29:07 2014 local7.err syslog: Couldn't connect to the TIC
server tic.sixxs.net
Tue Sep 2 14:29:07 2014 local7.err syslog: Couldn't retrieve first tunnel
for the above reason, aborting
This is with dnsmasq, or local named forwarding to local dnsmasq on a
different port.
===
Reason 2 is that the first time the box boots its time is not synced, and
sixxs doesn't like that:
Tue Sep 2 15:03:22 2014 local7.debug syslog: sock_getline() : "200 SixXS
TIC Service on nlhaa01.sixxs.net ready (http://www.sixxs.net)"
Tue Sep 2 15:03:22 2014 local7.debug syslog: sock_printf() : "client
TIC/draft-00 AICCU/2007.01.15-console-linux Linux/3.10.49"
Tue Sep 2 15:03:22 2014 local7.debug syslog: sock_getline() : "200 Client
Identity accepted"
Tue Sep 2 15:03:22 2014 local7.debug syslog: sock_printf() : "get
unixtime"
Tue Sep 2 15:03:22 2014 local7.debug syslog: sock_getline() : "200
1409695531"
Tue Sep 2 15:03:22 2014 local7.err syslog: The clock is off by 129
seconds, use NTP to sync it!
Tue Sep 2 15:03:22 2014 local7.debug syslog: sock_printf() : "QUIT
Aborting: Clock is off by 129 seconds
"
A solution to both of these is to put a sleep into aiccu.sh, but that's
pretty hacky. A better solution would be to add a "interface completely
configured" dependency that would include DNS as well, and a "NTP synced"
dependency.
Here's what I have in /etc/config/network:
config interface 'wan6'
option ifname '@wan'
option _orig_ifname '@wan'
option _orig_bridge 'false'
option proto 'aiccu'
option username '***'
option password '***'
option verbose 'true'
option defaultroute 'true'
option ip6prefix '***'
option autostart 'true'
--
Ticket URL: <https://dev.openwrt.org/ticket/17744>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets