2017-08-11 352 views
0

我正在嘗試運行spring dataflow本地服務器併爲所有應用程序配置rabbitmq binder。我有rabbitmq在主機172.17.0.2上的docker上運行。使用RabbitMQ配置Spring數據流 - 連接被拒絕(連接被拒絕)

java -jar spring-cloud-dataflow-server-local-1.2.3.RELEASE.jar 
--spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.binders.rabbit1.type=rabbit 
--spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.binders.rabbit1.environment.spring.rabbit.host=172.17.0.2 
--spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.binders.rabbit1.environment.spring.rabbit.user=guest 
--spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.binders.rabbit1.environment.spring.rabbit.password=guest 

異常

{ 
"timestamp": 1502479027168, 
"status": 500, 
"error": "Internal Server Error", 
"exception": "org.springframework.messaging.MessageHandlingException", 
"message": "error occurred in message handler [org[email protected]45e29e0]; nested exception is org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)", 
"path": "/" 
} 

春數據流無法找到的RabbitMQ。

回答

0

我想知道您的屬性是否存在拼寫錯誤。而不是applicationProperties.stream.spring.cloud.stream.binders.rabbit1.environment.spring.rabbit.host=172.17.0.2,它應該是 applicationProperties.stream.spring.cloud.stream.binders.rabbit1.environment.spring.rabbitmq.host=172.17.0.2。它需要是spring.rabbitmq.host。其他兩個屬性也是如此。