Page MenuHomePhabricator

debmonitor: Some rejected connections result in 502s
Open, LowPublic

Description

If a host/image submission is rejected (because it's not for the submitting host or not from a server white-listed as a proxy), some requests end up in 502s:

On the debmonitor server side, the request returns a 403:

[pid: 17087|app: 0|req: 5252/11358] 127.0.0.1 () {42 vars in 642 bytes} [Wed Dec 18 09:20:47 2019] POST /images/test-image:1.0/update => generated 89 bytes in 1 msecs (HTTP/1.1 403) 6 headers in 400 bytes (1 switches on core 0)

But in Nginx logs it appears as a broken pipe:

[error] 3398#3398: *4984332 sendfile() failed (32: Broken pipe) while sending request to upstream, client: 10.64.32.25, server: debmonitor.discovery.wmnet, request: "POST /images/test-image:1.0/update HTTP/1.1", upstream: "http://127.0.0.1:8001/images/test-image:1.0/update", host: "debmonitor.discovery.wmnet"