首页 > 其他分享 >nfs-server启动失败:Unable to break cycle starting with nfs-server.service/start

nfs-server启动失败:Unable to break cycle starting with nfs-server.service/start

时间:2024-04-22 22:45:16浏览次数:21  
标签:systemd service 22 harbor server nfs

[root@harbor ~]# systemctl status nfs-server.service
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/nfs-server.service.d
           └─order-with-mounts.conf
   Active: inactive (dead)

4月 22 22:12:15 harbor systemd[1]: nfs-server.service: Found ordering cycle on nfs.mount/start
4月 22 22:12:15 harbor systemd[1]: nfs-server.service: Found dependency on nfs-server.service/start
4月 22 22:12:15 harbor systemd[1]: nfs-server.service: Unable to break cycle starting with nfs-server.service/start
4月 22 22:13:18 harbor systemd[1]: nfs-server.service: Found ordering cycle on nfs.mount/start
4月 22 22:13:18 harbor systemd[1]: nfs-server.service: Found dependency on nfs-server.service/start
4月 22 22:13:18 harbor systemd[1]: nfs-server.service: Unable to break cycle starting with nfs-server.service/start
[root@harbor ~]#

 

最开始我以为我遇到了某种bug,好吧,其实是我自己蠢笨而已。

请使用命令systemctl list-dependencies nfs-server.service查看nfs-server的依赖项,找到没有启动的服务,尝试去启动它,看看能否启动(一般都不行,不然为啥最终需要的服务起不来?)然后看看这个不能启动的服务的状态和报错信息。然后再因地制宜。

[root@harbor ~]# systemctl list-dependencies nfs-server.service
nfs-server.service
● ├─-.mount
● ├─auth-rpcgss-module.service
● ├─nfs-idmapd.service
● ├─nfs-mountd.service
● ├─nfs.mount
● ├─nfsdcld.service
● ├─proc-fs-nfsd.mount
● ├─rpc-statd-notify.service
● ├─rpc-statd.service
● ├─rpcbind.socket
● ├─system.slice
● ├─network-online.target
● │ └─NetworkManager-wait-online.service
● └─network.target
[root@harbor ~]#

然后查看服务nfs.mount的状态:

[root@harbor ~]# systemctl status nfs.mount
● nfs.mount - /nfs
   Loaded: loaded (/etc/fstab; generated)
   Active: failed (Result: timeout) since Mon 2024-04-22 22:11:15 CST; 3min 20s ago
    Where: /nfs
     What: 192.168.24.5:/nfs
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
    Tasks: 0 (limit: 23356)
   Memory: 692.0K
   CGroup: /system.slice/nfs.mount

4月 22 22:11:15 harbor systemd[1]: nfs.mount: Mounting timed out. Terminating.
4月 22 22:11:15 harbor systemd[1]: nfs.mount: Mount process exited, code=killed status=15
4月 22 22:11:15 harbor systemd[1]: nfs.mount: Failed with result 'timeout'.
4月 22 22:11:15 harbor systemd[1]: Failed to mount /nfs.
4月 22 22:12:15 harbor systemd[1]: nfs-server.service: Found ordering cycle on nfs.mount/start
4月 22 22:12:15 harbor systemd[1]: nfs-server.service: Found dependency on nfs-server.service/start
4月 22 22:12:15 harbor systemd[1]: nfs-server.service: Unable to break cycle starting with nfs-server.service/start
4月 22 22:13:18 harbor systemd[1]: nfs-server.service: Found ordering cycle on nfs.mount/start
4月 22 22:13:18 harbor systemd[1]: nfs-server.service: Found dependency on nfs-server.service/start
4月 22 22:13:18 harbor systemd[1]: nfs-server.service: Unable to break cycle starting with nfs-server.service/start
[root@harbor ~]# 

它再说它挂载超时。说明有什么配置项在让它去挂载某个文件系统(磁盘),检查/etc/fstab文件:

[root@harbor ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Wed Apr 10 05:06:12 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/kals-root   /                       xfs     defaults        0 0
/dev/mapper/kals-backup /backup                 xfs     defaults        0 0
UUID=adca8a7e-0db9-4158-96a9-3057dbb13a3c /boot                   ext4    defaults        1 2
#/dev/mapper/kals-swap   swap                    swap    defaults        0 0
192.168.24.5:/nfs /nfs nfs defaults 0 0
[root@harbor ~]# 

TNN的,被自己气死,我怎么把这个测试配置留着了。

删除这个配置项,然后使用命令systemctl daemon-reload重新加载服务资源,nfs-server服务成功启动了。

[root@harbor ~]# systemctl status nfs-server
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/nfs-server.service.d
           └─order-with-mounts.conf
   Active: active (exited) since Mon 2024-04-22 22:27:30 CST; 6min ago
  Process: 8078 ExecStart=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl reload gssproxy ; fi (code=exited, status=0/SUCCESS)
  Process: 8066 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
  Process: 8065 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 8078 (code=exited, status=0/SUCCESS)

4月 22 22:27:30 harbor systemd[1]: Starting NFS server and services...
4月 22 22:27:30 harbor systemd[1]: Started NFS server and services.
[root@harbor ~]#

 

标签:systemd,service,22,harbor,server,nfs
From: https://www.cnblogs.com/love-DanDan/p/18151744

相关文章

  • 'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
    D:\Work\NewProgramm\14)福建附二院后台管理\FujianHospitalTextile\ZR.Vue>yarnrundevyarnrunv1.22.22warningpackage.json:Nolicensefield$setNODE_OPTIONS=--openssl-legacy-provider&vue-cli-serviceserve'vue-cli-service'不是内部或外部命令,也不......
  • k8s serviceIP: range is full
    创建svc报错Internalerroroccurred:failedtoallocateaserviceIP:rangeisfullk8ssvc的网段默认ip为256个,在master节点的/etc/kubernetes/manifests/kube-apiserver.yaml和/etc/kubernetes/manifests/kube-controller-manager.yaml中的service-cluster-ip-range进行......
  • Serverless 成本再优化:Knative 支持抢占式实例
    作者:元毅、向先Knative是一款云原生、跨平台的开源Serverless应用编排框架,而抢占式实例是公有云中性价比较高的资源。Knative与抢占式实例的结合可以进一步降低用户资源使用成本。本文介绍如何在Knative中使用抢占式实例。背景信息抢占式实例是一种低成本竞价型实例,您可......
  • Datax助力轻松迁移SQLServer数据至GreatSQL
    1.环境说明1.1源端SQLSserver版本IP端口MicrosoftSQLServer2017192.168.140.16014331.2目标端GreatSQL版本IP端口GreatSQL-8.0.32192.168.139.8633082.安装环境2.1安装SQLServer环境环境说明:借助Docker使用镜像启动数据库2.1.1安装docke......
  • SQL Server 中将字符串按数字排序
    方法一:使用CAST或CONVERT我们可以使用CAST或CONVERT函数将字符串转换为数字,然后按照数字进行排序。示例如下:SELECT*FROMYourTableORDERBYCAST(YourColumnASINT)方法二:使用TRY_CAST或TRY_CONVERT如果我们不确定字符串中的所有值都可以成功转换为数字,我们可......
  • web server apache tomcat11-14-CGI
    前言整理这个官方翻译的系列,原因是网上大部分的tomcat版本比较旧,此版本为v11最新的版本。开源项目从零手写实现tomcatminicat别称【嗅虎】心有猛虎,轻嗅蔷薇。系列文章webserverapachetomcat11-01-官方文档入门介绍webserverapachetomcat11-02-setup启动web......
  • Windows Server 2008 R2 OVF, updated Apr 2024 (sysin) - VMware 虚拟机模板
    WindowsServer2008R2OVF,updatedApr2024(sysin)-VMware虚拟机模板WindowsServer2008R2简体中文版OVF,2024年4月更新请访问原文链接:WindowsServer2008R2OVF,updatedApr2024(sysin)-VMware虚拟机模板,查看最新版。原创作品,转载请保留出处。作者主......
  • Windows 7 & Windows Server 2008 R2 简体中文版下载 (updated Apr 2024)
    Windows7&WindowsServer2008R2简体中文版下载(updatedApr2024)Windows7&WindowsServer2008R2(2024年4月更新)请访问原文链接:Windows7&WindowsServer2008R2简体中文版下载(updatedApr2024),查看最新版。原创作品,转载请保留出处。作者主页:sysin.org......
  • Windows Server 2022 OVF, updated Apr 2024 (sysin) - VMware 虚拟机模板
    WindowsServer2022OVF,updatedApr2024(sysin)-VMware虚拟机模板2024年4月版本更新,现在自动运行sysprep,支持ESXiHostClient部署请访问原文链接:WindowsServer2022OVF,updatedApr2024(sysin)-VMware虚拟机模板,查看最新版。原创作品,转载请保留出处。作......
  • Windows Server 2022 中文版、英文版下载 (updated Apr 2024)
    WindowsServer2022中文版、英文版下载(updatedApr2024)WindowsServer2022正式版,x64请访问原文链接:WindowsServer2022中文版、英文版下载(updatedApr2024),查看最新版。原创作品,转载请保留出处。作者主页:sysin.org此次发布更新了什么?答:版本号,当然还有…2021.09......