spring-attic / spring-cloud-dataflow-server-cloudfoundry

Spring Cloud Data Flow Implementation for Cloud Foundry
http://cloud.spring.io/spring-cloud-dataflow-server-cloudfoundry/
Apache License 2.0
21 stars 42 forks source link

app level rabbitmq properties not picked #490

Closed tajdars closed 5 years ago

tajdars commented 5 years ago

spring-cloud-skipper-server: 2.0.0.RELEASE spring-cloud-dataflow-server: 2.0.1.RELEASE

Deploying the ticktock stream (time | log) on pcf with rabbitmq middleware. These properties passed during deployment seem to get ignored and the deployment fails as its unable to bind to rabbitmq :

app.log.spring.rabbitmq.addresses=rmqhost:5672 app.time.spring.rabbitmq.addresses=rmqhost:5672

Kafka middleware works fine app.log.spring.cloud.stream.kafka.binder.brokers=kafkahost:9092 app.log.spring.cloud.stream.kafka.binder.zkNodes=zkhost:2181 app.time.spring.cloud.stream.kafka.binder.brokers=kafkahost:9092 app.time.spring.cloud.stream.kafka.binder.zkNodes=zkhost:2181

I want the flexibility of setting the RMQ at deployment_level/ per_stream.

...... ...... 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.amqp.rabbit.connection.ConnectionFactory]: Factory method 'rabbitConnectionFactory' threw exception; nested exception is org.springframework.cloud.CloudException: No unique service matching interface org.springframework.amqp.rabbit.connection.ConnectionFactory found. Expected 1, found 0 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE] 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.5.RELEASE.jar!/:5.1.5.RELEASE] 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT ... 49 common frames omitted 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT Caused by: org.springframework.cloud.CloudException: No unique service matching interface org.springframework.amqp.rabbit.connection.ConnectionFactory found. Expected 1, found 0 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT at org.springframework.cloud.Cloud.getSingletonServiceConnector(Cloud.java:197) ~[spring-cloud-connectors-core-2.0.4.RELEASE.jar!/:na] 2019-03-21T14:26:18.91-0500 [APP/PROC/WEB/0] OUT at org.springframework.cloud.stream.binder.rabbit.config.RabbitServiceAutoConfiguration$CloudProfile$CloudConnectors$UseCloudConnectors.rabbitConnectionFactory(RabbitServiceAutoConfiguration.java:110) ~[spring-cloud-stream-binder-rabbit-2.1.1.RELEASE.jar!/:2.1.1.RELEASE] ...... ......

Thoughts ?

sabbyanandan commented 5 years ago

Hi, @tajdars. This repo is deprecated. Starting with v2.0, CF and other platforms are directly supported through the single binary that we ship for SCDF.

To troubleshoot this, you could gain access to configprops endpoint of each of the applications, to verify whether your connection properties via spring.rabbitmq.addresses are populated correctly. Alternatively, you could run stream manifest command in the Shell to review all the supplied application and deployment properties. Also, make sure you don't have any service binding to a Rabbit SI, which could potentially collide.

All that said, for questions like this, it'd be better if you can ask it in StackOverflow.

tajdars commented 5 years ago

@sabbyanandan . OK. FWIW I was able to work around this by passing the following property during stream deployment : deployer.*.spring.cloud.stream.overrideCloudConnectors=true