linux启动信息失败,Linux下 Resilio Sync 使用其他用户启动失败的解决方案

如果使用自己的用户启动 Sync ,一定会失败,即便是把自己的用户添加到 rslsync ,也把 rslsync 添加到自己的用户组。也会失败。

原因

因为配置文件中的 pid 文件地址是 /run/resilio/resilio.pid ,自己的账户是没有这个权限的,除非每次启动失败后,修改 pid 文件的权限才可以 restart 。

➜ rslsync systemctl --user status rslsync.service

● rslsync.service - Resilio Sync per-user service

Loaded: loaded (/usr/lib/systemd/user/rslsync.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Thu 2020-07-16 11:44:32 CST; 4h 18min ago

Process: 540 ExecStart=/usr/bin/rslsync --nodaemon --config /home/pi/.config/rslsync/rslsync.conf (code=exited, status=1/FAILURE)

Main PID: 540 (code=exited, status=1/FAILURE)

7月 16 11:44:29 pi4 rslsync[540]: [20200716 11:44:29.751] Debug log mask has been set to FFFFFFFF

7月 16 11:44:29 pi4 rslsync[540]: [20200716 11:44:29.751] Features mask has been set to 0

7月 16 11:44:29 pi4 rslsync[540]: [20200716 11:44:29.799] ZIP: Can't locate [version] in zip, error -100.

7月 16 11:44:29 pi4 rslsync[540]: [20200716 11:44:29.800] Configuration from file "/home/pi/.config/rslsync/rslsync.conf" has been a>

7月 16 11:44:32 pi4 rslsync[540]: [20200716 11:44:32.870] saved history: 0 events

7月 16 11:44:32 pi4 rslsync[540]: [20200716 11:44:32.875] Torrent session shutdown: done waiting

7月 16 11:44:32 pi4 rslsync[540]: [20200716 11:44:32.875] Shutdown. Saving config sync.dat

7月 16 11:44:32 pi4 rslsync[540]: Can't open pid file /run/resilio/resilio.pid. 权限不够

7月 16 11:44:32 pi4 systemd[531]: rslsync.service: Main process exited, code=exited, status=1/FAILURE

7月 16 11:44:32 pi4 systemd[531]: rslsync.service: Failed with result 'exit-code'.

解决方案

在自己的 home 目录下的 .config/rslsync/rslsync.conf 文件中删除 pid 配置,然后启动即可,程序会创建自己用户权限的pid 文件。

启动

systemctl --user restart rslsync.service

# 重启之后,查看最新状态,就可以看到已经正常运行了。

systemctl --user status rslsync.service

建议

如果是在 x86 Or x64 平台使用 Resilio Sync ,我更推荐使用 Docker 去搭建,更省心。

而在树莓派或者其他 ARM 平台,更推荐去按照官方文档去安装使用。

而我使用的是 Manjaro ARM 官方没有安装包,但是 AUR 仓库中有,安装后按照上方的使用方式去配置即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值