Closed steelxiang closed 5 years ago
` val hosts="180.100.230.179" val queueName="hdfs" val exchangeName="myExchange" val exchangeType="direct" val password="rabbitmq" val userName="root" val vHost="myHost" val routingKeys="hello"
val receiverStream: ReceiverInputDStream[String] = RabbitMQUtils.createStream(ssc, Map( "hosts" -> hosts, "queueName" -> queueName, "exchangeName" -> exchangeName, "exchangeType" -> exchangeType, "routingKeys" ->routingKeys, "password" -> password, "userName" -> userName, "vHost" -> vHost ))
`
com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method(reply-code=530, reply-text=NOT_ALLOWED - access to vhost '/' refused for user 'root', class-id=10, method-id=40)
I set the val vHost="myHost"
so why it access to vhost "/" rather than vhost "myHost"
this is code
` val hosts="180.100.230.179" val queueName="hdfs" val exchangeName="myExchange" val exchangeType="direct" val password="rabbitmq" val userName="root" val vHost="myHost" val routingKeys="hello"
val receiverStream: ReceiverInputDStream[String] = RabbitMQUtils.createStream(ssc, Map( "hosts" -> hosts, "queueName" -> queueName, "exchangeName" -> exchangeName, "exchangeType" -> exchangeType, "routingKeys" ->routingKeys, "password" -> password, "userName" -> userName, "vHost" -> vHost ))
`
this is error show
com.rabbitmq.client.ShutdownSignalException: connection error; protocol method: #method(reply-code=530, reply-text=NOT_ALLOWED - access to vhost '/' refused for user 'root', class-id=10, method-id=40)
I set the val vHost="myHost"
so why it access to vhost "/" rather than vhost "myHost"