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

Consider logging new HTTP connections with DEBUG or lower level #11196

Closed
andersenleo opened this issue Aug 23, 2017 · 5 comments
Closed

Consider logging new HTTP connections with DEBUG or lower level #11196

andersenleo opened this issue Aug 23, 2017 · 5 comments

Comments

@andersenleo
Copy link

@andersenleo andersenleo commented Aug 23, 2017

We're using a custom Hazelcast Discovery Strategy for Hashicorp Consul. We register a health-check with Consul to monitor available nodes - this healthcheck hits the Hazelcast REST endpoint repeatedly.

This results in a lot of

2017-08-23 07:05:24,996 [hz.account.IO.thread-Acceptor] INFO  c.h.nio.tcp.SocketAcceptorThread   - [10.132.0.13]:35503 [cluster-name] [3.7.3] Accepting socket connection from /10.132.0.13:43282

entries in our log.

Is there a specific reason to log new connections at INFO level, or could this changed to a lower logging level?

@mmedenjak mmedenjak added this to the 3.9 milestone Aug 23, 2017
@mdogan
Copy link
Contributor

@mdogan mdogan commented Aug 24, 2017

You can set default logging level of c.h.nio.tcp.SocketAcceptorThread to a higher level to suppress new connection logs. For example in log4j2;

<Logger name="com.hazelcast.nio.tcp.SocketAcceptorThread" level="warning" />
@andersenleo
Copy link
Author

@andersenleo andersenleo commented Aug 24, 2017

That is the work-around we're applying now. However, we've got ~50 microservices with individual logback configurations and would obviously like to avoid patching them all.

Not a big deal, but if there is no explicit reason for logging with INFO it'd make sense to change it in Hazelcast.

@jerrinot
Copy link
Contributor

@jerrinot jerrinot commented Aug 30, 2017

The reason for a rather verbose logging here is in a regular member-to-member communication connections are created/closed rarely.

Logging this at the INFO level massively helps during troubleshooting. Could you configure Consul to open a single connection and re-using it for health checks whenever possible?

I am moving this ticket to 3.9.1 as this is not a release blocker.

@jerrinot jerrinot modified the milestones: 3.9.1, 3.9 Aug 30, 2017
@andersenleo
Copy link
Author

@andersenleo andersenleo commented Aug 30, 2017

Unfortunately there's no way to configure Consul to re-use connections for health checks.

We will have to modify our logging configurations until a future release.

@mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Sep 27, 2017

Duplicate of #10924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.