caddy: OpenBSD - Caddy immediately dies on http requests

Hello,

1. Which version of Caddy are you using (caddy -version)?

Caddy v1.0.1 (h1:oor6ep+8NoJOabpFXhvjqjfeldtw1XSzfISVrbfqTKo=)

2. What are you trying to do?

I would like to use Caddy to serve a 404 page.

3. What is your Caddyfile?

$ cat Caddyfile
localhost:8080
log access.log
log err.log

4. How did you run Caddy (give the full command and describe the execution environment)?

$ ./Downloads/caddy -log err2.log

5. Please paste any relevant HTTP request(s) here.

$ curl http://localhost:8080
curl: (56) Recv failure: Connection reset by peer

6. What did you expect to see?

The default 404 not found page.

7. What did you see instead (give full error messages and/or log)?

See curl response above.

$ cat err.log err2.log
2019/08/05 07:56:52 [INFO] Serving http://localhost:8080
2019/08/05 07:56:52 [INFO][cache:0xc000092730] Started certificate maintenance routine

(note err.log is blank, but err2 contains the text above.)

8. Why is this a bug, and how do you think this should be fixed?

This is a bug because Caddy is dying each time there is an http request. I see no reason why it should be dying.

9. What are you doing to work around the problem in the meantime?

I know of know work around for this.

You didn’t ask about the OS or go version, so I will provide that…

$ sysctl kern.version
kern.version=OpenBSD 6.5-current (GENERIC.MP) #171: Sun Aug  4 11:11:52 MDT 2019
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
$ go version
go version go1.12.7 openbsd/amd64

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (7 by maintainers)

Commits related to this issue

Most upvoted comments

This has been fixed by the wonderful @didil in pull request https://github.com/caddyserver/caddy/pull/2787

A million thanks to didil for taking the time to track this down.

Thanks to @mholt for committing to trunk for easier testing.

Sorry about that. That version of Caddy will startup, but will immediately die on the first http request to the server.