13

I am receiving the message "Start job is running for wait for netowrk to be configured" during bootup. Computer hangs for 2 minutes until whatever is going on times out. Network connection appears to be there since there appears to be a successful synchronization to time ntp.ubuntu.com just prior to the hang.

This is within VirtualBox, after setting Adapter 1 to NAT, Adapter 2 to Host-Only Adapter, and setting /etc/netplan/50-cloud-init.yaml as follows:

network:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
        enp0s8:
            dhcp4: true
    version: 2

(I'm new to netplan; admittedly I'm poking in the dark here).

Reviewing syslog after bootup, here is what I see:

Nov  6 22:55:47 magnolia systemd-networkd[539]: enp0s3: Gained IPv6LL
Nov  6 22:55:47 magnolia systemd-networkd[539]: enp0s3: Configured
Nov  6 22:55:47 magnolia systemd-networkd-wait-online[546]: ignoring: lo
Nov  6 22:55:47 magnolia systemd-networkd-wait-online[546]: managing: enp0s3
Nov  6 22:55:47 magnolia systemd-timesyncd[423]: Network configuration changed, trying to establish connection.
Nov  6 22:55:47 magnolia systemd-networkd[539]: enp0s8: Gained IPv6LL
Nov  6 22:55:47 magnolia systemd-timesyncd[423]: Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com).
Nov  6 22:55:47 magnolia systemd-networkd-wait-online[546]: Event loop failed: Connection timed out
Nov  6 22:55:47 magnolia systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Nov  6 22:55:47 magnolia systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Nov  6 22:55:47 magnolia systemd[1]: Failed to start Wait for Network to be Configured.
Nov  6 22:55:47 magnolia systemd[1]: Starting Initial cloud-init job (metadata service crawler)...
Nov  6 22:55:47 magnolia cloud-init[587]: Cloud-init v. 18.4-0ubuntu1~18.04.1 running 'init' at Tue, 06 Nov 2018 22:55:46 +0000. Up 128.51 seconds.
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: | Device |  Up  |           Address           |      Mask     | Scope  |     Hw-Address    |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: | enp0s3 | True |          10.0.2.15          | 255.255.255.0 | global | 08:00:27:c9:60:26 |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: | enp0s3 | True | fe80::a00:27ff:fec9:6026/64 |       .       |  link  | 08:00:27:c9:60:26 |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: | enp0s8 | True |        192.168.56.105       | 255.255.255.0 | global | 08:00:27:41:62:12 |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: | enp0s8 | True | fe80::a00:27ff:fe41:6212/64 |       .       |  link  | 08:00:27:41:62:12 |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: |   lo   | True |          127.0.0.1          |   255.0.0.0   |  host  |         .         |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: |   lo   | True |           ::1/128           |       .       |  host  |         .         |
Nov  6 22:55:47 magnolia cloud-init[587]: ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+

I find it curious the timestamp doesn't reflect the 2 minute wait, but perhaps that's another question.

I found this other answer for Ubuntu 17, appears to be related: A start job is running for wait for network to be configured. Ubuntu server 17.10

and tried disabling systemd-networkd-wait-online.service as indicated but that does not appear to work (still get the 2 minute wait).

Any ideas what's going on here, and how to fix it?

yahermann
  • 233

2 Answers2

24

Notes:

  • Undo your previous fixes. Return them to the original state.

  • You may be having a problem obtaining IPv4 addresses.

  • In setting up your VM, you set "Adapter 1 to NAT, Adapter 2 to Host-Only", and I'm not sure that's 100% correct... However, if you're getting the correct IP addresses then it's probably OK.


Try this in your /etc/netplan/50-cloud-init.yaml...

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: true
      optional: true
    enp0s8:
      dhcp4: true
      optional: true

In the terminal, run the following...

  • sudo netplan generate

  • sudo netplan apply

  • reboot

heynnema
  • 73,649
0

I had this issue when cloning a VM. The clone had the same MAC address as the original. Because I was running the clone at the same time as the original, there was a MAC address conflict at layer 2. I resolved the issue by going into the VM settings, network, advanced (virtual box) and changing the last character of the VM mac address to make it unique. For those not familiar with MAC addresses, the valid characters for a MAC are 0-9 a,b,c,d,e,f.