hadoop无法连接到resourcemanager

axzmvihb  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(554)

我只是通过运行wordcount示例来测试hadoop,但出现了以下错误:

  1. 14/07/30 12:03:02 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your
  2. platform... using builtin-java classes where applicable
  3. 14/07/30 12:03:03 INFO client.RMProxy: Connecting to ResourceManager at /127.0.0.1:8032
  4. 14/07/30 12:03:04 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8032. Already
  5. tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1
  6. SECONDS)
  7. 14/07/30 12:03:05 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:8032. Already
  8. tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1
  9. SECONDS)

互联网上的一些人认为这是因为yarn-site.xml文件。我的是:

  1. <property>
  2. <name>yarn.nodemanager.aux-services</name>
  3. <value>mapreduce_shuffle</value>
  4. </property>
  5. <property>
  6. <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
  7. <value>org.apache.hadoop.mapred.ShuffleHandler</value>
  8. </property>
  9. <property>
  10. <name>yarn.scheduler.minimum-allocation-mb</name>
  11. <value>128</value>
  12. <description>Minimum limit of memory to allocate to each container request at the Resource
  13. Manager.</description>
  14. </property>
  15. <property>
  16. <name>yarn.scheduler.maximum-allocation-mb</name>
  17. <value>1024</value>
  18. <description>Maximum limit of memory to allocate to each container request at the Resource
  19. Manager.</description>
  20. </property>
  21. <property>
  22. <name>yarn.scheduler.minimum-allocation-vcores</name>
  23. <value>1</value>
  24. <description>The minimum allocation for every container request at the RM, in terms of
  25. virtual CPU cores. Requests lower than this won't take effect, and the specified value will
  26. get allocated the minimum.</description>
  27. </property>
  28. <property>
  29. <name>yarn.scheduler.maximum-allocation-vcores</name>
  30. <value>2</value>
  31. <description>The maximum allocation for every container request at the RM, in terms of
  32. virtual CPU cores. Requests higher than this won't take effect, and will get capped to this
  33. value.</description>
  34. </property>
  35. <property>
  36. <name>yarn.nodemanager.resource.memory-mb</name>
  37. <value>2048</value>
  38. <description>Physical memory, in MB, to be made available to running containers</description>
  39. </property>
  40. <property>
  41. <name>yarn.nodemanager.resource.cpu-vcores</name>
  42. <value>2</value>
  43. <description>Number of CPU cores that can be allocated for containers.</description>
  44. </property>
  45. <property>
  46. <name>yarn.nodemanager.aux-services</name>
  47. <value>mapreduce_shuffle</value>
  48. </property>

我上周运行了一些程序,效果很好,所以我真的不知道发生了什么。谢谢你的帮助。

ac1kyiln

ac1kyiln1#

我将给出和我在这条线上给出的相同的答案。
确保你已经开始了。使用以下命令启动:
开始-Yarn.sh
然后使用此命令验证资源管理器是否正在运行:
日本
输出应该如下所示:
17542名称节点
17920第二名称节点
22064日元
17703数据节点
18226资源经理
18363节点管理员

相关问题