Home | About | Sematext search-lucene.com search-hadoop.com
 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
Dunno on top of my head if its present in your version (grep sources
perhaps), but there are properties dfs.client.use.datanode.hostname,
dfs.datanode.use.datanode.hostname, dfs.datanode.dns.interface and
dfs.client.local.interfaces available to tune something on this layer.
See http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml
for their description (page is 2.x release hdfs-defaults).

On Wed, Jul 3, 2013 at 1:38 AM, Robin East <[EMAIL PROTECTED]> wrote:
> 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)

Harsh J