1

I have initialized an Spring Data Flow Server using port 8181 and I have been trying to run a composed task using this particular server. When I try to run the Tasks independently they run perfectly fine, but when I try to run them in a Composed Task it fails.

Below are the details:

Initializing the Spring Cloud Server:

java -jar spring-cloud-dataflow-server-local-1.5.2.RELEASE.jar \
    --spring.datasource.url=jdbc:mysql://0.0.0.0:3306/sdataflow \
    --spring.datasource.username=myUser\
    --spring.datasource.password=myPassword\
    --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver \
    --spring.cloud.dataflow.server.uri=http://0.0.0.0:8181 \
    --logging.level.org.springframework.cloud.task=DEBUG \
    --server.port=8181

Running the composed task using composed-task-runner:

java -jar composedtaskrunner-task-2.0.0.M1.jar --graph="A && B" --dataflow-server-uri="http://0.0.0.0:8181"

I have also tried to run the same composed task using the UI but I am getting exactly the same error. For some reason, the configuration is asking for a resource pointing to http://localhost:9393.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataFlowOperations' defined in class path resource [org/springframework/cloud/dataflow/rest/client/config/DataFlowClientAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.dataflow.rest.client.DataFlowOperations]: Factory method 'dataFlowOperations' threw exception; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:9393": Unexpected end of file from server; nested exception is java.net.SocketException: Unexpected end of file from server
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:587) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:541) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.5.RELEASE.jar!/:5.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar!/:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar!/:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar!/:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar!/:2.0.1.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar!/:2.0.1.RELEASE]
    at org.springframework.cloud.task.app.composedtaskrunner.ComposedtaskrunnerTaskApplication.main(ComposedtaskrunnerTaskApplication.java:29) [classes!/:2.0.0.M1]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_172]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_172]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [composedtaskrunner-task-2.0.0.M1.jar:2.0.0.M1]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [composedtaskrunner-task-2.0.0.M1.jar:2.0.0.M1]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [composedtaskrunner-task-2.0.0.M1.jar:2.0.0.M1]
dbustosp
  • 4,208
  • 25
  • 46

1 Answers1

1

We have had an issue in the latest 1.1.1.RELEASE of Composed Task Runner, where the --dataflow-server-uri property is not recognized at runtime [see spring-cloud-task-app-starters/composed-task-runner#39]. It is most likely an issue in 2.0 M1 as well. We will fix it in the 2.0 GA (Dearborn.RELEASE) scheduled for next week.

In the meantime,

Either you can switch to 1.1.0.RELEASE (with --dataflow-server-uri property) or use the full-form property --spring.cloud.dataflow.client.server-uri="http://0.0.0.0:8181" in DSL instead.

Sabby Anandan
  • 5,636
  • 2
  • 12
  • 21