1

在 Raspbian Buster 上安装 OWFS(单线文件系统)不成功。

组件 owserver 使 Raspberry Pi 1 上的默认 restartSec 值过期 100 毫秒,安装失败,错误代码为 1。

Job for owserver.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status owserver.service" and "journalctl -xe" for details.
invoke-rc.d: initscript owserver, action "start" failed.
● owserver.service - Backend server for 1-wire control
   Loaded: loaded (/lib/systemd/system/owserver.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: protocol) since Thu 2020-01-02 18:24:00 CET; 181ms ago
     Docs: man:owserver(1)
  Process: 1312 ExecStart=/usr/bin/owserver -c /etc/owfs.conf (code=exited, status=0/SUCCESS)
 Main PID: 1312 (code=exited, status=0/SUCCESS)

systemd[1]: owserver.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1]: owserver.service: Scheduled restart job, restart counter is at 1.
systemd[1]: Stopped Backend server for 1-wire control.
4

2 回答 2

0

我尝试重新启动,但我发现这个链接为我修复了它。我没有进一步研究它,但我猜测它希望程序继续运行的服务文件中的设置 - 而不是成为后台进程。服务文件配置中针对这种情况还有其他选项。

于 2020-04-21T02:44:06.313 回答
0

Workaround: Edit the file "/lib/systemd/system/owserver.service“ and add RestartSec=3 option.

[Unit]
Description=Backend server for 1-wire control
Documentation=man:owserver(1)

[Service]
Type=notify
NotifyAccess=all
ExecStart=/usr/bin/owserver -c /etc/owfs.conf
Restart=on-failure
RestartSec=3
#User=Debian-ow
#Group=Debian-ow
[Install]
WantedBy=multi-user.target
Also=owserver.socket

Than restart the services:

systemctl daemon-reload

I hope this helps someone! Got any better ideas?

于 2020-01-02T20:23:07.437 回答