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/unix input: Stop accepting connections after socket is closed #29712
tcp/unix input: Stop accepting connections after socket is closed #29712
Conversation
5acaf12
to
ec60086
Compare
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Looks like I broke some system tests that look for particular log messages. |
This pull request is now in conflicts. Could you fix it? 🙏
|
Stop accepting connections after tcp/unix socket is closed. This will suppress debug messages for net.ErrClosed. 2021-12-22T13:49:04.151Z INFO [tcp] streaming/listener.go:172 StoppingTCPserver {"address": "0.0.0.0:7000"} 2021-12-22T13:49:04.151Z DEBUG [tcp] streaming/listener.go:129 Can not accept the connection {"address": "0.0.0.0:7000", "error": "accept tcp [::]:7000: use of closed network connection"}
b570394
to
0563606
Compare
/test |
This pull request is now in conflicts. Could you fix it? 🙏
|
/test |
This pull request is now in conflicts. Could you fix it? 🙏
|
/test |
This pull request is now in conflicts. Could you fix it? 🙏
|
7a49dd3
to
f288aed
Compare
…-err-closed-tcp-input
…9712) Stop accepting connections after tcp/unix socket is closed. This will suppress debug messages for net.ErrClosed. 2021-12-22T13:49:04.151Z INFO [tcp] streaming/listener.go:172 StoppingTCPserver {"address": "0.0.0.0:7000"} 2021-12-22T13:49:04.151Z DEBUG [tcp] streaming/listener.go:129 Can not accept the connection {"address": "0.0.0.0:7000", "error": "accept tcp [::]:7000: use of closed network connection"} (cherry picked from commit 8c79b67)
…9712) (#30221) Stop accepting connections after tcp/unix socket is closed. This will suppress debug messages for net.ErrClosed. 2021-12-22T13:49:04.151Z INFO [tcp] streaming/listener.go:172 StoppingTCPserver {"address": "0.0.0.0:7000"} 2021-12-22T13:49:04.151Z DEBUG [tcp] streaming/listener.go:129 Can not accept the connection {"address": "0.0.0.0:7000", "error": "accept tcp [::]:7000: use of closed network connection"} (cherry picked from commit 8c79b67) Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
What does this PR do?
Stop accepting connections after tcp/unix socket is closed. This will suppress debug messages for net.ErrClosed.
Why is it important?
This makes the shutdown process a little bit cleaning from a logging perspective.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Logs
Sample log output of a starting, accepting a connection, disconnecting, and shutting down.