来自MQTT的Spark Streaming - IllegalArgumentException

时间:2016-09-05 13:33:25

标签: apache-spark rabbitmq pyspark spark-streaming mqtt

我试图在Spark Streaming中使用来自RabbitMQ的消息后面这个答案:https://stackoverflow.com/a/38172737/1344854。我IllegalArgumentException失败了,我不知道为什么。

6/09/05 13:23:22 ERROR ReceiverTracker: Deregistered receiver for stream 0: Error starting receiver 0 - java.lang.IllegalArgumentException: ssl://user:password@bunny.cloudamqp.com:8883/vhost
    at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458)
    at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:273)
    at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:167)
    at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:224)
    at org.apache.spark.streaming.mqtt.MQTTReceiver.onStart(MQTTInputDStream.scala:71)
    at org.apache.spark.streaming.receiver.ReceiverSupervisor.startReceiver(ReceiverSupervisor.scala:148)
    at org.apache.spark.streaming.receiver.ReceiverSupervisor.start(ReceiverSupervisor.scala:130)
    at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$9.apply(ReceiverTracker.scala:575)
    at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$9.apply(ReceiverTracker.scala:565)
    at org.apache.spark.SparkContext$$anonfun$37.apply(SparkContext.scala:1992)
    at org.apache.spark.SparkContext$$anonfun$37.apply(SparkContext.scala:1992)
    at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
    at org.apache.spark.scheduler.Task.run(Task.scala:89)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

我尝试将brokerUrl参数的各种组合传递给MQTTUtils.createStream构造函数,包括tcp: tcp://user:password@bunny.cloudamqp.com:1883/vhost

为什么无法验证以及如何修复它?

0 个答案:

没有答案