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

Jakob Homan commented on HADOOP-5626:
-------------------------------------

bq. For now, I think making some small concrete steps is the best route. 
History has shown that it's difficult (and takes a lot of time) to get larger 
sweeping changes through the development pipeline, so we should work towards 
some small achievable goals while planning out the better solution.

Service location issues are certainly worth looking at and you're right that 
HADOOP-4383 is a good place to start.  My comment dealt with your specific 
patch, which as it stands, is introducing a bit of code duplication in terms of 
resolving the full hostname of the backup node and secondary namenode.  I'd 
recommend updating your patch to avoid this by utilizing the net utils package 
as a repository of this rather generic function.  No need to introduce two ways 
of doing the same thing. :)

> SecondaryNamenode may report incorrect info host name
> -----------------------------------------------------
>
>                 Key: HADOOP-5626
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5626
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>            Reporter: Carlos Valiente
>            Assignee: Todd Lipcon
>            Priority: Minor
>             Fix For: 0.21.0
>
>         Attachments: HADOOP-5626.patch, hadoop-5626.txt
>
>
> I have set up {{dfs.secondary.http.address}} like this:
> {code}
> <property>
>   <name>dfs.secondary.http.address</name>
>   <value>secondary.example.com:50090</value>
> </property>
> {code}
> In my setup {{secondary.example.com}} resolves to an IP address (say, 
> 192.168.0.10) which is not the same as the host's name (as returned by 
> {{InetAddress.getLocalHost().getHostAddress()}}, say 192.168.0.1).
> In this situation, edit log related transfers fail. From the namenode log:
> {code}
> 2009-04-05 13:32:39,128 INFO 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Roll Edit Log from 
> 192.168.0.10
> 2009-04-05 13:32:39,168 WARN org.mortbay.log: /getimage: java.io.IOException: 
> GetImage failed. java.net.ConnectException: Connection refused
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:306)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:323)
>         at 
> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:837)
>         at 
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778)
>         at 
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703)
>         at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1026)
>         at 
> org.apache.hadoop.hdfs.server.namenode.TransferFsImage.getFileClient(TransferFsImage.java:151)
>         ...
> {code}
> From the secondary namenode log:
> {code}
> 2009-04-05 13:42:39,238 ERROR 
> org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: Exception in 
> doCheckpoint: 
> 2009-04-05 13:42:39,238 ERROR 
> org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode: 
> java.io.FileNotFoundException: 
> http://nn.example.com:50070/getimage?putimage=1&port=50090&machine=
> 192.168.0.1&token=-19:1243068779:0:1238929357000:1238929031783
>         at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1288)
>         at 
> org.apache.hadoop.hdfs.server.namenode.TransferFsImage.getFileClient(TransferFsImage.java:151)
>         at 
> org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.putFSImage(SecondaryNameNode.java:294)
>         at 
> org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.doCheckpoint(SecondaryNameNode.java:333)
>         at 
> org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.run(SecondaryNameNode.java:239)
>         at java.lang.Thread.run(Thread.java:619)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to