hadoop报错:Does not contain a valid host:port authority

今天用sbin/start-yarn.sh启动yarn的时候,遇到下面的错误

java.lang.IllegalArgumentException: Does not contain a valid host:port authority: master
	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.mapred.ClientCache$1.run(ClientCache.java:95)
	at org.apache.hadoop.mapred.ClientCache$1.run(ClientCache.java:92)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:356)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1594)
	at org.apache.hadoop.mapred.ClientCache.instantiateHistoryProxy(ClientCache.java:92)
	at org.apache.hadoop.mapred.ClientCache.getInitializedHSProxy(ClientCache.java:77)
	at org.apache.hadoop.mapred.YARNRunner.addHistoryToken(YARNRunner.java:184)
	at org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:281)
	at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:432)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1285)
	at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1282)
	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:1614)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1282)
	at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303)
	at org.apache.hadoop.examples.WordCount.main(WordCount.java:87)
	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:606)
	at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:72)
	at org.apache.hadoop.util.ProgramDriver.run(ProgramDriver.java:145)
	at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:74)
	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:606)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

  经过排查,发现是mapred-site.xml中配置错误,如下:

<property>
  <name>mapreduce.jobhistory.address</name>
  <value>master</value>
  <description>job history server</description>
</property>

<property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>master</value>
  <description>job history server</description>
</property>

  address应该包含端口号,而配置文件中只指定了主机名,所以加上端口号就好了

<property>
  <name>mapreduce.jobhistory.address</name>
  <value>master:7001</value>
  <description>job history server</description>
</property>

<property>
  <name>mapreduce.jobhistory.webapp.address</name>
  <value>master:8001</value>
  <description>job history server</description>
</property>

  遇到以上错误的朋友,不妨看一下core-site.xml,hdfs-site.xml,mapred-site.xml,yarn-site.xml这几个配置文件中的地址格式是否正确,另外value两端最好不要出现空格,比如下面的格式可能会报错(master前边有空格)

<property>
  <name>mapreduce.jobhistory.address</name>
  <value> master</value>
  <description>job history server</description>
</property>

  

时间: 2024-09-27 21:28:25

hadoop报错:Does not contain a valid host:port authority的相关文章

Does not contain a valid host:port authority: Master:8031 (configuration property &#39;yarn.resourcemanager.resource-tracker.address&#39;)

问题解决: 这个错误是:yarn里面的配置的格式有错误:如: <property> <name>yarn.resourcemanager.address</name> <value>Master:8032</value> </property> <property> 在<value>标签之间不能有空格.去掉空格OK. 异常堆栈如下 2014-08-30 10:20:30,171 INFO org.apache.

eclipse连接远程Hadoop报错,Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。

eclipse连接远程Hadoop报错,Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接.全部报错信息如下: Exception in thread "main" java.io.IOException: Call to hadoopmaster/192.168.1.180:9000 failed on local exception: java.io.IOException: 远程主机强迫关闭了一个现有的连接. at org.apach

linux报错之---&gt;export `=&#39; not a valid identifier的一般原因

export `=' not a valid identifier的一般原因 原因就是你修改的 /etc/profile 文件里 你加过空格 我的代码如下: export JAVA_HOME = /usr/java/jdk1.7.0_75 export PATH = $JAVA_HOME/bin:$PATH export CLASSPATH = .:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 修改为如下: export JAVA_HOME=/us

azure iothub create-device-identity样例报错: unable to find valid certification path

https://docs.microsoft.com/zh-cn/azure/iot-hub/iot-hub-java-java-getstarted 在IDEA中执行上述的代码,会出现下面的报错信息: Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.secur

DRDB报错------0: Failure: (119) No valid meta-data signature found.

一. 错误 drbdadm create-md datadrbdadm up data  <--启动时报错 [[email protected]1-1 ~]# drbdadm up data 0: Failure: (119) No valid meta-data signature found. ==> Use 'drbdadm create-md res' to initialize meta-data area. <== Command 'drbdsetup-84 attach 0

yum 报错 Error: Cannot find a valid baseurl for repo: base

环境: vmware OS:CentOS release 6.5 双网卡 Eth0(接公网 192.168.80.0),Eth1(接内网 192.168.44.0) 报错: 使用YUM更新软件时报错 Error: Cannot find a valid baseurl for repo: base 之前使用YUM一直没有问题,今天重启了虚拟机后yum就不能使用了.这个报错是DNS解析引起的,检查/etc/resolv.conf ,DNS 变成 192.168.44.1,手动修改后,使用yum正常

Windows下Hadoop报错Failed to locate the winutils

首先我这里只是一个简单的hdfs查询程序,并没有搭建Hadoop环境,搭建环境还需去看详细教程. 报错:Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable null \bin\winutils.exe in the Hadoop binaries. 前辈说这是Window系统的原因,其实并没有影响,回头要放到服务器上,这个问题

HADOOP报错,随笔

1.新版本2.4.1中,profile/hadoop-env.sh中均己设置 JAVA_HOME,  java -version也正常. 启动时报错: [[email protected] ~]# start-all.sh Starting namenodes on [] localhost: Error: JAVA_HOME is not set and could not be found. localhost: Error: JAVA_HOME is not set and could n

Linux安装Apache报错:Cannot find a valid baseurl for repo: base/7/x86_64解决方案

最近使用CentOS7学习,安装安装Apache时候,使用yum安装Apache报错:本文适合CentOS7和RHEL7 # yum install httpd 出现:cannot find a valid baseurl for repo:base/7/x86_64. 针对这个问题,网上有大量的解决方案,说是网络不通的,比如: 修改: vi /etc/sysconfig/network-scripts/ifcfg-eth0(每个机子都可能不一样,但格式会是"ifcfg-eth数字")