解决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
相关推荐
Xの哲學几秒前
Linux链路聚合深度解析: 从概念到内核实现
linux·服务器·算法·架构·边缘计算
中科米堆2 分钟前
自动化大尺寸批量3D检测,自动化三维扫描系统实现钢板支架在线检测-中科米堆CASAIM
运维·3d·自动化·3d全尺寸检测
cetcht88885 分钟前
35kV-750kV 变电站集中监控系统(涵盖火灾消防、安全防卫、动环、智能锁控、智能巡视等) 设备配置与布置
大数据·运维·物联网·机器人·能源
wanhengidc7 分钟前
具有ARM架构云手机的功能
运维·服务器·arm开发·科技·智能手机·云计算
图乐aj7 分钟前
MySQL 运维之日常运维篇 二
运维·mysql
RedMery14 分钟前
环境Ubuntu 25.04,RTX4090,CUDA12.8下的Mr.DETR、Detectron2、detrex、Transformer安装
ubuntu·transformer·mr
wanhengidc15 分钟前
巨 椰 云手机离线多开
运维·服务器·科技·智能手机·云计算
代码游侠15 分钟前
应用——管道与文件描述符
linux·服务器·c语言·学习·算法
wefg119 分钟前
【Linux】环境变量
linux·运维·服务器
扫地生大鹏20 分钟前
Linux登录用户名密码正确,报错Linux 登录报module is unknow
linux·运维·服务器