gpt4 book ai didi

java - Hadoop 在从 Spring 批处理管理员启 Action 业时获取连接被拒绝的异常

转载 作者:可可西里 更新时间:2023-11-01 16:30:34 25 4
gpt4 key购买 nike

我正在尝试从 spring Admin 触发 hadoop mapreduce 作业,但出现以下错误。 Spring Admin 在 wasce 上运行。

作业配置:

<hdp:configuration>
fs.defaultFS=hdfs://localhost:8020
mapred.job.tracker=localhost:8021
</hdp:configuration>

<hdp:job id="mr-my-job"
input-path="/data/input/"
output-path="/data/output/"
jar-by-class="org.test.Main"
mapper="org.test.Test1$Map"
combiner="org.test.Test1$Combiner"
reducer="org.test.Test1$ReduceFromCombiner" />

请指教。当我通过打包一个 jar 并使用 hadoop 命令运行此作业时,它工作正常但在通过 Admin 运行时出错。sudo -u hdfs hadoop jar test.jar org.Main

Caused by: java.net.ConnectException: Call From <server>/<server_ip> to localhost:8021 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
at org.apache.hadoop.ipc.Client.call(Client.java:1413)
at org.apache.hadoop.ipc.Client.call(Client.java:1362)
at org.apache.hadoop.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:231)
at org.apache.hadoop.mapred.$Proxy203.getStagingAreaDir(Unknown Source)
at org.apache.hadoop.mapred.JobClient.getStagingAreaDir(JobClient.java:1340)
at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:102)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:954)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:948)
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:1548)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:948)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:582)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:612)
at org.springframework.data.hadoop.mapreduce.JobExecutor$2.run(JobExecutor.java:199)
... 24 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:604)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:699)
at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:367)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1461)
at org.apache.hadoop.ipc.Client.call(Client.java:1380)

最佳答案

我们在 hadoop 上有一个与此相关的特殊页面。请点击您看到的堆栈跟踪中的链接:http://wiki.apache.org/hadoop/ConnectionRefused

我可以这么说吗I put a lot of effort尝试改进连接诊断,包括目标主机和端口的报告、带有调试建议的 URL 列表,以及这些页面的编写和维护。当人们不点击链接时,我总是很难过,因为我觉得我的努力被浪费了。当您在堆栈跟踪中看到此类 URL 时,请至少粗略地看一下引用的 URL。

关于java - Hadoop 在从 Spring 批处理管理员启 Action 业时获取连接被拒绝的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34666696/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com