You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug:
When GoAlert's SMTP server handled AWS Load Balancer health checks, a lot of unnecessary log entires are being generated. These health checks are simply establishing a TCP connection, without sending any data or receiving SMTP protocol greeting, resulting in unnecessary log entries. In addition, these entries are not using the structured logging library.
Steps to Reproduce:
Start the SMTP server to listen on localhost:9025
Issue nc -vz localhost 9025 in a terminal
Observe the log entries
Specifically, this can be seen in an environment similar to Kubernetes hosted on AWS. Error messages like handler error: read tcp 127.0.0.1:9025->127.0.0.1:55372: read: connection reset by peer can be seen.
Expected Behavior:
There should be no log entries for health checks (TCP connection with no data to the SMTP port) and when errors do occur they should go through the normal GoAlert logger. The logging should be minimal and only pertinent entries should be there.
Observed Behavior:
Non-essential log entries are being created due to AWS Load Balancer health checks which aren't utilizing structured logging. Additionally, the logs get spammed with these non-essential entries at regular intervals.
Application Version:
This bug is present in GoAlert version 0.31.1 and latest (master).
Additional Context: emersion/go-smtp#236 for this already exists in the go-smtp project repository as the root cause seems to be the handling of the TCP health checks at that level. But for GoAlert's perspective, it's causing unnecessary log noise and it does not adhere to the structured logging mechanism, which needs to be addressed.
The text was updated successfully, but these errors were encountered:
* allow passing Logger instance in config
* pass main app logger to smtp config
* implement smtp.Logger in smtpsrv to make logs go through app.cfg.Logger #3335
* filter out TCP ECONNRESET error messages
* early return instead of negation; add TODO
---------
Co-authored-by: Jordan Nimlos <[email protected]>
Describe the Bug:
When GoAlert's SMTP server handled AWS Load Balancer health checks, a lot of unnecessary log entires are being generated. These health checks are simply establishing a TCP connection, without sending any data or receiving SMTP protocol greeting, resulting in unnecessary log entries. In addition, these entries are not using the structured logging library.
Steps to Reproduce:
nc -vz localhost 9025
in a terminalSpecifically, this can be seen in an environment similar to Kubernetes hosted on AWS. Error messages like
handler error: read tcp 127.0.0.1:9025->127.0.0.1:55372: read: connection reset by peer
can be seen.Expected Behavior:
There should be no log entries for health checks (TCP connection with no data to the SMTP port) and when errors do occur they should go through the normal GoAlert logger. The logging should be minimal and only pertinent entries should be there.
Observed Behavior:
Non-essential log entries are being created due to AWS Load Balancer health checks which aren't utilizing structured logging. Additionally, the logs get spammed with these non-essential entries at regular intervals.
Application Version:
This bug is present in GoAlert version 0.31.1 and latest (master).
Additional Context:
emersion/go-smtp#236 for this already exists in the go-smtp project repository as the root cause seems to be the handling of the TCP health checks at that level. But for GoAlert's perspective, it's causing unnecessary log noise and it does not adhere to the structured logging mechanism, which needs to be addressed.
The text was updated successfully, but these errors were encountered: