You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by 姜晓东 <jx...@gmail.com> on 2011/01/13 04:40:15 UTC

SecondaryNameNode reports "Address Already in use"

Hi,all,
  
*I have created a hadoop cluster on 2 hosts. When i enter "start-dfs.sh"
on namenode host, the console shows this log:*
------------------------
starting namenode, logging to
/usr/local/hadoop-0.20.2/bin/../logs/hadoop-root-namenode-jiangxd-pc.out
localhost: starting datanode, logging to
/usr/local/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-jiangxd-pc.out
dev1: starting datanode, logging to
/usr/local/hadoop-0.20.2/bin/../logs/hadoop-root-datanode-sec-dev1.dev.sd.aliyun.com.out
localhost: starting secondarynamenode, logging to
/usr/local/hadoop-0.20.2/bin/../logs/hadoop-root-secondarynamenode-jiangxd-pc.out
localhost: Exception in thread "main" java.net.BindException: Address
already in use
localhost:     at sun.nio.ch.Net.bind(Native Method)
localhost:     at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
localhost:     at
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
localhost:     at
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
localhost:     at
org.apache.hadoop.http.HttpServer.start(HttpServer.java:425)
localhost:     at
org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:165)
localhost:     at
org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:115)
localhost:     at
org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:469)
--------------------------

*My configuration file is as following:*
--------------------------
jiangxd-pc conf # cat core-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
    <name>fs.default.name</name>
    <value>hdfs://localhost</value>
</property>

</configuration>
jiangxd-pc conf # cat mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
        <name>mapred.job.tracker</name>
        <value>localhost:8001</value>
</property>

</configuration>

--------------------------

Anyone help me?



Re: SecondaryNameNode reports "Address Already in use"

Posted by 姜晓东 <jx...@gmail.com>.
Thanks. I think this problem have been solved. The 50090 port has been
bind by other application

I add several lines in hdfs-site.xml as following:

<configuration>
<property>
  <name>dfs.secondary.http.address</name>
  <value>0.0.0.0:8002</value>
</property>
</configuration>


On 01/13/11 21:55, rahul patodi wrote:
> Hi,
> The error you are getting is due to your port is not free please check
> it as Harsh told.
> Another problem is with your configuration file
> if you setup hadoop cluster then there should not be localhost.
> you files should look like:
>
> core-site.xml
>
> <property>
>   <name>fs.default.name <http://fs.default.name></name>
>   <value>hdfs://master:54310</value>
>  </property>
>
> mapred-site.xml
>
> <property>
>   <name>mapred.job.tracker</name>
>   <value>master:54311</value>
>  </property>
>
> hdfs-site.xml
>
> <property>
>   <name>dfs.replication</name>
>   <value>2</value>
>  </property>
> you can
> visit http://hadoop-tutorial.blogspot.com/2010/11/running-hadoop-in-distributed-mode.html
>
> -- 
> *Regards*,
> Rahul Patodi
> Software Engineer,
> Impetus Infotech (India) Pvt Ltd,
> www.impetus.com <http://www.impetus.com>
> Mob:09907074413


Re: SecondaryNameNode reports "Address Already in use"

Posted by rahul patodi <pa...@gmail.com>.
Hi,
The error you are getting is due to your port is not free please check it as
Harsh told.
Another problem is with your configuration file
if you setup hadoop cluster then there should not be localhost.
you files should look like:

core-site.xml

<property>
  <name>fs.default.name</name>
  <value>hdfs://master:54310</value>
 </property>

mapred-site.xml

<property>
  <name>mapred.job.tracker</name>
  <value>master:54311</value>
 </property>

hdfs-site.xml

<property>
  <name>dfs.replication</name>
  <value>2</value>
 </property>
you can visit
http://hadoop-tutorial.blogspot.com/2010/11/running-hadoop-in-distributed-mode.html

-- 
*Regards*,
Rahul Patodi
Software Engineer,
Impetus Infotech (India) Pvt Ltd,
www.impetus.com
Mob:09907074413

Re: SecondaryNameNode reports "Address Already in use"

Posted by Harsh J <qw...@gmail.com>.
The SecondaryNameNode uses 50060 as it's HTTP server port. Check if
any other process is already using that port (tools like netstat can
help), and either make the identified service change port/die or
change the secondary namenode's http port number via the new config
property called "dfs.namenode.secondary.http-address" (Was:
dfs.secondary.http.address) to a different number.

-- 
Harsh J
www.harshj.com