6+ minute apt-daily.service boot delay

NoOp glgxg at sbcglobal.net
Tue Nov 15 02:12:55 UTC 2016


On 11/14/2016 2:03 PM, Tom H wrote:
> On Mon, Nov 14, 2016 at 9:12 PM, NoOp <glgxg at sbcglobal.net> wrote:
>> On 11/14/2016 7:36 AM, Oliver Grawert wrote:
>>> On So, 2016-11-13 at 18:11 -0800, NoOp wrote:
>>>> On 11/13/2016 03:51 PM, Karl Auer wrote:
>>>>> On Sun, 2016-11-13 at 14:42 -0800, NoOp wrote:
>>>>>>
>>>>>> Ubuntu 16.04 running as a Virtualbox Version 5.1.8 r111374
>>>>>> (Qt5.5.1)
>>>>>> guest - booted today after recent update & the boot took over 7
>>>>>> minutes.
>>>>>
>>>>> That sort of delay is almost always either a failing hard disk or a
>>>>> network issue.
>>>>
>>>> Reboot after purging: bind9, miredo, clamav
>>>
>>> smells like
>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739363
>>>
>>> (which slows down DNS resolution on boot ... as karl mentioned above,
>>> looks like a network issue, not like the fault of apt)
>>
>> That smells right... looking at syslogs with miredo installed I was seeing:
>> miredo-checkconf[1329]: Invalid host name “teredo-debian.remlab.net” at
>> line 6: Name or service not known
>> miredo-checkconf[1329]: Server address not specified
>> miredo-checkconf[1329]: Fatal configuration error
>> systemd[1]: miredo.service: Control process exited, code=exited status=255
>> systemd[1]: Failed to start Teredo IPv6 tunneling.
>> systemd[1]: miredo.service: Unit entered failed state.
>> systemd[1]: miredo.service: Failed with result 'exit-code'.
>>
>> I'll reinstall later today & check the result then.
> 
> I assume that you mean re-install miredo!
> 
> Both the Debian bug above and the following one
> 
> https://bugs.launchpad.net/ubuntu/+source/miredo/+bug/1482069
> 
> advise to add:
> 
> After=network-online.target
> Wants=network-online.target
> 
> to "miredo.service" (preferably as a drop-in in
> "/etc/systemd/system/miredo.service.d/").
> 
> It's due to the problem that systemd exposes the fact that depending
> on "network.target" - corresponding to the "$network" LSB target -
> isn't enough for certain services, including, apparently, mired.
> 

Thanks Tom - works:
$ /etc/init.d/miredo status
● miredo.service - Teredo IPv6 tunneling
   Loaded: loaded (/lib/systemd/system/miredo.service; enabled; vendor
preset: enabled)
   Active: active (running) since Mon 2016-11-14 18:01:59 PST; 2min 46s ago
  Process: 2112 ExecStartPre=/usr/sbin/miredo-checkconf -f
/etc/miredo/miredo.conf (code=exited, status=0/SUCCESS)
 Main PID: 2194 (miredo)
   CGroup: /system.slice/miredo.service
           ├─2194 /usr/sbin/miredo -f
           ├─2200 /usr/sbin/miredo -f
           └─2202 /usr/lib/x86_64-linux-gnu/miredo/miredo-privproc 3

Nov 14 18:01:58 gg systemd[1]: Starting Teredo IPv6 tunneling...
Nov 14 18:01:59 gg systemd[1]: Started Teredo IPv6 tunneling.
Nov 14 18:02:00 gg miredo[2194]: miredo[2194]: Starting...
Nov 14 18:02:00 gg miredo[2194]: Starting...
Nov 14 18:02:01 gg miredo[2194]: miredo[2200]: New Teredo address/MTU
Nov 14 18:02:01 gg miredo[2194]: miredo[2200]: Teredo pseudo-tunnel started
Nov 14 18:02:01 gg miredo[2194]: miredo[2200]:  (address:
2001:0:53aa:64c:1...0)
Nov 14 18:02:01 gg miredo[2200]: New Teredo address/MTU
Nov 14 18:02:01 gg miredo[2200]: Teredo pseudo-tunnel started
Nov 14 18:02:01 gg miredo[2200]:  (address:
2001:0:53aa:64c:1c57:6118:e7f9:...0)


$ cat /lib/systemd/system/miredo.service
[Unit]
Description=Teredo IPv6 tunneling
After=network-online.target
Wants=network-online.target

[Service]
ExecStartPre=/usr/sbin/miredo-checkconf -f /etc/miredo/miredo.conf
ExecStart=/usr/sbin/miredo -f
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target


Now I still have to figure out how to trigger apt-daily.service at will
on boot to test.





More information about the ubuntu-users mailing list