[ 
https://issues.apache.org/jira/browse/HADOOP-18628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17687938#comment-17687938
 ] 

ASF GitHub Bot commented on HADOOP-18628:
-----------------------------------------

steveloughran commented on code in PR #5385:
URL: https://github.com/apache/hadoop/pull/5385#discussion_r1104483880


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java:
##########
@@ -2033,8 +2034,12 @@ public Connection(SocketChannel channel, long 
lastContact,
       this.isOnAuxiliaryPort = isOnAuxiliaryPort;
       if (addr == null) {
         this.hostAddress = "*Unknown*";
+        this.hostName = this.hostAddress;

Review Comment:
   use NetUtils.getHostNameOfIP() and similar for all this. gives us one point 
of maintenance, testing, upgrading to ipv6 etc





> Server connection should log host name before returning VersionMismatch error
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-18628
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18628
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>
> In env with dynamically changing IP addresses, debugging issue with the logs 
> with only IP address becomes a bit difficult at times.
> {code:java}
> 2023-02-08 23:26:50,112 WARN  [Socket Reader #1 for port 8485] ipc.Server - 
> Incorrect RPC Header length from {IPV4}:36556 expected length: 
> java.nio.HeapByteBuffer[pos=0 lim=4 cap=4] got length: 
> java.nio.HeapByteBuffer[pos=0 lim=4 cap=4] {code}
> It would be better to log full hostname for the given IP address rather than 
> only IP address.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to