Skip to content

Commit 1fdd057

Browse files
committed
update troubleshooting
1 parent a39549b commit 1fdd057

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

_posts/2023-07-18-troubleshooting-lxc-bootup.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,37 @@ See 'systemctl status ifupdown-wait-online.service' for details.
2121
Starting Docker Application Container Engine...
2222
```
2323

24-
From here it looked like an issue with some service waiting for `network-online.target` so I checked which services were dependent
24+
I ran the following to determine which exact service was causing the hangup.
25+
2526
```shell
26-
systemctl show -p WantedBy network-online.target
27+
systemd-analyze blame
2728
```
2829

29-
I also ran the following to determine which exact service was causing the hangup.
30-
30+
From here it looked like an issue with some service waiting for `network-online.target` so I checked which services were dependent
3131
```shell
32-
systemd-analyze blame
32+
systemctl show -p WantedBy network-online.target
3333
```
3434

35-
Between the two, I found a service I had created for a specific network adapter that I had since deleted. This was causing my issue, once I unregister the service and it booted normally. An easy solution once I had visibility into an otherwise vexing problem.
35+
The issue seemed like `/etc/systemd/system/systemd-networkd-wait-online.service` was hung and did not return. This resulted in basically waiting 2 minutes until the timeout. Instead I made the service more specific. I used `ip link` to get the name of my ethernet adapter. Then I could check it specifically.
36+
37+
```conf
38+
[Unit]
39+
Description=Wait for Network to be Configured
40+
Documentation=man:systemd-networkd-wait-online.service(8)
41+
DefaultDependencies=no
42+
Conflicts=shutdown.target
43+
BindsTo=systemd-networkd.service
44+
After=systemd-networkd.service
45+
Before=network-online.target shutdown.target
46+
47+
[Service]
48+
Type=oneshot
49+
ExecStart=/lib/systemd/systemd-networkd-wait-online -i eth0
50+
RemainAfterExit=yes
51+
52+
[Install]
53+
WantedBy=network-online.target
54+
```
3655

3756
## Additional Reading
3857

0 commit comments

Comments
 (0)