Workers not launching, job worker pool empty?

Bullet point summary to avoid walls of text:

  • Created cluster
  • Processes start on cluster fine
  • Followed guidelines for setting up workers

Result: process instances are getting stuck, none of them have any workers assigned.

I’m clearly missing a piece of the puzzle here, but I’m not getting which. I’m sure something is wrong with my process diagram but I don’t know what it is. I could use some pointers here :frowning:

Empty jobWorkers pool


Test process diagram

Hi @emiliano.calixto - can you share the code for your job worker?

Pasting it below:

private void openWorkersForCluster(Cluster cluster)
{
    try (ZeebeClient zeebeClient = camundaClusterService.connectToCluster(cluster))
    {
        for (JobType jobType : jobTypes)
        {
            String camundaWorkerTypeCode = jobType.getCamundaWorkerTypeCode();

            log.debug("Starting Camunda worker: {}, cluster: {}", camundaWorkerTypeCode, cluster.getName());

            JobWorker worker = zeebeClient.newWorker()
                                          .jobType(camundaWorkerTypeCode)
                                          .handler((client, job) ->
                                                   {
                                                       jobType.performTask(client, job);

                                                       client.newCompleteCommand(job.getKey())
                                                             .variable("workerType", camundaWorkerTypeCode)
                                                             .send()
                                                             .join();

                                                       log.debug("Completed Camunda task: {}", camundaWorkerTypeCode);
                                                   })
                                          .open();
        }
    }
}

Hi @emiliano.calixto - what is in the list of jobTypes and what are the values being used for the camundaWorkerTypeCode value?

A JobType class is a skeleton for other classes that would make calls for different kinds of workers; it contains only a String field and a logging call.

abstract class JobType
{
abstract String getCamundaWorkerTypeCode();
void performTask(JobClient client, ActivatedJob job)
{
log.debug(“Preparing to execute Camunda task: {}”, getCamundaWorkerTypeCode());
}
}

Here’s an example inheritor of it:

@Slf4j
public class SendEmailJobType
extends JobType
{
@Override
public String getCamundaWorkerTypeCode()
{
return “SendEmailTaskType”;
}
}

Hi @emiliano.calixto - that’s what I assumed the JobType class was, and that’s exactly why I asked: do you have a JobType for the type test?

Yes, we have one. Nothing fancy, just the most barebones we could make it:

public class JobTypeTest extends JobType
{
@Override
String getCamundaWorkerTypeCode()
{
return “test”;
}
}

@emiliano.calixto - since it looks like you have a job worker with the correct type running, the next question is whether it’s connecting to the correct cluster. How have you configured your job worker application to connect to Camunda? Are you using SaaS or Self Managed? What do the job worker logs show?