Issue Details (XML | Word | Printable)

Key: HADOOP-3434
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Steve Loughran
Reporter: Steve Loughran
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

Retain cause of bind failure in Server.bind

Created: 21/May/08 11:19 PM   Updated: 08/Jul/09 04:43 PM
Component/s: None
Affects Version/s: 0.18.0
Fix Version/s: 0.18.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works hadoop-3434.patch 2008-05-21 11:26 PM Steve Loughran 0.8 kB

Hadoop Flags: Reviewed
Resolution Date: 30/May/08 12:51 AM


 Description  « Hide
When a datanode can't start listening on a port, there's no explanation why; the message/stack is lost:

Caused by: java.net.BindException: Problem binding to localhost/127.0.0.1:8022
at org.apache.hadoop.ipc.Server.bind(Server.java:168)
at org.apache.hadoop.dfs.DataNode.startDataNode(DataNode.java:279)
at org.apache.hadoop.dfs.DataNode.(DataNode.java:185)
at org.apache.hadoop.dfs.ExtDataNode.(ExtDataNode.java:55)
at org.smartfrog.services.hadoop.components.datanode.DatanodeImpl.sfStart(DatanodeImpl.java:60)



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Steve Loughran added a comment - 21/May/08 11:26 PM
patch the file to retain the exception text and trace

Steve Loughran added a comment - 21/May/08 11:29 PM
The patch changes the output to :

Caused by: java.net.BindException: Problem binding to localhost/127.0.0.1:8022 : Address already in use
at org.apache.hadoop.ipc.Server.bind(Server.java:168)
at org.apache.hadoop.dfs.DataNode.startDataNode(DataNode.java:279)
at org.apache.hadoop.dfs.DataNode.(DataNode.java:185)
at org.apache.hadoop.dfs.ExtDataNode.(ExtDataNode.java:55)
at org.smartfrog.services.hadoop.components.datanode.DatanodeImpl.sfStart(DatanodeImpl.java:60)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.apache.hadoop.ipc.Server.bind(Server.java:166)

I havent supplied a test; you'd need to bring up two data nodes listening on the same port to test it. I could add a test for this in my project.


Steve Loughran added a comment - 21/May/08 11:33 PM
retains the underlying cause for a bind failure during name node startup

Lohit Vijayarenu added a comment - 22/May/08 06:09 PM
+1 Looks good.

Chris Douglas added a comment - 30/May/08 12:51 AM
I just committed this. Thanks, Steve

Hudson added a comment - 01/Jun/08 01:49 PM