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

Best way to remotely validate hazelcast on a given port is functioning/available #7381

Closed
bitsofinfo opened this issue Jan 21, 2016 · 3 comments
Labels
Source: Community PR or issue was opened by a community user Type: Enhancement

Comments

@bitsofinfo
Copy link

Hi,
Continuing to work on this discovery strategy for consul: https://github.com/bitsofinfo/hazelcast-consul-discovery-spi

With consul you can register health checks, in the form of a small script. For hazelcast I am currently just doing the following port checks like exec 6<>/dev/tcp/#HAZELCAST_IP/#PORT || (exit 3)

This works fine in detecting if a given HZ instance is "up" (at least as the port is concerned), however in the hazelcast logs on the instance being checked, I see these kinds of errors/warnings.

Is there a better way to do this kind of checking (that could be done via a script such as the above), or a way to avoid HZ logging these connections, with no obvious compliance to the HZ gossip/cluster protocol?

Nov 20, 2015 6:57:50 PM com.hazelcast.nio.tcp.SocketAcceptorThread
INFO: [192.168.0.208]:5701 [hazelcast-consul-discovery] [3.6-RC1] Accepting socket connection from /192.168.0.208:53495
Nov 20, 2015 6:57:50 PM com.hazelcast.nio.tcp.TcpIpConnectionManager
INFO: [192.168.0.208]:5701 [hazelcast-consul-discovery] [3.6-RC1] Established socket connection between /192.168.0.208:5701 and /192.168.0.208:53495
Nov 20, 2015 6:57:50 PM com.hazelcast.nio.tcp.nonblocking.NonBlockingSocketWriter
WARNING: [192.168.0.208]:5701 [hazelcast-consul-discovery] [3.6-RC1] SocketWriter is not set, creating SocketWriter with CLUSTER protocol!
Nov 20, 2015 6:57:50 PM com.hazelcast.nio.tcp.TcpIpConnection
INFO: [192.168.0.208]:5701 [hazelcast-consul-discovery] [3.6-RC1] Connection [/192.168.0.208:53495] lost. Reason: java.io.EOFException[Could not read protocol type!]
@harish324
Copy link

@bitsofinfo Did you ever find a suitable health check?

@bitsofinfo
Copy link
Author

No, this is still outstanding. It would be nice if HZ exposed some way to indicate it is up, other than just a socket connect on this port (which results in that above output)

@mdogan
Copy link
Contributor

mdogan commented Jun 1, 2017

Since 3.8, Hazelcast provides health check via HTTP.

See #9284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Community PR or issue was opened by a community user Type: Enhancement
Projects
None yet
Development

No branches or pull requests

4 participants