Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP healthchecks (SYN/FIN) cause noise in logs with TLS enabled #7421

Closed
benbuzbee opened this issue Mar 22, 2020 · 2 comments · Fixed by #7748
Closed

TCP healthchecks (SYN/FIN) cause noise in logs with TLS enabled #7421

benbuzbee opened this issue Mar 22, 2020 · 2 comments · Fixed by #7748

Comments

@benbuzbee
Copy link
Contributor

Nomad version

Nomad v0.10.3 (65af1b9ecff5b55a1dd6e10b8c3224f896d6c9fa

Operating system and Environment details

$ uname -a
Linux ip-192-168-69-193 4.15.0-1058-aws #60-Ubuntu SMP Wed Jan 15 22:35:20 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"

Issue

If TLS is enabled, then even with log_level = "WARN", nomad will log any time a TLS handshake fails.

This causes extreme noise in, for example, the case where we have a load balancer performing TCP healthchecks against nomad. In this case the TCP connection is closed after it is successfully established, and nomad logs an error. In our specific case, we are using an amazon network load balancer to load balance to API servers with TCP healthchecks so we do not need to configure the load balancer health checks to use mTLS and our logs are spammed like so:

Mar 22 22:56:01 ip-192-168-1-4 nomad[2606]:     2020/03/22 22:56:01.042365 http: TLS handshake error from 192.168.6.255:10068: EOF
Mar 22 22:56:02 ip-192-168-1-4 nomad[2606]:     2020/03/22 22:56:02.279376 http: TLS handshake error from 192.168.6.255:65209: EOF
Mar 22 22:56:04 ip-192-168-1-4 nomad[2606]:     2020/03/22 22:56:04.776674 http: TLS handshake error from 192.168.6.255:6788: EOF
Mar 22 22:56:05 ip-192-168-1-4 nomad[2606]:     2020/03/22 22:56:05.438893 http: TLS handshake error from 192.168.6.255:48011: EOF
Mar 22 22:56:05 ip-192-168-1-4 nomad[2606]:     2020/03/22 22:56:05.457150 http: TLS handshake error from 192.168.6.255:3633: EOF
Mar 22 22:56:05 ip-192-168-1-4 nomad[2606]:     2020/03/22 22:56:05.704746 http: TLS handshake error from 192.168.6.255:59939: EOF

Even with the least verbose log level we have this problem. At a minimum I feel like this shouldn't log on log level WARN (also it's not logging as json even though log_json=true.
Truthfully I feel like this shouldn't log at all - this is a common scenario, and also provides an extra easy way to dos nomad by causing it to log to disk like mad - but at least we should be able to not log EOF, or not log on WARN, to unblock this scenario.

@notnoop notnoop added this to Needs Triage in Nomad - Community Issues Triage via automation Mar 27, 2020
@notnoop notnoop moved this from Needs Triage to Triaged in Nomad - Community Issues Triage Mar 27, 2020
@notnoop
Copy link
Contributor

notnoop commented Mar 27, 2020

I agree, the logging seems unnecessary. We should downgrade these warnings to TRACE or DEBUG level if we decide to keep them.

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants