yarn.resourcemanager.ha.id設置

resourcemanager啓動報錯,其中一個啓動成功,另外一個啓動報8088端口被成功啓動的rm佔用java

2016-11-18 17:08:49,478 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.library.path=/usr/lib/hadoop/lib/native
2016-11-18 17:08:49,478 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp
2016-11-18 17:08:49,478 INFO org.apache.zookeeper.ZooKeeper: Client environment:java.compiler=<NA>
2016-11-18 17:08:49,478 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.name=Linux
2016-11-18 17:08:49,478 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.arch=amd64
2016-11-18 17:08:49,478 INFO org.apache.zookeeper.ZooKeeper: Client environment:os.version=2.6.32-504.el6.x86_64
2016-11-18 17:08:49,479 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.name=yarn
2016-11-18 17:08:49,479 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.home=/var/lib/hadoop-yarn
2016-11-18 17:08:49,479 INFO org.apache.zookeeper.ZooKeeper: Client environment:user.dir=/usr/lib/hadoop-yarn
2016-11-18 17:08:49,480 INFO org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=node01:2181,node02:2181,node03:2181 sessionTimeout=10000 watcher=org.apache.hadoop.ha.ActiveStandbyElector$WatcherWithClientRef@729b9707
2016-11-18 17:08:49,501 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server node02/172.16.145.112:2181. Will not attempt to authenticate using SASL (unknown error)
2016-11-18 17:08:49,507 INFO org.apache.zookeeper.ClientCnxn: Socket connection established to node02/172.16.145.112:2181, initiating session
2016-11-18 17:08:49,518 INFO org.apache.zookeeper.ClientCnxn: Session establishment complete on server node02/172.16.145.112:2181, sessionid = 0x2587635b7620006, negotiated timeout = 10000
2016-11-18 17:08:49,521 INFO org.apache.hadoop.ha.ActiveStandbyElector: Session connected.
2016-11-18 17:08:49,544 INFO org.apache.hadoop.ha.ActiveStandbyElector: Successfully created /yarn-leader-election/myclusterrm in ZK.
2016-11-18 17:08:49,549 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Transitioning to standby state
2016-11-18 17:08:49,549 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Transitioned to standby state
2016-11-18 17:08:49,642 INFO org.mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
2016-11-18 17:08:49,648 INFO org.apache.hadoop.http.HttpRequestLog: Http request log for http.requests.resourcemanager is not defined
2016-11-18 17:08:49,666 INFO org.apache.hadoop.http.HttpServer2: Added global filter 'safety' (class=org.apache.hadoop.http.HttpServer2$QuotingInputFilter)
2016-11-18 17:08:49,677 INFO org.apache.hadoop.http.HttpServer2: Added filter RMAuthenticationFilter (class=org.apache.hadoop.yarn.server.security.http.RMAuthenticationFilter) to context cluster
2016-11-18 17:08:49,677 INFO org.apache.hadoop.http.HttpServer2: Added filter RMAuthenticationFilter (class=org.apache.hadoop.yarn.server.security.http.RMAuthenticationFilter) to context static
2016-11-18 17:08:49,677 INFO org.apache.hadoop.http.HttpServer2: Added filter RMAuthenticationFilter (class=org.apache.hadoop.yarn.server.security.http.RMAuthenticationFilter) to context logs
2016-11-18 17:08:49,678 INFO org.apache.hadoop.http.HttpServer2: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context cluster
2016-11-18 17:08:49,678 INFO org.apache.hadoop.http.HttpServer2: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context static
2016-11-18 17:08:49,678 INFO org.apache.hadoop.http.HttpServer2: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context logs
2016-11-18 17:08:49,684 INFO org.apache.hadoop.http.HttpServer2: adding path spec: /cluster/*
2016-11-18 17:08:49,684 INFO org.apache.hadoop.http.HttpServer2: adding path spec: /ws/*
2016-11-18 17:08:49,701 INFO org.apache.hadoop.http.HttpServer2: HttpServer.start() threw a non Bind IOException
java.net.BindException: Port in use: 172.16.145.114:8088
        at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:890)
        at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:826)
        at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:273)
        at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startWepApp(ResourceManager.java:903)
        at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1014)
        at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
        at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1145)
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:444)
        at sun.nio.ch.Net.bind(Net.java:436)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
        at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:885)
        ... 6 more

標紅的IP:172.16.145.114爲成功啓動的resourcemanager,上面的報錯信息是啓動失敗的rm(172.16.145.115)報的錯node

錯誤顯示114的8088端口已經在使用,跟我115有毛關係啊。web

檢查配置文件發現  兩個rm中的yarn-site.xml中的 yarn.resourcemanager.ha.id設置成了同一個rm的主機名apache

解決辦法:rm1的yarn-site的yarn.resourcemanager.ha.id設置成rm1session

              rm2的yarn-site的yarn.resourcemanager.ha.id設置成rm2app

<!--在node04上配rm1,node05上配rm2,slave節點不用配這個屬性-->
<property>
<name>yarn.resourcemanager.ha.id</name>
<value>rm1</value>
</property>

錯誤總結:一直覺得兩個resourcemanager配置文件是同樣的,沒有注意到這個屬性。webapp

對於這個屬性兩個rm的yarn-site設置不同,並且slave中不須要配,其餘屬性暫時還發現,全部節點保持一致就好了socket

相關文章
相關標籤/搜索