caddy: systemd configuration expects networkd to exist, but this is not necessarily the case
(Note: I’m filing this issue on somebody elses behalf.)
1. What version of Caddy are you running (caddy -version)?
0.9.5
2. What are you trying to do?
Setting up Caddy on Ubuntu 16.06.
3. What is your entire Caddyfile?
n/a
4. How did you run Caddy (give the full command and describe the execution environment)?
Using the standard systemd service file included in the release.
5. What did you expect to see?
The service starting correctly.
6. What did you see instead (give full error messages and/or log)?
The service failed to start, and the following error showed up in the journal:
Mar 15 16:49:32 [snipped hostname] systemd[1]: Network Service is not active.
Mar 15 16:49:32 [snipped hostname] systemd[1]: Dependency failed for Wait for Network to be Configured.
-- Subject: Unit systemd-networkd-wait-online.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-networkd-wait-online.service has failed.
--
-- The result is dependency.
Mar 15 16:49:32 [snipped hostname] systemd[1]: systemd-networkd-wait-online.service: Job systemd-networkd-wait-online.service/start failed with result 'depen
Mar 15 16:49:32 [snipped hostname] systemd[1]: caddy.service: Start request repeated too quickly.
Mar 15 16:49:32 [snipped hostname] systemd[1]: Failed to start Caddy HTTP/2 web server.
-- Subject: Unit caddy.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit caddy.service has failed.
--
-- The result is failed.
Mar 15 16:49:32 [snipped hostname] sudo[13076]: pam_unix(sudo:session): session closed for user root
The service file apparently expects networkd to exist, but this is not necessarily true on all systemd-using distributions. Removing it from the Wanted line fixed the issue.
7. How can someone who is starting from scratch reproduce this behavior as minimally as possible?
Set up Caddy on a systemd-using distribution that does not have networkd enabled.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (5 by maintainers)
I’ve pretty much lost interest by this point. When I’m flat-out told that “this is not true” and to “stop spreading FUD” when I have two people independently reporting to me that it doesn’t work out of the box… I don’t exactly have any faith that there’s any willingness to get this issue resolved.
I’m really not interested in a “technically correct” shouting match, I’m only interested in getting the issue resolved as well as possible.
At this rate, I’ll just stop recommending Caddy to non-technical users until stable distro packaging (whether third-party or not) is a thing. I’ve now had to guide two people through their setup for hours, and that is not an ongoing time investment I intend to make, nor does it make sense in the bigger scheme of things compared to just instructing them to install Certbot with eg. nginx.
I don’t think there’s anything more for me to say on this matter, neither in this thread nor on the forums. A packaging thread already exists.
(This comment only left for the sake of completeness, for people stumbling upon the thread through Google and such.)
Please don’t comment on a closed issue. 😃
I am truly sorry to have to address this in a blunt way: This is not true. Your initial bug report (which has been reviewed independently from any later claims) disproves it:
Had it not existed, you’d not get this error. Indeed, systemd would not be able to schedule its start in the first place. (Service
caddy.servicewould have failed due to a missing dependency instead.)Please stop spreading FUD.
@mholt Can we lock this, please?