当前位置:Gxlcms > mysql > java.net.ConnectException:to0.0.0.0:10020failed

java.net.ConnectException:to0.0.0.0:10020failed

时间:2021-07-01 10:21:17 帮助过:45人阅读

在DataNode节点中的Hive CLI中执行 select count(*) from table_name 查询时报错: java.io.IOException: java.net.ConnectException: Call From Slave7.Hadoop/192.168.8.207 to 0.0.0.0:10020 failed on connection exception: java.net.ConnectException:

在DataNode节点中的Hive CLI中执行 select count(*) from table_name 查询时报错:
java.io.IOException: java.net.ConnectException: Call From Slave7.Hadoop/192.168.8.207 to 0.0.0.0:10020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
	at org.apache.hadoop.mapred.ClientServiceDelegate.invoke(ClientServiceDelegate.java:331)
	at org.apache.hadoop.mapred.ClientServiceDelegate.getJobStatus(ClientServiceDelegate.java:416)
	at org.apache.hadoop.mapred.YARNRunner.getJobStatus(YARNRunner.java:522)
	at org.apache.hadoop.mapreduce.Cluster.getJob(Cluster.java:183)
	at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:580)
	at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:578)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:416)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
	at org.apache.hadoop.mapred.JobClient.getJobUsingCluster(JobClient.java:578)
	at org.apache.hadoop.mapred.JobClient.getJob(JobClient.java:596)
	at org.apache.hadoop.hive.ql.exec.mr.HadoopJobExecHelper.progress(HadoopJobExecHelper.java:288)
	at org.apache.hadoop.hive.ql.exec.mr.HadoopJobExecHelper.progress(HadoopJobExecHelper.java:547)
	at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:426)
	at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:136)
	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153)
	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85)
	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1472)
	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1239)
	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1057)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:884)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:874)
	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:268)
	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:220)
	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:423)
	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:792)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:686)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
	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:616)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
从错误信息中需要访问端口 10020 可以大概看出,DataNode 需要访问?MapReduce JobHistory Server,如果没有修改则用默认值:?0.0.0.0:10020 。需要修改配置文件?mapred-site.xml??:

	mapreduce.jobhistory.address
        
	Master.Hadoop:10020
再在Hive shell中执行查询就可以了。 —————– ?EOF?@Michael Sun?—————–

人气教程排行