Getting API error 502 for /music/api/default in the webapp
#1493
-
|
Hi, I'm a new user here. I have mympd/mpd running on a home server with docker and caddy reverse proxy. It works as intended but I'm getting a 502 notification now and then, which I'd like to understand and fix if possible. Here's my docker compose snippet and by caddy file and my mpd conf As I said, this works but I'd like to get rid of that annoying 502 notification, and also understand if I have something wrong in my setup. Grateful for any advice! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
Setup looks good. HTTP code 502 is Bad Gateway. Request logs from caddy and debug logs from myMPD would be useful and also a HAR file from your browser. I run myMPD in one of my setups behind a NGINX reverse proxy and it works without problems. |
Beta Was this translation helpful? Give feedback.
-
|
@einarpersson: have found a solution for the 502 api error? I observe the same error with a similar setup as you have. |
Beta Was this translation helpful? Give feedback.
-
|
Provide the requested logs and I will investigate |
Beta Was this translation helpful? Give feedback.
-
|
I will send you the logs by private email. Some observations:
|
Beta Was this translation helpful? Give feedback.
After looking in your logs: Caddy does not set set a "Connection: keep-alive" header in it's requests. myMPD's default is closing the connection if it does not find the "Connection: keep-alive" header. Is seems that http/1.1 defaults to persistent connections and myMPD behaves incorrectly.
I open a bug. Fix is fairly simple, but must be tested thoroughly.