0
votes

I registered the batch-job task from https://repo.spring.io/libs-snapshot/io/spring/cloud/batch-job/1.0.0.RELEASE/ in Pivotal Cloud Foundry.

When launching the task I see the error

CF-UnprocessableEntity(10008): Task must have a droplet. Specify droplet or assign current droplet to app.

These are the commands I executed to register this task

app register --name batch-job --type task --uri maven://io.spring.cloud:batch-job:jar:1.0.0.RELEASE

task create myjob --definition batch-job

task list

task launch myjob

task execution list

Appreciate if someone can point what I am i missing.

2

2 Answers

1
votes

It means your app is not deployed correctly. Look at cf push log for more details.

I had the similar error where it was not determining the buildpack.

I have added below in my pom.xml so PCF automatically detect the buildpack.

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>${spring.boot.version}</version>
    <executions>
        <execution>
            <goals>
                <goal>repackage</goal>
            </goals>
        </execution>
    </executions>
</plugin>
0
votes

This error is usually observed when the default API timeout (30s) is not enough to successfully deploy and launch the Task application. You can override the default behavior by setting a larger value via SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_TASK_API_TIMEOUT. Please review the configuration section in the reference guide for more details.

FYI: We recently changed the default timeout experience to 360s via spring-cloud/spring-cloud-deployer-cloudfoundry#192. This is included in the current 1.2.0.BUILD-SNAPSHOT build.