2017-08-11 253 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。其他两个属性也是如此。