我停止了此服务,现在当我尝试启动它时出现以下错误:
有什么方法可以找出第一个过程失败的原因吗?
systemctl status crmpicco-admin.service
● crmpicco-admin.service - CRMPicco Boot Script
Loaded: loaded (/etc/systemd/system/crmpicco-admin.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-06-20 16:59:09 AWST; 17s ago
Process: 57047 ExecStart=/bin/bash -c /usr/sbin/mkfs.ext4 -L crmpicco-admin /dev/nvme1n1 (code=exited, status=1/FAILURE)
Process: 57048 ExecStart=/bin/bash -c mkdir -p /var/lib/crmpicco-admin (code=exited, status=0/SUCCESS)
Process: 57049 ExecStart=/bin/bash -c mountpoint -q /var/lib/localcache || mount /var/lib/localcache (code=exited, status=0/SUCCESS)
Process: 57051 ExecStart=/bin/bash -c mkdir -p /var/lib/localcache/cache /var/lib/localcache/ini /var/lib/localcache/sites (code=exited, status=0/SUCCESS)
Process: 57052 ExecStart=/bin/bash -c mountpoint -q /var/lib/crmpicco-admin || mount /var/lib/provision (code=exited, status=0/SUCCESS)
Process: 57054 ExecStart=/bin/bash -c mkdir -p /var/lib/crmpicco-admin/tmp (code=exited, status=0/SUCCESS)
Process: 57055 ExecStart=/bin/bash -c chown -R www-data:www-data /var/lib/crmpicco-admin/tmp (code=exited, status=0/SUCCESS)
Process: 57060 ExecStart=/bin/bash -c ln -f -s /var/lib/crmpicco-admin/tmp /var/lib/localcache/tmp (code=exited, status=1/FAILURE)
Main PID: 57060 (code=exited, status=1/FAILURE)
Jun 20 16:59:08 ip-10-80-32-115 systemd[1]: Starting CRMPicco Boot Script...
Jun 20 16:59:09 ip-10-80-32-115 systemd[1]: crmpicco-admin.service: Main process exited, code=exited, status=1/FAILURE
Jun 20 16:59:09 ip-10-80-32-115 systemd[1]: crmpicco-admin.service: Failed with result 'exit-code'.
Jun 20 16:59:09 ip-10-80-32-115 systemd[1]: Failed to start CRMPicco Boot Script.
答案1
所有服务输出都归杂志(系统日志);参见journalctl [-f] [-n 100] [-b]
。
服务失败的最可能原因是 mkfs.ext4 拒绝在设备上创建新的文件系统,已经包含一个文件系统。