pingora icon indicating copy to clipboard operation
pingora copied to clipboard

Error "Fail to proxy: " is unable to be suppressed with suppress_error_log

Open CodyPubNub opened this issue 1 year ago • 0 comments

Describe the bug

This error in pingora-proxy is being logged without the suppress_error_log method being called to determine if it should be suppressed: https://github.com/cloudflare/pingora/blob/38a9d556b557a10f7815f50fca6a49de146ab5be/pingora-proxy/src/lib.rs#L149

Pingora info

Latest commit on main, using pingora-proxy/examples/load_balancer.rs example

Steps to reproduce

# run load balancer example of the pingora-proxy
cargo run --example load_balancer

# use openssl cli to inspect certificates
echo | openssl s_client -showcerts  -connect 0.0.0.0:6189 2>/dev/null | openssl x509 -inform pem -noout -text

Expected results

I'd expect that if I defined a suppress_error_log method, I would be able to suppress this error, just like this here: https://github.com/cloudflare/pingora/blob/38a9d556b557a10f7815f50fca6a49de146ab5be/pingora-proxy/src/lib.rs#L614-L623

Observed results

Error is logged without the ability to suppress:

[2024-07-11T04:21:29Z ERROR pingora_proxy] Fail to proxy: Downstream ConnectionClosed context: while reading request headers, bytes already read: 1

CodyPubNub avatar Jul 11 '24 04:07 CodyPubNub