caddy.service start request repeated too quickly

前端 未结 2 1495
小鲜肉
小鲜肉 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:00

    For anyone else pulling their hair out, note the lines StartLimitInterval and StartLimitBurst in the caddy.service file - if you're testing and repeatedly stop / starting you will hit the StartLimitBurst limit. Need to increase it to lots, or change the StartLimitInterval, to allow this.

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题