Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HDFS >> mail # user >> Re: Exception in createBlockOutputStream - poss firewall issue


Copy link to this message
-
Re: Exception in createBlockOutputStream - poss firewall issue
Hi John, exactly what I was thinking, however I haven't found a way to do that. If I ever have time I'll trawl through the code, however I've managed to avoid the issue by placing both machines inside the firewall.

Regards
Robin

Sent from my iPhone

On 2 Jul 2013, at 19:48, John Lilley <[EMAIL PROTECTED]> wrote:

> I don’t know the answer… but if it is possible to make the DNs report a domain-name instead of an IP quad it may help.
> John
>  
>  
> From: Robin East [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 27, 2013 12:18 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Exception in createBlockOutputStream - poss firewall issue
>  
> Ok I should have added that external address of the cluster is NATed to the internal address. The internal address yyy.yyy.yyy.yyy is not a routable address for the client. The client can reach the namenode on xxx.xxx.xxx.xxx but I guess the data node must advertise itself using the internal address (yyy.yyy.yyy.yyy). What is the way round this ( not an uncommon problem in secure environments).
>  
> Robin
>
> Sent from my iPad
>
> On 27 Jun 2013, at 03:41, Harsh J <[EMAIL PROTECTED]> wrote:
>
> Clients will read/write data to the DNs directly. DNs serve on port 50010 and 50020 by default. Please open up these ports, aside of the NN's RPC ports, to be able to read/write data.
>  
>
> On Thu, Jun 27, 2013 at 2:23 AM, Robin East <[EMAIL PROTECTED]> wrote:
> I have a single node hadoop cluster setup behind a firewall and am trying to create files using a java program outside the firewall and get the exception below. The java program works fine inside the firewall. The ip address for the single cluster is xxx.xxx.xxx.xxx however it appears that in the createBlockOutputStream the client things the data node is at ip yyy.yyy.yyy.yyy (the internal address of the cluster) which is not accessible.
> The java code looks like this (using hadoop 1.1.2):
>
>     private static void createHdfsFile() throws IOException {
>         Configuration conf = new Configuration();
>         conf.set("fs.default.name", "hdfs://"+hdfsHost+":9000");
>         FileSystem hdfs = FileSystem.get(conf);
>         System.out.println("HDFS Working Directory: " + hdfs.getWorkingDirectory().toString());
>         FSDataOutputStream os = hdfs.create(new Path("/user/hadoop/test2.txt"));
>
>         os.writeChars("Example text\n for a hadoop write call\n\ntesting\n");
>         os.close();
>     }
>
> Any idea how I can get this to work?
>
>
> HDFS Working Directory: hdfs://xxx.xxx.xxx.xxx:9000/user/zzzzz
> Jun 26, 2013 8:08:52 PM org.apache.hadoop.hdfs.DFSClient$DFSOutputStream createBlockOutputStream
> INFO: Exception in createBlockOutputStream yyy.yyy.yyy.yyy:50010 java.net.ConnectException: Connection timed out: no furth
> er information
> Jun 26, 2013 8:08:52 PM org.apache.hadoop.hdfs.DFSClient$DFSOutputStream nextBlockOutputStream
> INFO: Abandoning block blk_4933973859208379842_1028
> Jun 26, 2013 8:08:53 PM org.apache.hadoop.hdfs.DFSClient$DFSOutputStream nextBlockOutputStream
> INFO: Excluding datanode yyy.yyy.yyy.yyy:50010
> Jun 26, 2013 8:08:53 PM org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer run
> WARNING: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/hadoop/test2.txt
>  could only be replicated to 0 nodes, instead of 1
>         at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1558)
>         at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:696)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
>         at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB