解决ubuntu启动卡住报错:a start job is running for wait

一台测试用的服务器,每次启动都要卡在一个地方好几分钟,因为不常用,也就没管它。

近两天使用它测试,每次开机太浪费时间了,就去找原因和解决的方法。

首先将报错找出来,对照着敲到百度:a start job is running for wait,果然搜索到解决方法。

解决的方法是修改/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service 文件,在里面加上一句 TimeoutStartSec=5sec

复制代码
xx@ub:/etc/systemd/system/network-online.target.wants$ cat systemd-networkd-wait-online.service
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Wait for Network to be Configured
Documentation=man:systemd-networkd-wait-online.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
Requires=systemd-networkd.service
After=systemd-networkd.service
Before=network-online.target shutdown.target

[Service]
Type=oneshot
ExecStart=/lib/systemd/systemd-networkd-wait-online
RemainAfterExit=yes
TimeoutStartSec=5sec
相关推荐
xybDIY1 小时前
亚马逊云 Organizations 组织 Link 账号关联与解绑自动化解决方案
运维·自动化·云计算·aws
煤球王子1 小时前
浅学文件系统4(页面缓存)
linux
peixiuhui1 小时前
Iotgateway技术手册-1. 项目概述
linux·网关·iot·modbus·数据采集网关·iotgateway·采集软件
wdfk_prog2 小时前
[Linux]学习笔记系列 -- [fs]sysfs
linux·笔记·学习
慕容雪_2 小时前
运维笔记-网络【属性】-【共享】中没有【家庭网络连接(H)】的选项
运维·网络·共享
AllFiles2 小时前
Linux 网络故障排查:如何诊断与解决 ARP 缓存溢出问题
linux·后端
AC赳赳老秦2 小时前
Shell 脚本批量生成:DeepSeek 辅助编写服务器运维自动化指令
运维·服务器·前端·vue.js·数据分析·自动化·deepseek
pps-key2 小时前
Afrog漏洞扫描器:从入门到入狱......边缘的摇摆记录(pps-key黑化版)
linux·计算机网络·安全·网络安全
学Linux的语莫2 小时前
linux的root目录缓存清理
linux·运维·服务器
oMcLin2 小时前
如何在 SUSE Linux Enterprise Server 15 上部署并优化 K3s 集群,提升轻量级容器化应用的资源利用率?
linux·运维·服务器