解决方式:
如果在完全分布式部署,Namenode和ResourceManger如果不是同一台机器,不能在NodeManager上启动 yarn,应该在ResouceManager所在的机器上启动yarn
报错信息:
Caused by: java.net.BindException: Problem binding to [hadoop103:8031] java.net.BindException: 无法指定被请求的地址; For more details see: http://wiki.apache.org/hadoop/BindException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:721)
at org.apache.hadoop.ipc.Server.bind(Server.java:484)
at org.apache.hadoop.ipc.Server
L
i
s
t
e
n
e
r
.
<
i
n
i
t
>
(
S
e
r
v
e
r
.
j
a
v
a
:
690
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
S
e
r
v
e
r
.
<
i
n
i
t
>
(
S
e
r
v
e
r
.
j
a
v
a
:
2379
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
R
P
C
Listener.<init>(Server.java:690) at org.apache.hadoop.ipc.Server.<init>(Server.java:2379) at org.apache.hadoop.ipc.RPC
Listener.<init>(Server.java:690)atorg.apache.hadoop.ipc.Server.<init>(Server.java:2379)atorg.apache.hadoop.ipc.RPCServer.(RPC.java:951)
at org.apache.hadoop.ipc.ProtobufRpcEngine
S
e
r
v
e
r
.
<
i
n
i
t
>
(
P
r
o
t
o
b
u
f
R
p
c
E
n
g
i
n
e
.
j
a
v
a
:
534
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
P
r
o
t
o
b
u
f
R
p
c
E
n
g
i
n
e
.
g
e
t
S
e
r
v
e
r
(
P
r
o
t
o
b
u
f
R
p
c
E
n
g
i
n
e
.
j
a
v
a
:
509
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
R
P
C
Server.<init>(ProtobufRpcEngine.java:534) at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:509) at org.apache.hadoop.ipc.RPC
Server.<init>(ProtobufRpcEngine.java:534)atorg.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:509)atorg.apache.hadoop.ipc.RPCBuilder.build(RPC.java:796)
at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.createServer(RpcServerFactoryPBImpl.java:173)
at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.getServer(RpcServerFactoryPBImpl.java:132)
… 17 more
Caused by: java.net.BindException: 无法指定被请求的地址
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:414)
at sun.nio.ch.Net.bind(Net.java:406)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.hadoop.ipc.Server.bind(Server.java:467)
… 25 more
2019-06-30 14:44:48,696 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Transitioning to standby state
2019-06-30 14:44:48,696 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Transitioned to standby state
2019-06-30 14:44:48,696 FATAL org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Error starting ResourceManager
org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.net.BindException: Problem binding to [hadoop103:8031] java.net.BindException: 无法指定被请求的地址; For more details see: http://wiki.apache.org/hadoop/BindException
at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.getServer(RpcServerFactoryPBImpl.java:139)
at org.apache.hadoop.yarn.ipc.HadoopYarnProtoRPC.getServer(HadoopYarnProtoRPC.java:65)
at org.apache.hadoop.yarn.ipc.YarnRPC.getServer(YarnRPC.java:54)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceTrackerService.serviceStart(ResourceTrackerService.java:163)
at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
at org.apache.hadoop.service.CompositeService.serviceStart(CompositeService.java:120)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceStart(ResourceManager.java:584)
at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startActiveServices(ResourceManager.java:974)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$1.run(ResourceManager.java:1015)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager
1.
r
u
n
(
R
e
s
o
u
r
c
e
M
a
n
a
g
e
r
.
j
a
v
a
:
1011
)
a
t
j
a
v
a
.
s
e
c
u
r
i
t
y
.
A
c
c
e
s
s
C
o
n
t
r
o
l
l
e
r
.
d
o
P
r
i
v
i
l
e
g
e
d
(
N
a
t
i
v
e
M
e
t
h
o
d
)
a
t
j
a
v
a
x
.
s
e
c
u
r
i
t
y
.
a
u
t
h
.
S
u
b
j
e
c
t
.
d
o
A
s
(
S
u
b
j
e
c
t
.
j
a
v
a
:
422
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
s
e
c
u
r
i
t
y
.
U
s
e
r
G
r
o
u
p
I
n
f
o
r
m
a
t
i
o
n
.
d
o
A
s
(
U
s
e
r
G
r
o
u
p
I
n
f
o
r
m
a
t
i
o
n
.
j
a
v
a
:
1758
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
y
a
r
n
.
s
e
r
v
e
r
.
r
e
s
o
u
r
c
e
m
a
n
a
g
e
r
.
R
e
s
o
u
r
c
e
M
a
n
a
g
e
r
.
t
r
a
n
s
i
t
i
o
n
T
o
A
c
t
i
v
e
(
R
e
s
o
u
r
c
e
M
a
n
a
g
e
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t
.
N
a
t
i
v
e
C
o
n
s
t
r
u
c
t
o
r
A
c
c
e
s
s
o
r
I
m
p
l
.
n
e
w
I
n
s
t
a
n
c
e
(
N
a
t
i
v
e
C
o
n
s
t
r
u
c
t
o
r
A
c
c
e
s
s
o
r
I
m
p
l
.
j
a
v
a
:
62
)
a
t
s
u
n
.
r
e
f
l
e
c
t
.
D
e
l
e
g
a
t
i
n
g
C
o
n
s
t
r
u
c
t
o
r
A
c
c
e
s
s
o
r
I
m
p
l
.
n
e
w
I
n
s
t
a
n
c
e
(
D
e
l
e
g
a
t
i
n
g
C
o
n
s
t
r
u
c
t
o
r
A
c
c
e
s
s
o
r
I
m
p
l
.
j
a
v
a
:
45
)
a
t
j
a
v
a
.
l
a
n
g
.
r
e
f
l
e
c
t
.
C
o
n
s
t
r
u
c
t
o
r
.
n
e
w
I
n
s
t
a
n
c
e
(
C
o
n
s
t
r
u
c
t
o
r
.
j
a
v
a
:
408
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
n
e
t
.
N
e
t
U
t
i
l
s
.
w
r
a
p
W
i
t
h
M
e
s
s
a
g
e
(
N
e
t
U
t
i
l
s
.
j
a
v
a
:
792
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
n
e
t
.
N
e
t
U
t
i
l
s
.
w
r
a
p
E
x
c
e
p
t
i
o
n
(
N
e
t
U
t
i
l
s
.
j
a
v
a
:
721
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
S
e
r
v
e
r
.
b
i
n
d
(
S
e
r
v
e
r
.
j
a
v
a
:
484
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
S
e
r
v
e
r
1.run(ResourceManager.java:1011) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1758) at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.transitionToActive(ResourceManager.java:1011) at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1051) at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193) at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1188) Caused by: java.net.BindException: Problem binding to [hadoop103:8031] java.net.BindException: 无法指定被请求的地址; For more details see: http://wiki.apache.org/hadoop/BindException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408) at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792) at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:721) at org.apache.hadoop.ipc.Server.bind(Server.java:484) at org.apache.hadoop.ipc.Server
1.run(ResourceManager.java:1011)atjava.security.AccessController.doPrivileged(NativeMethod)atjavax.security.auth.Subject.doAs(Subject.java:422)atorg.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1758)atorg.apache.hadoop.yarn.server.resourcemanager.ResourceManager.transitionToActive(ResourceManager.java:1011)atorg.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1051)atorg.apache.hadoop.service.AbstractService.start(AbstractService.java:193)atorg.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1188)Causedby:java.net.BindException:Problembindingto[hadoop103:8031]java.net.BindException:无法指定被请求的地址;Formoredetailssee:http://wiki.apache.org/hadoop/BindExceptionatsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)atjava.lang.reflect.Constructor.newInstance(Constructor.java:408)atorg.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792)atorg.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:721)atorg.apache.hadoop.ipc.Server.bind(Server.java:484)atorg.apache.hadoop.ipc.ServerListener.(Server.java:690)
at org.apache.hadoop.ipc.Server.(Server.java:2379)
at org.apache.hadoop.ipc.RPC
S
e
r
v
e
r
.
<
i
n
i
t
>
(
R
P
C
.
j
a
v
a
:
951
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
P
r
o
t
o
b
u
f
R
p
c
E
n
g
i
n
e
Server.<init>(RPC.java:951) at org.apache.hadoop.ipc.ProtobufRpcEngine
Server.<init>(RPC.java:951)atorg.apache.hadoop.ipc.ProtobufRpcEngineServer.(ProtobufRpcEngine.java:534)
at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:509)
at org.apache.hadoop.ipc.RPC$Builder.build(RPC.java:796)
at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.createServer(RpcServerFactoryPBImpl.java:173)
at org.apache.hadoop.yarn.factories.impl.pb.RpcServerFactoryPBImpl.getServer(RpcServerFactoryPBImpl.java:132)
… 17 more
Caused by: java.net.BindException: 无法指定被请求的地址
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:414)
at sun.nio.ch.Net.bind(Net.java:406)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.hadoop.ipc.Server.bind(Server.java:467)
… 25 more