You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Harsh J <ha...@cloudera.com> on 2012/01/02 08:24:45 UTC

Re: Remote access to namenode is not allowed despite the services are already started.

Woraphol,

Yes you'd need to tweak some settings in your VMs such that they allow
remote connections. Could also be a firewall running inside of your
NameNode instance preventing this. Once you get the telnet working
after troubleshooting your network settings (I don't know the bullseye
spot here, sorry), it should be fine after-on.

2012/1/1 �þ� ਹ�Ԩ�ѭ侺���� <s4...@hotmail.com>:
>
> Dear all,
> � I successfully installed and run Hadoop on a single machine whose ip is 192.168.1.109 (In fact it is actually an Ubuntu instance running on virtual box ) . When typing jps it shows2473 DataNode2765 TaskTracker3373 Jps2361 NameNode2588 SecondaryNameNode2655 JobTracker
> �This should mean that the hadoop is up and running.Running commands like ./hadoop fs -ls is fine and produces the expected result.
> But If I try to connect it from my windows box whose ip is 192.168.1.80 by writingJava code's HDFS API to connect it as follows: Configuration conf = new Configuration();FileSystem hdfs = null;Path filenamePath = new Path(FILE_NAME);
> hdfs = FileSystem.get(conf); <-- the problem occurred at this line
> when I run the code, the error displayed as follows:
> 11/12/07 20:37:24 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 0 time(s).11/12/07 20:37:26 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 1 time(s).11/12/07 20:37:28 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 2 time(s).11/12/07 20:37:30 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 3 time(s).11/12/07 20:37:32 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 4 time(s).11/12/07 20:37:33 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 5 time(s).11/12/07 20:37:35 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 6 time(s).11/12/07 20:37:37 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 7 time(s).11/12/07 20:37:39 INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 8 time(s).11/12/07 20:37:41
> �INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already tried 9 time(s).java.net.ConnectException: Call to /192.168.1.109:9000 failed on �connection exception: java.net.ConnectException: Connection refused: no further information � � � �To make sure if the socket is already opened and waits for the incoming connections on the hadoop serer, I netstat on the ubuntu boxthe result shows as follows:
>
> tcp � � � �0 � � �0 localhost:51201 � � � � *:* � � � � � � � � � � LISTEN � � �2765/java � � � tcp � � � �0 � � �0 *:50020 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2473/java � � � tcp � � � �0 � � �0 localhost:9000 � � � � �*:* � � � � � � � � � � LISTEN � � �2361/java � � � tcp � � � �0 � � �0 localhost:9001 � � � � �*:* � � � � � � � � � � LISTEN � � �2655/java � � � tcp � � � �0 � � �0 *:mysql � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:50090 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2588/java � � � tcp � � � �0 � � �0 *:11211 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:40843 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2473/java � � � tcp � � � �0 � � �0 *:58699 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:50060 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2765/java � � � tcp � � � �0 � � �0 *:50030
> � � � � � � � *:* � � � � � � � � � � LISTEN � � �2655/java � � � tcp � � � �0 � � �0 *:53966 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2655/java � � � tcp � � � �0 � � �0 *:www � � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:epmd � � � � � � � � �*:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:55826 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2588/java � � � tcp � � � �0 � � �0 *:ftp � � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:50070 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2361/java � � � tcp � � � �0 � � �0 *:52822 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2361/java � � � tcp � � � �0 � � �0 *:ssh � � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:55672 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �- � � � � � � � tcp � � � �0 � � �0 *:50010 � � � � � � � � *:*
> � � � � �LISTEN � � �2473/java � � � tcp � � � �0 � � �0 *:50075 � � � � � � � � *:* � � � � � � � � � � LISTEN � � �2473/java
> I noticed that if the local address column is something like localhost:9000 (starts with localhost: not *:)It will not be able to be connected from remote host or even in it own box in some case.I tried telnet localhost 9000 �it works, I means it can connect to the port but If I use telnet 192.168.1.109 9000The errors displays like
> $ telnet 192.168.1.109 9000Trying 192.168.1.109...telnet: Unable to connect to remote host: Connection refused
> I have spent almost a week figuring out the issue I am really exhausted now and I hope someone can help me.
> Note: I am not sure if namenode by default refuses remote connection. Do I need to change some settings in order for it to allowremote connections?
> Best regards,Woraphol
>
>



-- 
Harsh J

Re: Remote access to namenode is not allowed despite the services are already started.

Posted by Praveen Sripati <pr...@gmail.com>.
Changing the VM settings won't help.

Change the value of fs.default.name to hdfs://106.77.211.187:9000 from
hdfs://localhost:9000 in core-site.xml for both the client and the
NameNode. Replace the IP address with the IP address of the node on which
the NameNode is running or with the hostname.

Praveen

2012/1/2 Harsh J <ha...@cloudera.com>

> Woraphol,
>
> Yes you'd need to tweak some settings in your VMs such that they allow
> remote connections. Could also be a firewall running inside of your
> NameNode instance preventing this. Once you get the telnet working
> after troubleshooting your network settings (I don't know the bullseye
> spot here, sorry), it should be fine after-on.
>
> 2012/1/1 วรพล เจนกิจธัญไพบูลย์ <s4...@hotmail.com>:
> >
> > Dear all,
> >   I successfully installed and run Hadoop on a single machine whose ip
> is 192.168.1.109 (In fact it is actually an Ubuntu instance running on
> virtual box ) . When typing jps it shows2473 DataNode2765 TaskTracker3373
> Jps2361 NameNode2588 SecondaryNameNode2655 JobTracker
> >  This should mean that the hadoop is up and running.Running commands
> like ./hadoop fs -ls is fine and produces the expected result.
> > But If I try to connect it from my windows box whose ip is 192.168.1.80
> by writingJava code's HDFS API to connect it as follows: Configuration conf
> = new Configuration();FileSystem hdfs = null;Path filenamePath = new
> Path(FILE_NAME);
> > hdfs = FileSystem.get(conf); <-- the problem occurred at this line
> > when I run the code, the error displayed as follows:
> > 11/12/07 20:37:24 INFO ipc.Client: Retrying connect to server: /
> 192.168.1.109:9000. Already tried 0 time(s).11/12/07 20:37:26 INFO
> ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already
> tried 1 time(s).11/12/07 20:37:28 INFO ipc.Client: Retrying connect to
> server: /192.168.1.109:9000. Already tried 2 time(s).11/12/07 20:37:30
> INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already
> tried 3 time(s).11/12/07 20:37:32 INFO ipc.Client: Retrying connect to
> server: /192.168.1.109:9000. Already tried 4 time(s).11/12/07 20:37:33
> INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already
> tried 5 time(s).11/12/07 20:37:35 INFO ipc.Client: Retrying connect to
> server: /192.168.1.109:9000. Already tried 6 time(s).11/12/07 20:37:37
> INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000. Already
> tried 7 time(s).11/12/07 20:37:39 INFO ipc.Client: Retrying connect to
> server: /192.168.1.109:9000. Already tried 8 time(s).11/12/07 20:37:41
> >  INFO ipc.Client: Retrying connect to server: /192.168.1.109:9000.
> Already tried 9 time(s).java.net.ConnectException: Call to /
> 192.168.1.109:9000 failed on  connection exception:
> java.net.ConnectException: Connection refused: no further information
>  To make sure if the socket is already opened and waits for the incoming
> connections on the hadoop serer, I netstat on the ubuntu boxthe result
> shows as follows:
> >
> > tcp        0      0 localhost:51201         *:*
> LISTEN      2765/java       tcp        0      0 *:50020                 *:*
>                     LISTEN      2473/java       tcp        0      0
> localhost:9000          *:*                     LISTEN      2361/java
> tcp        0      0 localhost:9001          *:*                     LISTEN
>      2655/java       tcp        0      0 *:mysql                 *:*
>               LISTEN      -               tcp        0      0 *:50090
>           *:*                     LISTEN      2588/java       tcp        0
>      0 *:11211                 *:*                     LISTEN      -
>         tcp        0      0 *:40843                 *:*
> LISTEN      2473/java       tcp        0      0 *:58699                 *:*
>                     LISTEN      -               tcp        0      0 *:50060
>                 *:*                     LISTEN      2765/java       tcp
>    0      0 *:50030
> >               *:*                     LISTEN      2655/java       tcp
>      0      0 *:53966                 *:*                     LISTEN
>  2655/java       tcp        0      0 *:www                   *:*
>           LISTEN      -               tcp        0      0 *:epmd
>        *:*                     LISTEN      -               tcp        0
>  0 *:55826                 *:*                     LISTEN      2588/java
>     tcp        0      0 *:ftp                   *:*
> LISTEN      -               tcp        0      0 *:50070                 *:*
>                     LISTEN      2361/java       tcp        0      0 *:52822
>                 *:*                     LISTEN      2361/java       tcp
>    0      0 *:ssh                   *:*                     LISTEN      -
>             tcp        0      0 *:55672                 *:*
>     LISTEN      -               tcp        0      0 *:50010
> *:*
> >          LISTEN      2473/java       tcp        0      0 *:50075
>         *:*                     LISTEN      2473/java
> > I noticed that if the local address column is something like
> localhost:9000 (starts with localhost: not *:)It will not be able to be
> connected from remote host or even in it own box in some case.I tried
> telnet localhost 9000  it works, I means it can connect to the port but If
> I use telnet 192.168.1.109 9000The errors displays like
> > $ telnet 192.168.1.109 9000Trying 192.168.1.109...telnet: Unable to
> connect to remote host: Connection refused
> > I have spent almost a week figuring out the issue I am really exhausted
> now and I hope someone can help me.
> > Note: I am not sure if namenode by default refuses remote connection. Do
> I need to change some settings in order for it to allowremote connections?
> > Best regards,Woraphol
> >
> >
>
>
>
> --
> Harsh J
>