Have the issue resolved. In this case the hostname of my machine is configured 
to a public domain resolved to the EC2 machine's public IP. It's not allowed to 
bind to an elastic IP. I changed the hostnames to Amazon's private hostname 
(ip-72-xxx-xxx) then it works.


________________________________
From: Steve Loughran <[email protected]>
Sent: Saturday, October 24, 2015 5:15 AM
To: Lin Zhao
Cc: [email protected]
Subject: Re: "Failed to bind to" error with spark-shell on CDH5 and YARN


On 24 Oct 2015, at 00:46, Lin Zhao <[email protected]<mailto:[email protected]>> 
wrote:

I have a spark on YARN deployed using Cloudera Manager 5.4. The installation 
went smoothly. But when I try to run spark-shell I get a long list of 
exceptions saying "failed to bind to: /public_ip_of_host:0" and "Service 
'sparkDriver' could not bind on port 0. Attempting port 1.".

Any idea why spark-shell tries to bind to port 0 and 1? And it doesn't seem 
right to trying to bind to the public ip of the host. I tried "nc -l" on the 
host and it won't work.



"0" means any free port. If a service cannot bind to port 0, you are in 
trouble, Usually with the IP address being wrong

https://wiki.apache.org/hadoop/UnsetHostnameOrPort

Reply via email to