0
votes

I am running a composed task using the sample batch job.

task create batch-comp --definition "b1: batch && b2: batch"

When I run this in my Kubernetes scdf server I get the following error:

Unsatisfied dependency expressed through field 'taskOperations'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskOperations' defined in class path resource [org/springframework/cloud/task/app/composedtaskrunner/DataFlowConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.dataflow.rest.client.TaskOperations]: Factory method 'taskOperations' threw exception; nested exception is org.springframework.web.client.HttpClientErrorException: 401 null at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.12.RELEASE.jar!/:4.3.12.RELEASE]

I am using the composed task runner task app given in the spring cloud documentation.

The issue might be because the composed task runner does not have the dataflow server user and password. As the error is 401, unauthorized error. Any idea how I can pass those ?

1
The exception stack trace is incomplete, so please provide a complete stack trace or the relevant part. Also, please specify versions of the products used (e.g., s-c-dataflow, boot etc)Oleg Zhurakousky
@OlegZhurakousky Any idea how I can pass my dataflow server uri, password and username to the composed task i created? As i think the composed task runner is not getting these values.Siddhant Sorann
I am not sure how do you expect to get help if you are ignoring the follow up questions which are asking you to provide additional relevant information and instead asking more questions without sharing any more details? I honestly have no idea what are you trying to do. . . That said, try to disable security security.basic.enabled=true and/or @SpringBootApplication(exclude = { SecurityAutoConfiguration.class })Oleg Zhurakousky
Hey @OlegZhurakousky Sorry for that but I dint have access to the system to provide you the full stack of errors.Siddhant Sorann

1 Answers

0
votes

If the SCDF platform security is enabled, please launch the composed task with the following arguments:

task launch --name composed-task --arguments "--dataflow-server-username=username --dataflow-server-password=password"