I am just trying to run a simple reverse proxy to a backend service.
sudo caddy reverse-proxy --from domain --to localhost:8000
a. System environment:
backend service on port:8000 is a docker container. The whole system is on ubuntu 16.04 LTS
3. The problem I’m having:
Caddy hangs at “The server validated our request” when attempting to provision a SSL certificate.
4. Error messages and/or full log output:
2020/03/05 04:29:09.691 WARN admin admin endpoint disabled
2020/03/05 04:29:09.692 INFO http server is listening only on the HTTPS port but has no TLS connection polici
es; adding one to enable TLS {“server_name”: “proxy”, “https_port”: 443}
2020/03/05 04:29:09.692 INFO http enabling automatic HTTP->HTTPS redirects {“server_name”: “proxy”}
2020/03/05 04:29:09.694 INFO http enabling automatic TLS certificate management {“domains”: [“domain”]}
2020/03/05 04:29:09 [INFO][cache:0xc0001a7270] Started certificate maintenance routine
2020/03/05 04:29:09.711 INFO tls cleaned up storage units
2020/03/05 04:29:09.711 INFO autosaved config {“file”: “/home/internetofh2o/.config/caddy/autosave.json”}
Caddy 2 proxying from domain to localhost:8000
2020/03/05 04:29:10 [INFO][domain] Obtain certificate
2020/03/05 04:29:10 [INFO][domain] Obtain: Waiting on rate limiter…
2020/03/05 04:29:10 [INFO][domain] Obtain: Done waiting
2020/03/05 04:29:10 [INFO] [domain] acme: Obtaining bundled SAN certificate
2020/03/05 04:29:10 [INFO] [domain] AuthURL: https://acme-v02.api.letsencrypt.org/acme/aut
hz-v3/3167809221
2020/03/05 04:29:10 [INFO] [domain] acme: Could not find solver for: tls-alpn-01
2020/03/05 04:29:10 [INFO] [domain] acme: use http-01 solver
2020/03/05 04:29:10 [INFO] [domain] acme: Trying to solve HTTP-01
2020/03/05 04:29:11 [INFO][domain] Served key authentication (HTTP challenge)
2020/03/05 04:29:11 [INFO][domain] Served key authentication (HTTP challenge)
2020/03/05 04:29:11 [INFO][domain] Served key authentication (HTTP challenge)
2020/03/05 04:29:11 [INFO][domain] Served key authentication (HTTP challenge)
2020/03/05 04:29:15 [INFO] [domain] The server validated our request
5. What I already tried:
I have tried a variety of different apex domain names that I own. I have tried each domain name on a fresh virtual machine, building caddy from source and starting the docker container from scratch.
Is your server accessible on both ports 80 and 443? Both are needed to successfully complete the HTTP challenge. Check your port forwarding and/or firewall rules.
I’ll try the binary. The binaries that are linked on the github release pages never worked for me, which is why I built from source in the first place. The version I built from source (which I jsut got from the basic git clone command) would have been 2.0 beta 13
The same thing that happened with this binary jsut now. I proceed through all of the installation instructions, but at the last step sudo systemctl start caddy, when I systemctl status caddy, I get
Mar 05 05:26:45 test systemd[1]: Started Caddy Web Server.
Mar 05 05:26:45 test systemd[1]: caddy.service: Main process exited, code=exited, status=217/USER
Mar 05 05:26:45 test systemd[1]: caddy.service: Unit entered failed state.
Mar 05 05:26:45 test systemd[1]: caddy.service: Failed with result ‘exit-code’.
@ksonda Would you be able to upgrade to the latest on the v2 branch (newer than beta 18, will go out with beta 19)? I think I’ve fixed a bug today that was at least related to the hanging, if not the hanging itself. Did you notice that this only happens with the HTTP challenge? If so, it might very well have been fixed now… if not, meh, we’ll see. Let me know after you upgrade if it happens or doesn’t happen again!
After 20 trials I was unable to replicate the issue (which I have experienced before myself since your report).