MapReduce运行报Does not contain a valid host:port authority: VM_0_9_centos:35697 异常
程序员文章站
2022-06-12 22:51:53
...
我在hadoop中运行MapReduce程序时报以下异常
FAILED
Container launch failed for container_1534231697216_0075_01_000002 : java.lang.IllegalArgumentException: Does not contain a valid host:port authority: VM_0_9_centos:35697
at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:211)
at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:163)
at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:152)
at org.apache.hadoop.yarn.client.api.impl.ContainerManagementProtocolProxy$ContainerManagementProtocolProxyData.newProxy(ContainerManagementProtocolProxy.java:210)
at org.apache.hadoop.yarn.client.api.impl.ContainerManagementProtocolProxy$ContainerManagementProtocolProxyData.<init>(ContainerManagementProtocolProxy.java:196)
at org.apache.hadoop.yarn.client.api.impl.ContainerManagementProtocolProxy.getProxy(ContainerManagementProtocolProxy.java:117)
at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl.getCMProxy(ContainerLauncherImpl.java:403)
at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl$Container.launch(ContainerLauncherImpl.java:138)
at org.apache.hadoop.mapreduce.v2.app.launcher.ContainerLauncherImpl$EventProcessor.run(ContainerLauncherImpl.java:369)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)
最主要的信息是
Does not contain a valid host:port authority: VM_0_9_centos:35697
如果你的是
Does not contain a valid host:port authority: xxxx_xxxx:端口号
很有可能是你的主机名带有_的原因
我原先的主机名
我将 /etc/hosts 的第一条VM_0_9_cento删除后即可正常运行