我有samba服务器,由于某种原因,它每到2分钟就会不断地重新加载:
$ sudo systemctl status smbd
● smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-05-03 11:30:26 EDT; 19h ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 14071 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 927 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 5 (limit: 4346)
Memory: 17.6M
CGroup: /system.slice/smbd.service
├─ 927 /usr/sbin/smbd --foreground --no-process-group
├─ 940 /usr/sbin/smbd --foreground --no-process-group
├─ 942 /usr/sbin/smbd --foreground --no-process-group
├─ 967 /usr/sbin/smbd --foreground --no-process-group
└─1535 /usr/sbin/smbd --foreground --no-process-group
May 04 06:32:38 router systemd[1]: Reloading Samba SMB Daemon.
May 04 06:32:38 router systemd[1]: Reloaded Samba SMB Daemon.
May 04 06:34:36 router systemd[1]: Reloading Samba SMB Daemon.
May 04 06:34:36 router systemd[1]: Reloaded Samba SMB Daemon.
May 04 06:37:07 router systemd[1]: Reloading Samba SMB Daemon.
May 04 06:37:07 router systemd[1]: Reloaded Samba SMB Daemon.
May 04 06:39:19 router systemd[1]: Reloading Samba SMB Daemon.
May 04 06:39:19 router systemd[1]: Reloaded Samba SMB Daemon.
May 04 06:41:39 router systemd[1]: Reloading Samba SMB Daemon.
May 04 06:41:39 router systemd[1]: Reloaded Samba SMB Daemon.我应该在哪里寻找理解为什么systemd重新加载这个单元?
发布于 2021-08-20 08:48:59
在将Ubuntu系统从18.04升级到20.04之后,我遇到了这个问题。
我在完整的系统日志中注意到,smbd在每次dhcp租约更新后都会重新加载(在我的例子中,大约每小时一次)。
Aug 20 08:38:54 fileserver dhclient[282]: DHCPREQUEST for 10.12.24.115 on eth0 to 10.12.24.1 port 67 (xid=0x5d719a99)
Aug 20 08:38:54 fileserver dhclient[282]: DHCPACK of 10.12.24.115 from 10.12.24.1 (xid=0x999a715d)
Aug 20 08:38:54 fileserver systemd[1]: Reloading Samba SMB Daemon.
Aug 20 08:38:54 fileserver systemd[1]: Reloaded Samba SMB Daemon.一些额外的googling让我找到了https://superuser.com/questions/1289485/samba-reload-on-new-dhcp-lease & /etc/dhcp/dhclient-enter-hooks.d/samba,它会重新加载服务。
我已经检查了我的备份,这个文件以前已经存在了18.04。
因此,“问题”可能在于,即20.04中的网络守护进程。
我自己的调查还在继续,但我希望这能帮上忙.
https://serverfault.com/questions/1062507
复制相似问题