[Caddy V2] PHP-fpm 502 Error

Does that mean we fixed it?

Yes. Sorry for the ambiguity. :blush:

@matt Any idea when a release might drop that includes this fix?

I’m not confident in my ability to compile Caddy V2 from source to get this commit, but if no release is imminent, I’ll roll up my sleeves and try to figure it out.

1 Like

Hopefully no later than Monday.

But building from source is easy. Instructions are on the readme.

1 Like

@skyfaller, if you do compile, make sure you view the readme of the v2 branch. Iirc, the instructions are different to those of v1.

1 Like

@matt @Mohammed90 I’m now running v2.0.0-beta11 h1:NVHnPAdZPt6OUBMltUMe2DWVsyYRbeE6NxhCm3AjGT8= and this issue is still not fixed. I’m still getting errors like:

Dec 23 16:58:51 attenborough caddy[653]: 2019/12/23 21:58:51.751        ERROR        http.log.error        dialing backend: dial unix /var/run/php/php7.3-fpm.sock:0: connect: no such file or directory        {"request": {"method": "GET", "uri": "/", "proto": "HTTP/2.0", "remote_addr": "[2601:42:0:6200:6098:abe8:2896:4095]:62774", "host": "ri.sunrisemovement.dev", "headers": {"Accept-Encoding": ["gzip, deflate, br"], "Dnt": ["1"], "Cookie": ["__cfduid=d6ca04da650bbdc70d21c10be860b5ffa1572436203"], "Upgrade-Insecure-Requests": ["1"], "Te": ["trailers"], "User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Accept-Language": ["en-US,en;q=0.5"]}, "tls": {"resumed": false, "version": 772, "resumed": 4865, "proto": "h2", "proto_mutual": true, "server_name": "ri.sunrisemovement.dev"}}, "status": 502, "err_id": "cxqqnfmjw", "err_trace": "reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:330)"}

Note the “php7.3-fpm.sock:0:”

This is from my Caddyfile saying “php_fastcgi unix//var/run/php/php7.3-fpm.sock”

Are you sure? @BrightEyesD says it works for him…

1 Like

Yep, rebooted my server and everything. Definitely running v2.0.0-beta11, definitely still getting the error. I’ll make a separate topic with my full config files and everything again to help debug…

EDIT: Nevermind, I’m an idiot. It is actually working fine now after rebooting my server. I’m not sure why it wasn’t working before the reboot, although I suspect it may have been that I was still running beta 10 since a “reload” of the service only refreshes the config file, not the binary. Thank you for your hard work and your patience with me!

1 Like

Thanks for double-checking! :grin: This happens a lot actually… so I’ve learned to always double-check.

But yes, typically reloading only reloads the config, you have to restart the service (not necessarily the whole machine usually) to apply a new binary. Hopefully we can make this issue a thing of the past in later versions of Caddy 2.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.