Enchance log of node ping failure.
@@ -881,8 +881,6 @@ class ServerImpl extends TcpDiscoveryImpl {
if (addr.isUnresolved())
addr = new InetSocketAddress(InetAddress.getByName(addr.getHostName()), addr.getPort());
- long tsNanos = System.nanoTime();
-
sock = spi.createSocket();
fut.sock = sock;
@@ -912,9 +910,8 @@ class ServerImpl extends TcpDiscoveryImpl {
}
catch (IOException | IgniteCheckedException e) {
if (nodeId != null && !nodeAlive(nodeId)) {
- if (log.isDebugEnabled())
- log.debug("Failed to ping the node (has left or leaving topology): [nodeId=" + nodeId +
- ']');
+ log.warning("Failed to ping node [nodeId=" + nodeId + "]. Node has left or is " +
+ "leaving topology. Cause: " + e.getMessage());
fut.onDone((IgniteBiTuple<UUID, Boolean>)null);
@@ -928,17 +925,29 @@ class ServerImpl extends TcpDiscoveryImpl {
reconCnt++;
- if (!openedSock && reconCnt == 2)
+ if (!openedSock && reconCnt == 2) {
+ log.warning("Failed to ping node [nodeId=" + nodeId + "]. Was unable to open the " +
+ "socket at all. Cause: " + e.getMessage());
+
break;
+ }
+
+ if (spi.failureDetectionTimeoutEnabled() && timeoutHelper.checkFailureTimeoutReached(e)) {
+ log.warning("Failed to ping node [nodeId=" + nodeId + "]. Reached the timeout " +
+ spi.failureDetectionTimeout() + "ms. Cause: " + e.getMessage());
- if (spi.failureDetectionTimeoutEnabled() && timeoutHelper.checkFailureTimeoutReached(e))
break;
- else if (!spi.failureDetectionTimeoutEnabled() && reconCnt == spi.getReconnectCount())
+ }
+ else if (!spi.failureDetectionTimeoutEnabled() && reconCnt == spi.getReconnectCount()) {
+ log.warning("Failed to ping node [nodeId=" + nodeId + "]. Reached the reconnection " +
+ "count " + spi.getReconnectCount() + ". Cause: " + e.getMessage());
+
break;
+ }
if (spi.isNodeStopping0()) {
- if (log.isDebugEnabled())
- log.debug("Stop pinging node, because node is stopping: [rmtNodeId=" + nodeId + ']');
+ log.warning("Failed to ping node [nodeId=" + nodeId + "]. Current node is " +
+ "stopping. Cause: " + e.getMessage());
break;
}
