java - Unable to connect amazon ec2 hadoop instance from outside cluster -
i have setup amazon ec2 instance , installed hadoop-1.0.4 single node, started hadoop components, , working fine.
i tested hadoop cluster uploading file using hadoop command , working fine.
when accessing hadoop cluster through java code, getting following exception
failed on connection exception: java.net.connectexception: connection refused: no further information
/etc/hosts file
127.0.0.1 localhost 127.0.0.1 ec2-x.x.x.x.compute-1.amazonaws.com ip-x.x.x.x.ec2.internal
core-site.xml
<property> <name>fs.default.name</name> <value>hdfs://ec2-x.x.x.x.compute-1.amazonaws.com:54310</value> </property>
please me fix ?
complete print stack trace is
: call ec2-x.x.x.x.compute-1.amazonaws.com/x.x.x.x:54310 failed on connection exception: java.net.connectexception: connection refused: no further information @ org.apache.hadoop.ipc.client.wrapexception( client.java:1099) @ org.apache.hadoop.ipc.client.call( client.java:1075) @ org.apache.hadoop.ipc.rpc$invoker.invoke( rpc.java:225) @ $proxy7.getprotocolversion(unknown source) @ org.apache.hadoop.ipc.rpc.getproxy( rpc.java:396) @ org.apache.hadoop.ipc.rpc.getproxy( rpc.java:379) @ org.apache.hadoop.hdfs.dfsclient.createrpcnamenode( dfsclient.java:119) @ org.apache.hadoop.hdfs.dfsclient.<init>( dfsclient.java:238) @ org.apache.hadoop.hdfs.dfsclient.<init>( dfsclient.java:203) @ org.apache.hadoop.hdfs.distributedfilesystem.initialize( distributedfilesystem.java:89) @ org.apache.hadoop.fs.filesystem.createfilesystem( filesystem.java:1386) @ org.apache.hadoop.fs.filesystem.access$200( filesystem.java:66) @ org.apache.hadoop.fs.filesystem$cache.get( filesystem.java:1404) @ org.apache.hadoop.fs.filesystem.get( filesystem.java:254) @ org.apache.hadoop.fs.filesystem.get( filesystem.java:123) @ org.bigpeep.upload.custom.solrindexmapreduce.run( solrindexmapreduce.java:45) @ org.apache.hadoop.util.toolrunner.run( toolrunner.java:65) @ org.bigpeep.upload.dal.filedaoimpl.indexdoc( filedaoimpl.java:370) @ org.bigpeep.upload.service.fileserviceimpl.indexdocument( fileserviceimpl.java:96) @ org.bigpeep.upload.service.fileserviceimpltest.testuploadfile( fileserviceimpltest.java:48) @ sun.reflect.nativemethodaccessorimpl.invoke0( native method) @ sun.reflect.nativemethodaccessorimpl.invoke( nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke( delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke( method.java:597) @ org.junit.runners.model.frameworkmethod$1.runreflectivecall( frameworkmethod.java:44) @ org.junit.internal.runners.model.reflectivecallable.run( reflectivecallable.java:15) @ org.junit.runners.model.frameworkmethod.invokeexplosively( frameworkmethod.java:41) @ org.junit.internal.runners.statements.invokemethod.evaluate( invokemethod.java:20) @ org.junit.internal.runners.statements.runbefores.evaluate( runbefores.java:28) @ org.junit.internal.runners.statements.runafters.evaluate( runafters.java:31) @ org.junit.runners.blockjunit4classrunner.runchild( blockjunit4classrunner.java:76) @ org.junit.runners.blockjunit4classrunner.runchild( blockjunit4classrunner.java:50) @ org.junit.runners.parentrunner$3.run( parentrunner.java:193) @ org.junit.runners.parentrunner$1.schedule( parentrunner.java:52) @ org.junit.runners.parentrunner.runchildren( parentrunner.java:191) @ org.junit.runners.parentrunner.access$000( parentrunner.java:42) @ org.junit.runners.parentrunner$2.evaluate( parentrunner.java:184) @ org.junit.runners.parentrunner.run( parentrunner.java:236) @ org.eclipse.jdt.internal.junit4.runner.junit4testreference.run( junit4testreference.java:50) @ org.eclipse.jdt.internal.junit.runner.testexecution.run( testexecution.java:38) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests( remotetestrunner.java:467) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests( remotetestrunner.java:683) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.run( remotetestrunner.java:390) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.main( remotetestrunner.java:197) caused by: java.net.connectexception: connection refused: no further information @ sun.nio.ch.socketchannelimpl.checkconnect( native method) @ sun.nio.ch.socketchannelimpl.finishconnect( socketchannelimpl.java:574) @ org.apache.hadoop.net.socketiowithtimeout.connect( socketiowithtimeout.java:206) @ org.apache.hadoop.net.netutils.connect( netutils.java:489) @ org.apache.hadoop.ipc.client$connection.setupconnection( client.java:434) @ org.apache.hadoop.ipc.client$connection.setupiostreams( client.java:560) @ org.apache.hadoop.ipc.client$connection.access$2000( client.java:184) @ org.apache.hadoop.ipc.client.getconnection( client.java:1206) @ org.apache.hadoop.ipc.client.call( client.java:1050)
Comments
Post a Comment