Error connecting to localhost:9999 - java.net.ConnectException: Connection refused: connect

Error connecting to localhost:9999 - java.net.ConnectException: Connection refused: connect

20/05/11 13:25:54 ERROR ReceiverTracker: Deregistered receiver for stream 0: Restarting receiver with delay 2000ms: Error connecting to localhost:9999 - java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.(Socket.java:434)
at java.net.Socket.(Socket.java:211)
at org.apache.spark.streaming.dstream.SocketReceiver.onStart(SocketInputDStream.scala:61)
at org.apache.spark.streaming.receiver.ReceiverSupervisor.startReceiver(ReceiverSupervisor.scala:149)
at org.apache.spark.streaming.receiver.ReceiverSupervisor.start(ReceiverSupervisor.scala:131)
at org.apache.spark.streaming.scheduler.ReceiverTracker R e c e i v e r T r a c k e r E n d p o i n t ReceiverTrackerEndpoint ReceiverTrackerEndpoint$anonfun 9. a p p l y ( R e c e i v e r T r a c k e r . s c a l a : 600 ) a t o r g . a p a c h e . s p a r k . s t r e a m i n g . s c h e d u l e r . R e c e i v e r T r a c k e r 9.apply(ReceiverTracker.scala:600) at org.apache.spark.streaming.scheduler.ReceiverTracker 9.apply(ReceiverTracker.scala:600)atorg.apache.spark.streaming.scheduler.ReceiverTrackerReceiverTrackerEndpointKaTeX parse error: Can't use function '$' in math mode at position 8: anonfun$̲9.apply(Receive…anonfun 34. a p p l y ( S p a r k C o n t e x t . s c a l a : 2185 ) a t o r g . a p a c h e . s p a r k . S p a r k C o n t e x t 34.apply(SparkContext.scala:2185) at org.apache.spark.SparkContext 34.apply(SparkContext.scala:2185)atorg.apache.spark.SparkContext$anonfun 34. a p p l y ( S p a r k C o n t e x t . s c a l a : 2185 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . R e s u l t T a s k . r u n T a s k ( R e s u l t T a s k . s c a l a : 87 ) a t o r g . a p a c h e . s p a r k . s c h e d u l e r . T a s k . r u n ( T a s k . s c a l a : 109 ) a t o r g . a p a c h e . s p a r k . e x e c u t o r . E x e c u t o r 34.apply(SparkContext.scala:2185) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87) at org.apache.spark.scheduler.Task.run(Task.scala:109) at org.apache.spark.executor.Executor 34.apply(SparkContext.scala:2185)atorg.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87)atorg.apache.spark.scheduler.Task.run(Task.scala:109)atorg.apache.spark.executor.ExecutorTaskRunner.run(Executor.scala:345)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

**解决办法:**启动 localhost:9999 监听端口 命令: nc -lp 9999

你可能感兴趣的:(sparkstreaming)