当前位置:   article > 正文

WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java

unable to load native-hadoop library for your platform... using builtin-java

今天配置完Spark高可用之后,想要跑一下Pi来验证配置结果,出现一下问题

  1. [mingyu@hadoop102 spark-standalone]$ bin/spark-submit --class org.apache.spark.examples.SparkPi --master spark://hadoop102:7077,hadoop103:7077 ./examples/jars/spark-examples_2.12-3.0.0.jar 10
  2. 23/03/24 19:02:58 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  3. Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
  4. 23/03/24 19:02:58 INFO SparkContext: Running Spark version 3.0.0
  5. 23/03/24 19:02:58 INFO ResourceUtils: ==============================================================
  6. 23/03/24 19:02:58 INFO ResourceUtils: Resources for spark.driver:
  7. 23/03/24 19:02:58 INFO ResourceUtils: ==============================================================
  8. 23/03/24 19:02:58 INFO SparkContext: Submitted application: Spark Pi
  9. 23/03/24 19:02:58 INFO SecurityManager: Changing view acls to: mingyu
  10. 23/03/24 19:02:58 INFO SecurityManager: Changing modify acls to: mingyu
  11. 23/03/24 19:02:58 INFO SecurityManager: Changing view acls groups to:
  12. 23/03/24 19:02:58 INFO SecurityManager: Changing modify acls groups to:
  13. 23/03/24 19:02:58 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(mingyu); groups with view permissions: Set(); users with modify permissions: Set(mingyu); groups with modify permissions: Set()
  14. 23/03/24 19:02:59 INFO Utils: Successfully started service 'sparkDriver' on port 35475.
  15. 23/03/24 19:02:59 INFO SparkEnv: Registering MapOutputTracker
  16. 23/03/24 19:02:59 INFO SparkEnv: Registering BlockManagerMaster
  17. 23/03/24 19:02:59 INFO BlockManagerMasterEndpoint: Using org.apache.spark.storage.DefaultTopologyMapper for getting topology information
  18. 23/03/24 19:02:59 INFO BlockManagerMasterEndpoint: BlockManagerMasterEndpoint up
  19. 23/03/24 19:02:59 INFO SparkEnv: Registering BlockManagerMasterHeartbeat
  20. 23/03/24 19:02:59 INFO DiskBlockManager: Created local directory at /tmp/blockmgr-7e5af594-3590-4621-a4bc-d07128b4ad43
  21. 23/03/24 19:02:59 INFO MemoryStore: MemoryStore started with capacity 366.3 MiB
  22. 23/03/24 19:02:59 INFO SparkEnv: Registering OutputCommitCoordinator
  23. 23/03/24 19:02:59 INFO Utils: Successfully started service 'SparkUI' on port 4040.
  24. 23/03/24 19:02:59 INFO SparkUI: Bound SparkUI to 0.0.0.0, and started at http://hadoop102:4040
  25. 23/03/24 19:02:59 INFO SparkContext: Added JAR file:/opt/module/spark-standalone/./examples/jars/spark-examples_2.12-3.0.0.jar at spark://hadoop102:35475/jars/spark-examples_2.12-3.0.0.jar with timestamp 1679655779831
  26. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Connecting to master spark://hadoop102:7077...
  27. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Connecting to master spark://hadoop103:7077...
  28. 23/03/24 19:03:00 INFO TransportClientFactory: Successfully created connection to hadoop102/192.168.13.102:7077 after 54 ms (0 ms spent in bootstraps)
  29. 23/03/24 19:03:00 INFO TransportClientFactory: Successfully created connection to hadoop103/192.168.13.103:7077 after 54 ms (0 ms spent in bootstraps)
  30. 23/03/24 19:03:00 INFO StandaloneSchedulerBackend: Connected to Spark cluster with app ID app-20230324190300-0003
  31. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Executor added: app-20230324190300-0003/0 on worker-20230324185420-192.168.13.102-41333 (192.168.13.102:41333) with 8 core(s)
  32. 23/03/24 19:03:00 INFO StandaloneSchedulerBackend: Granted executor ID app-20230324190300-0003/0 on hostPort 192.168.13.102:41333 with 8 core(s), 1024.0 MiB RAM
  33. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Executor added: app-20230324190300-0003/1 on worker-20230324185420-192.168.13.103-38373 (192.168.13.103:38373) with 8 core(s)
  34. 23/03/24 19:03:00 INFO StandaloneSchedulerBackend: Granted executor ID app-20230324190300-0003/1 on hostPort 192.168.13.103:38373 with 8 core(s), 1024.0 MiB RAM
  35. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Executor added: app-20230324190300-0003/2 on worker-20230324185421-192.168.13.104-42906 (192.168.13.104:42906) with 8 core(s)
  36. 23/03/24 19:03:00 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 37659.
  37. 23/03/24 19:03:00 INFO StandaloneSchedulerBackend: Granted executor ID app-20230324190300-0003/2 on hostPort 192.168.13.104:42906 with 8 core(s), 1024.0 MiB RAM
  38. 23/03/24 19:03:00 INFO NettyBlockTransferService: Server created on hadoop102:37659
  39. 23/03/24 19:03:00 INFO BlockManager: Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
  40. 23/03/24 19:03:00 INFO BlockManagerMaster: Registering BlockManager BlockManagerId(driver, hadoop102, 37659, None)
  41. 23/03/24 19:03:00 INFO BlockManagerMasterEndpoint: Registering block manager hadoop102:37659 with 366.3 MiB RAM, BlockManagerId(driver, hadoop102, 37659, None)
  42. 23/03/24 19:03:00 INFO BlockManagerMaster: Registered BlockManager BlockManagerId(driver, hadoop102, 37659, None)
  43. 23/03/24 19:03:00 INFO BlockManager: Initialized BlockManager: BlockManagerId(driver, hadoop102, 37659, None)
  44. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Executor updated: app-20230324190300-0003/2 is now RUNNING
  45. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Executor updated: app-20230324190300-0003/0 is now RUNNING
  46. 23/03/24 19:03:00 INFO StandaloneAppClient$ClientEndpoint: Executor updated: app-20230324190300-0003/1 is now RUNNING
  47. 23/03/24 19:03:03 ERROR SparkContext: Error initializing SparkContext.
  48. java.net.ConnectException: Call From hadoop102/192.168.13.102 to hadoop102:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
  49. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  50. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  51. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  52. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  53. at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:831)
  54. at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:755)
  55. at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1515)
  56. at org.apache.hadoop.ipc.Client.call(Client.java:1457)
  57. at org.apache.hadoop.ipc.Client.call(Client.java:1367)
  58. at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:228)
  59. at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
  60. at com.sun.proxy.$Proxy15.getFileInfo(Unknown Source)
  61. at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:903)
  62. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  63. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  64. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  65. at java.lang.reflect.Method.invoke(Method.java:498)
  66. at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:422)
  67. at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:165)
  68. at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:157)
  69. at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:95)
  70. at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:359)
  71. at com.sun.proxy.$Proxy16.getFileInfo(Unknown Source)
  72. at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1665)
  73. at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1582)
  74. at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1579)
  75. at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
  76. at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1594)
  77. at org.apache.spark.deploy.history.EventLogFileWriter.requireLogBaseDirAsDirectory(EventLogFileWriters.scala:77)
  78. at org.apache.spark.deploy.history.SingleEventLogFileWriter.start(EventLogFileWriters.scala:221)
  79. at org.apache.spark.scheduler.EventLoggingListener.start(EventLoggingListener.scala:81)
  80. at org.apache.spark.SparkContext.<init>(SparkContext.scala:572)
  81. at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2555)
  82. at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$1(SparkSession.scala:930)
  83. at scala.Option.getOrElse(Option.scala:189)
  84. at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:921)
  85. at org.apache.spark.examples.SparkPi$.main(SparkPi.scala:30)
  86. at org.apache.spark.examples.SparkPi.main(SparkPi.scala)
  87. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  88. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  89. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  90. at java.lang.reflect.Method.invoke(Method.java:498)
  91. at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
  92. at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:928)
  93. at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
  94. at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
  95. at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
  96. at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007)
  97. at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016)
  98. at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  99. Caused by: java.net.ConnectException: 拒绝连接
  100. at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
  101. at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
  102. at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
  103. at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
  104. at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:690)
  105. at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:794)
  106. at org.apache.hadoop.ipc.Client$Connection.access$3700(Client.java:411)
  107. at org.apache.hadoop.ipc.Client.getConnection(Client.java:1572)
  108. at org.apache.hadoop.ipc.Client.call(Client.java:1403)
  109. ... 42 more
  110. 23/03/24 19:03:03 INFO SparkUI: Stopped Spark web UI at http://hadoop102:4040
  111. 23/03/24 19:03:03 INFO StandaloneSchedulerBackend: Shutting down all executors
  112. 23/03/24 19:03:03 INFO CoarseGrainedSchedulerBackend$DriverEndpoint: Asking each executor to shut down
  113. 23/03/24 19:03:03 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
  114. 23/03/24 19:03:03 INFO MemoryStore: MemoryStore cleared
  115. 23/03/24 19:03:03 INFO BlockManager: BlockManager stopped
  116. 23/03/24 19:03:03 INFO BlockManagerMaster: BlockManagerMaster stopped
  117. 23/03/24 19:03:03 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
  118. 23/03/24 19:03:03 INFO SparkContext: Successfully stopped SparkContext
  119. Exception in thread "main" java.net.ConnectException: Call From hadoop102/192.168.13.102 to hadoop102:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
  120. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  121. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  122. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  123. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  124. at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:831)
  125. at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:755)
  126. at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1515)
  127. at org.apache.hadoop.ipc.Client.call(Client.java:1457)
  128. at org.apache.hadoop.ipc.Client.call(Client.java:1367)
  129. at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:228)
  130. at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
  131. at com.sun.proxy.$Proxy15.getFileInfo(Unknown Source)
  132. at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:903)
  133. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  134. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  135. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  136. at java.lang.reflect.Method.invoke(Method.java:498)
  137. at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:422)
  138. at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:165)
  139. at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:157)
  140. at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:95)
  141. at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:359)
  142. at com.sun.proxy.$Proxy16.getFileInfo(Unknown Source)
  143. at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1665)
  144. at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1582)
  145. at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1579)
  146. at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
  147. at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1594)
  148. at org.apache.spark.deploy.history.EventLogFileWriter.requireLogBaseDirAsDirectory(EventLogFileWriters.scala:77)
  149. at org.apache.spark.deploy.history.SingleEventLogFileWriter.start(EventLogFileWriters.scala:221)
  150. at org.apache.spark.scheduler.EventLoggingListener.start(EventLoggingListener.scala:81)
  151. at org.apache.spark.SparkContext.<init>(SparkContext.scala:572)
  152. at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2555)
  153. at org.apache.spark.sql.SparkSession$Builder.$anonfun$getOrCreate$1(SparkSession.scala:930)
  154. at scala.Option.getOrElse(Option.scala:189)
  155. at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:921)
  156. at org.apache.spark.examples.SparkPi$.main(SparkPi.scala:30)
  157. at org.apache.spark.examples.SparkPi.main(SparkPi.scala)
  158. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  159. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  160. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  161. at java.lang.reflect.Method.invoke(Method.java:498)
  162. at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
  163. at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:928)
  164. at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
  165. at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
  166. at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
  167. at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007)
  168. at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016)
  169. at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
  170. Caused by: java.net.ConnectException: 拒绝连接
  171. at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
  172. at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
  173. at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
  174. at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
  175. at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:690)
  176. at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:794)
  177. at org.apache.hadoop.ipc.Client$Connection.access$3700(Client.java:411)
  178. at org.apache.hadoop.ipc.Client.getConnection(Client.java:1572)
  179. at org.apache.hadoop.ipc.Client.call(Client.java:1403)
  180. ... 42 more
  181. 23/03/24 19:03:03 INFO ShutdownHookManager: Shutdown hook called
  182. 23/03/24 19:03:03 INFO ShutdownHookManager: Deleting directory /tmp/spark-d0c1d6eb-abb2-46fb-b83d-c5c06b2a90a0
  183. 23/03/24 19:03:03 INFO ShutdownHookManager: Deleting directory /tmp/spark-e6a32946-cd72-41f5-974b-f3bdf2ca76f0
  184. [mingyu@hadoop102 spark-standalone]$

其中最显眼的就是

 不能加载本地hdfs系统,将hdfs系统打开之后就可以了

[mingyu@hadoop102 hadoop-3.1.3]$ sbin/start-dfs.sh

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/387358
推荐阅读
相关标签
  

闽ICP备14008679号