smiklosovic commented on code in PR #3978:
URL: https://github.com/apache/cassandra/pull/3978#discussion_r1993583023


##########
src/java/org/apache/cassandra/net/InboundConnectionInitiator.java:
##########
@@ -396,6 +400,8 @@ private void exceptionCaught(Channel channel, Throwable 
cause)
 
             if (reportingExclusion)
                 logger.debug("Excluding internode exception for {}; address 
contained in internode_error_reporting_exclusions", remoteAddress, cause);
+            else if (cause != null && cause.getCause() != null && 
cause.getCause() instanceof Message.InvalidLegacyProtocolMagic && 
DatabaseDescriptor.getInvalidLegacyProtocolMagicNoSpamEnabled())
+                noSpam5m.warn("Failed to properly handshake with peer " + 
((InetSocketAddress) channel.remoteAddress()).getHostName() + ". Closing the 
channel. Invalid legacy protocol magic. {}", cause.getMessage());

Review Comment:
   Notice I am logging just a hostname without port. The port is always 
different / random (tests suggest that). If we included port as well, then it 
would look like that message is not repeating as it would be unique every time 
(because port is different every time).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to