It just means the port on which you are trying to connect there is no
hadoop service running on that port please recheck what port you are using
for hadoop and check where you have specified the port no 54310 and check
for port using netstat -nl | grep 54310  if giving any result else just
check on which port your hadoop is running

On Mon, Oct 29, 2012 at 5:45 PM, sagar nikam <sagarnikam...@gmail.com>wrote:

> i started dfs services as
>
> ========================================================================================
> trendwise@Trendwise:~/Hadoop/hadoop-0.20.2/bin$ ./start-all.sh
> starting namenode, logging to
> /home/trendwise/Hadoop/hadoop-0.20.2/bin/../logs/hadoop-trendwise-namenode-Trendwise.out
> trendwise@localhost's password:
> localhost: starting datanode, logging to
> /home/trendwise/Hadoop/hadoop-0.20.2/bin/../logs/hadoop-trendwise-datanode-Trendwise.out
> trendwise@localhost's password:
> localhost: starting secondarynamenode, logging to
> /home/trendwise/Hadoop/hadoop-0.20.2/bin/../logs/hadoop-trendwise-secondarynamenode-Trendwise.out
> starting jobtracker, logging to
> /home/trendwise/Hadoop/hadoop-0.20.2/bin/../logs/hadoop-trendwise-jobtracker-Trendwise.out
> trendwise@localhost's password:
> localhost: starting tasktracker, logging to
> /home/trendwise/Hadoop/hadoop-0.20.2/bin/../logs/hadoop-trendwise-tasktracker-Trendwise.out
>
> after that run jps--->
> trendwise@Trendwise:~/Hadoop/hadoop-0.20.2/bin$ jps
> 10028 JobTracker
> 3812 RunJar
> 10297 Jps
> 9962 SecondaryNameNode
> 9722 DataNode
> 10252 TaskTracker
> trendwise@Trendwise:~/Hadoop/hadoop-0.20.2/bin$
>
> ======================================================================================
> evrything is perfect
>
> but same error in hive
>
> =======================================================================================
> trendwise@Trendwise:~/Hadoop/hive-0.7.1/bin$ ./hive
> Hive history
> file=/tmp/trendwise/hive_job_log_trendwise_201210291740_1554227890.txt
> hive> show databases;
> OK
> default
> mm
> mm2
> xyz
> Time taken: 10.574 seconds
> hive> use mm2;
> OK
> Time taken: 0.046 seconds
> hive> show tables;
> OK
> cidade
> concessionaria
> familia
> modelo
> venda
> Time taken: 0.562 seconds
> hive> select * from modelo;
> FAILED: Hive Internal Error:
> java.lang.RuntimeException(java.net.ConnectException: Call to localhost/
> 127.0.0.1:54310 failed on connection exception:
> java.net.ConnectException: Connection refused)
> java.lang.RuntimeException: java.net.ConnectException: Call to localhost/
> 127.0.0.1:54310 failed on connection exception:
> java.net.ConnectException: Connection refused
> at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:151)
>  at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:190)
> at org.apache.hadoop.hive.ql.Context.getMRTmpFileURI(Context.java:247)
>  at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:900)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
>  at
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
>  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
>  at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:456)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.net.ConnectException: Call to localhost/127.0.0.1:54310failed 
> on connection exception: java.net.ConnectException: Connection
> refused
>  at org.apache.hadoop.ipc.Client.wrapException(Client.java:767)
> at org.apache.hadoop.ipc.Client.call(Client.java:743)
>  at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
> at $Proxy4.getProtocolVersion(Unknown Source)
>  at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)
> at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:106)
>  at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:207)
> at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:170)
>  at
> org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)
> at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)
>  at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
> at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)
>  at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)
> at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)
>  at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:145)
> ... 15 more
> Caused by: java.net.ConnectException: Connection refused
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
>  at
> org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
> at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:404)
>  at
> org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:304)
> at org.apache.hadoop.ipc.Client$Connection.access$1700(Client.java:176)
>  at org.apache.hadoop.ipc.Client.getConnection(Client.java:860)
> at org.apache.hadoop.ipc.Client.call(Client.java:720)
>  ... 28 more
>
> ============================================================================================
>
>
> i have attached log file,which says that
>
> 2012-10-29 17:29:11,580 INFO org.apache.hadoop.ipc.Client: Retrying
> connect to server: localhost/127.0.0.1:54310. Already tried 0 time(s).
> 2012-10-29 17:29:12,581 INFO org.apache.hadoop.ipc.Client: Retrying
> connect to server: localhost/127.0.0.1:54310. Already tried 1 time(s).
> ...continued.....................................................
>
> which port should i give to hive ?
>



-- 


∞
Shashwat Shriparv

Reply via email to