caddy.service start request repeated too quickly

前端 未结 2 1500
小鲜肉
小鲜肉 2021-02-14 12:14

I\'m using systemd to start a caddy webserver on an ubuntu 16.04 machine. Whenever I run sudo service caddy start and service caddy status, I get this

2条回答
  •  清歌不尽
    2021-02-14 13:07

    In my /etc/systemd/system/caddy.service file, I had the following line:

    Restart=on-failure
    

    Commenting that out (with # or ;) and restarting the service showed the underlying problem, which was in my Caddyfile.

    EDIT:

    service caddy status only prints a few lines from the log, so sometimes you can find the underlying problem by simply looking at the full log. If using syslog, this is done with:

    journalctl -u caddy
    

提交回复
热议问题