内存多大,这个应该是等待分配
主机是8G,虚拟机安装的,每个虚拟机分配了2Gyarn.xml配置:
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>master</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>master:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>master:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>master:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>master:8033</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>master:8088</value>
</property>
core-site.xml配置:
<property>
<name>hadoop.tmp.dir</name>
<value>file:/opt/hadoop/hdfs/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>io.file.buffer.size</name>
<value>131072</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://master:9000</value>
</property>
mapred-site.xml配置:
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.jobhistory.address</name>
<value>master:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>master:19888</value>
</property>
hdfs-site.xml配置:
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/opt/hadoop/hdfs/name</value>
<final>true</final>
</property>
<property>
<name>dfs.dataname.data.dir</name>
<value>file:/opt/hadoop/hdfs/data</value>
<final>true</final>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>master:9001</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
原来是我没有配置slave机器到master机器的免密码登陆 启动hadoop后master 和 slave1 2进程都正确然后运行wordcount测试 有如下问题:
16/05/05 03:46:13 INFO mapreduce.Job: Running job: job_1462444313956_0002
16/05/05 03:46:34 INFO mapreduce.Job: Job job_1462444313956_0002 running in uber mode : false
16/05/05 03:46:34 INFO mapreduce.Job:map 0% reduce 0%
16/05/05 03:46:34 INFO mapreduce.Job: Job job_1462444313956_0002 failed with state FAILED due to: Application application_1462444313956_0002 failed 2 times due to Error launching appattempt_1462444313956_0002_000002. Got exception: java.net.ConnectException: Call From Master/192.168.0.19 to localhost.localdomain:28623 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:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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:1351)
at org.apache.hadoop.ipc.Client.call(Client.java:1300)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
at $Proxy23.startContainers(Unknown Source)
at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96)
at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:118)
at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:249)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
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:547)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:642)
at org.apache.hadoop.ipc.Client$Connection.access$2600(Client.java:314)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1399)
at org.apache.hadoop.ipc.Client.call(Client.java:1318)
... 9 more
. Failing the application.
16/05/05 03:46:34 INFO mapreduce.Job: Counters: 0
我看了好久 还是没有解决
hosts 文件:127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.19 Master
192.168.0.124 Slave1
192.168.0.125 Slave2
limeng 发表于 2016-5-5 19:15
启动hadoop后master 和 slave1 2进程都正确然后运行wordcount测试 有如下问题:
16/05/05 03:46:13 ...
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
注释掉
我是3台机完全分布式 三台机都注释掉吗 注释掉后localhost没有对应的IP了 会不会有影响?谢谢啦!
muyannian 发表于 2016-5-5 20:58
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localh ...
我是三台机完全分布式 三台机都注释掉吗? 注释掉后IP与localhost没对应会不会有影响啊? 谢谢啦! limeng 发表于 2016-5-5 19:15
启动hadoop后master 和 slave1 2进程都正确然后运行wordcount测试 有如下问题:
16/05/05 03:46:13 ...
解决了如果有上述问题的兄弟 请这样:
检查3台机器的hosts文件 127.0.0.1 localhost 每台机都这样修改
有的虚拟机配置安装的时候不一样 检查一下 去掉localdomain
希望能帮到大家
学习值得一看 学习了,谢谢
页:
1
[2]