Caddy Proxy 502 Errors


(Mohit Deshwal) #1

502 on POST requests made by Vue resaurce

although it works for requests with a small amount of data.
and it only happens for multipart/form-data post requests.

on the backside, nginx is there, but seems those requests never reach to that.
stderr Logs:

13/Feb/2018:09:34:47 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:09:39:19 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:09:41:00 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:09:43:26 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:09:51:36 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:09:52:02 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:09:54:57 +0000 [ERROR 502 /bill/data] EOF
13/Feb/2018:10:00:34 +0000 [ERROR 502 /update/bill/1] EOF

caddyfile:

hello.abc.com {
    proxy / 172.19.0.6:8096/ {
        transparent

    }
    log /var/log/caddy-mohit.log
    gzip
}

Note: I am using Docker containers for both with the same docker network.


(Matthew Fay) #2

Hi @Mohit_Deshwal, welcome to the Caddy community. I edited your post to change the formatting a little so I could read the logs and Caddyfile easier.

Add errors /var/log/caddy-mohit-errors.log to your Caddyfile, recreate the issue, then check the new log file.

The errors log is likely to give you a much better explanation as to why Caddy issued the 502s.