RHEL7 failed to enable service

Kiyor
2017年10月27日 01:03

发现centos7出现

Failed to execute operation: Too many levels of symbolic links

root@influxdb system $ systemctl enable kapacitor
Failed to execute operation: Too many levels of symbolic links
root@influxdb system $ ll /etc/systemd/system/kapacitor.service
lrwxrwxrwx 1 root root 41 Oct 27 08:47 /etc/systemd/system/kapacitor.service -> /usr/lib/systemd/system/kapacitor.service
root@influxdb system $ rm /etc/systemd/system/kapacitor.service
rm: remove symbolic link ‘/etc/systemd/system/kapacitor.service’? y
root@influxdb system $ systemctl enable kapacitor
Created symlink from /etc/systemd/system/kapacitor.service to /usr/lib/systemd/system/kapacitor.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/kapacitor.service to /usr/lib/systemd/system/kapacitor.service.

结论: systemctl 优先搜寻/etc/systemd/system/, 当里面存在service后会创建软链接到/etc/systemd/system/multi-user.target.wants/, 但如果/etc/systemd/system/内已经是软链接, 则软链接指向过长.

AI Smart Recommendations
Based on Semantic Similarity

AI is analyzing article content to find similar articles...

More Articles

View more exciting content

About Blog

Tech sharing and life insights