minio / sidekick

High Performance HTTP Sidecar Load Balancer
GNU Affero General Public License v3.0
540 stars 82 forks source link

Avoid unnecessary logging for TLS related spurious errors of io.EOF #107

Closed harshavardhana closed 3 months ago

harshavardhana commented 3 months ago

Expected Behavior

No such logs.

Current Behavior

Jun 06 22:22:37 xxxxxxx sidekick[3647762]: 2024/06/06 22:22:37 http: TLS handshake error from 10.20.103.9:50531: EOF
Jun 06 22:22:37 xxxxxxx sidekick[3647762]: 2024/06/06 22:22:37 http: TLS handshake error from 10.21.199.9:32391: EOF
Jun 06 22:22:38 xxxxxxx sidekick[3647762]: 2024/06/06 22:22:38 http: TLS handshake error from 10.20.135.13:11299: EOF

Possible Solution

Check MinIO server implementation which implements a workaround by providing a custom

http.Server.ErrorLog (function) that discards the logs originating from net/http, we need to turn this off otherwise these messages clobber up --json output in some environments.

jiuker commented 3 months ago

Have you a quickly steps to reproduce this? @harshavardhana

harshavardhana commented 3 months ago

you need to configure TLS on MinIO and TLS at sidekick and send a bunch of requests to sidekick using warp put

jiuker commented 3 months ago

log.New(io.Discard, "", 0) minio do that.

harshavardhana commented 3 months ago

log.New(io.Discard, "", 0) minio do that.

that is exactly what we need :-)