Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E75D810BFC for ; Wed, 26 Jun 2013 20:54:15 +0000 (UTC) Received: (qmail 45277 invoked by uid 500); 26 Jun 2013 20:54:11 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 45140 invoked by uid 500); 26 Jun 2013 20:54:11 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 45133 invoked by uid 99); 26 Jun 2013 20:54:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 20:54:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.124.192.216] (HELO smtp.2020smtp.net) (212.124.192.216) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jun 2013 20:54:05 +0000 Received: from [86.11.111.188] (helo=[192.168.1.115]) by smtp.2020smtp.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1Urwil-0007jg-OP for user@hadoop.apache.org; Wed, 26 Jun 2013 21:53:43 +0100 From: Robin East Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Exception in createBlockOutputStream - poss firewall issue Message-Id: <025DE510-39DF-4562-8F93-4E0ED7D77FFF@xense.co.uk> Date: Wed, 26 Jun 2013 21:53:45 +0100 To: user@hadoop.apache.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-Mailer: Apple Mail (2.1508) X-2020-Relay: Sent using 2020MEDIA.net.uk relay with auth code: xense Send Abuse reports to abuse@2020media.net.uk X-Virus-Checked: Checked by ClamAV on apache.org 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.=20 The java code looks like this (using hadoop 1.1.2): private static void createHdfsFile() throws IOException { Configuration conf =3D new Configuration(); conf.set("fs.default.name", "hdfs://"+hdfsHost+":9000"); FileSystem hdfs =3D FileSystem.get(conf); System.out.println("HDFS Working Directory: " + = hdfs.getWorkingDirectory().toString()); FSDataOutputStream os =3D hdfs.create(new = Path("/user/hadoop/test2.txt")); =20 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(FSN= amesystem.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(DelegatingMethodAccessorIm= pl.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) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at = org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.= java:1121) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382) at org.apache.hadoop.ipc.Client.call(Client.java:1107) at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229) at $Proxy1.addBlock(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown = Source) at java.lang.reflect.Method.invoke(Unknown Source) at = org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvoca= tionHandler.java:85) at = org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHa= ndler.java:62) at $Proxy1.addBlock(Unknown Source) at = org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.locateFollowingBlock(DFSC= lient.java:3686) at = org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFS= Client.java:3546) at = org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2600(DFSClient.jav= a:2749) at = org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClien= t.java:2989)