• exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused


    1、虽然,不是大错,还说要贴一下,由于我运行run-example streaming.NetworkWordCount localhost 9999的测试案例,出现的错误,第一感觉就是Spark没有启动导致的:

      1 18/04/23 03:21:58 ERROR SparkContext: Error initializing SparkContext.
      2 java.net.ConnectException: Call From slaver1/192.168.19.131 to slaver1:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
      3     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      4     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      5     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      6     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      7     at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
      8     at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
      9     at org.apache.hadoop.ipc.Client.call(Client.java:1414)
     10     at org.apache.hadoop.ipc.Client.call(Client.java:1363)
     11     at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
     12     at com.sun.proxy.$Proxy12.getFileInfo(Unknown Source)
     13     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     14     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     15     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     16     at java.lang.reflect.Method.invoke(Method.java:606)
     17     at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:190)
     18     at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:103)
     19     at com.sun.proxy.$Proxy12.getFileInfo(Unknown Source)
     20     at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:699)
     21     at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1762)
     22     at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:1124)
     23     at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:1120)
     24     at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
     25     at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1120)
     26     at org.apache.spark.scheduler.EventLoggingListener.start(EventLoggingListener.scala:100)
     27     at org.apache.spark.SparkContext.<init>(SparkContext.scala:541)
     28     at org.apache.spark.streaming.StreamingContext$.createNewSparkContext(StreamingContext.scala:864)
     29     at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:81)
     30     at org.apache.spark.examples.streaming.NetworkWordCount$.main(NetworkWordCount.scala:47)
     31     at org.apache.spark.examples.streaming.NetworkWordCount.main(NetworkWordCount.scala)
     32     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     33     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     34     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     35     at java.lang.reflect.Method.invoke(Method.java:606)
     36     at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672)
     37     at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
     38     at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
     39     at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
     40     at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
     41 Caused by: java.net.ConnectException: Connection refused
     42     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
     43     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
     44     at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
     45     at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
     46     at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
     47     at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:604)
     48     at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:699)
     49     at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:367)
     50     at org.apache.hadoop.ipc.Client.getConnection(Client.java:1462)
     51     at org.apache.hadoop.ipc.Client.call(Client.java:1381)
     52     ... 31 more
     53 18/04/23 03:21:59 INFO SparkUI: Stopped Spark web UI at http://192.168.19.131:4040
     54 18/04/23 03:21:59 INFO DAGScheduler: Stopping DAGScheduler
     55 18/04/23 03:21:59 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
     56 18/04/23 03:21:59 INFO MemoryStore: MemoryStore cleared
     57 18/04/23 03:21:59 INFO BlockManager: BlockManager stopped
     58 18/04/23 03:21:59 INFO BlockManagerMaster: BlockManagerMaster stopped
     59 18/04/23 03:21:59 INFO SparkContext: Successfully stopped SparkContext
     60 Exception in thread "main" java.net.ConnectException: Call From slaver1/192.168.19.131 to slaver1:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
     61     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     62     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
     63     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     64     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
     65     at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:783)
     66     at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:730)
     67     at org.apache.hadoop.ipc.Client.call(Client.java:1414)
     68     at org.apache.hadoop.ipc.Client.call(Client.java:1363)
     69     at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
     70     at com.sun.proxy.$Proxy12.getFileInfo(Unknown Source)
     71     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     72     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     73     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     74     at java.lang.reflect.Method.invoke(Method.java:606)
     75     at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:190)
     76     at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:103)
     77     at com.sun.proxy.$Proxy12.getFileInfo(Unknown Source)
     78     at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:699)
     79     at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1762)
     80     at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:1124)
     81     at org.apache.hadoop.hdfs.DistributedFileSystem$17.doCall(DistributedFileSystem.java:1120)
     82     at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
     83     at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1120)
     84     at org.apache.spark.scheduler.EventLoggingListener.start(EventLoggingListener.scala:100)
     85     at org.apache.spark.SparkContext.<init>(SparkContext.scala:541)
     86     at org.apache.spark.streaming.StreamingContext$.createNewSparkContext(StreamingContext.scala:864)
     87     at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:81)
     88     at org.apache.spark.examples.streaming.NetworkWordCount$.main(NetworkWordCount.scala:47)
     89     at org.apache.spark.examples.streaming.NetworkWordCount.main(NetworkWordCount.scala)
     90     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     91     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     92     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     93     at java.lang.reflect.Method.invoke(Method.java:606)
     94     at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672)
     95     at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
     96     at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
     97     at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
     98     at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
     99 Caused by: java.net.ConnectException: Connection refused
    100     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    101     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    102     at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    103     at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:529)
    104     at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:493)
    105     at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:604)
    106     at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:699)
    107     at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:367)
    108     at org.apache.hadoop.ipc.Client.getConnection(Client.java:1462)
    109     at org.apache.hadoop.ipc.Client.call(Client.java:1381)
    110     ... 31 more
    111 18/04/23 03:21:59 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
    112 18/04/23 03:21:59 INFO RemoteActorRefProvider$RemotingTerminator: Shutting down remote daemon.
    113 18/04/23 03:21:59 INFO ShutdownHookManager: Shutdown hook called
    114 18/04/23 03:21:59 INFO ShutdownHookManager: Deleting directory /tmp/spark-7ef5c2da-0b57-4553-a9f9-6e215885c7ba
    115 18/04/23 03:21:59 INFO RemoteActorRefProvider$RemotingTerminator: Remote daemon shut down; proceeding with flushing remote transports.

    2、启动Spark的脚本命令:

    [hadoop@slaver1 spark-1.5.1-bin-hadoop2.4]$ sbin/start-all.sh

    [hadoop@slaver2 ~]$ run-example streaming.NetworkWordCount localhost 9999

  • 相关阅读:
    携程呼叫中心异地双活——座席服务的高可用
    从5台服务器到两地三中心:魅族系统运维架构演进之路(含PPT)
    从“两地三中心”到“分布式多活”
    “两地三中心”容灾备份设计与实现_数据备份_数据恢复-阿里云
    膏方_百度百科
    矿泉水瓶加湿器 办公室空气加湿器迷你便携水瓶座 小型USB迷你家用静音 白色【图片 价格 品牌 报价】-京东
    【资料下载】ANTLR的最全的官方文档:The Definitive ANTLR Reference:v2,v3,v4版本都有下载 | 在路上
    “百万年薪40多万个税”高不高?你怎么看?_财经_腾讯网
    浙江四大滑雪场攻略及2015滑雪门票价格
    druid parser
  • 原文地址:https://www.cnblogs.com/biehongli/p/8919475.html
Copyright © 2020-2023  润新知