Zeebe gRPC connection refused with spring-zeebe-starter in Docker Swarm setup

Hi everyone,

I’m working on a Camunda 8 microservice setup using Spring Boot with spring-zeebe-starter (version 8.5.19) and deploying with Docker Swarm.

Microservices:

  • order-service (Spring Boot)
  • eureka-server (Spring Boot Eureka for service registry)
  • zeebe (custom Zeebe broker image)

Dependency:

<dependency>
  <groupId>io.camunda</groupId>
  <artifactId>spring-zeebe-starter</artifactId>
  <version>8.5.19</version>
</dependency>

Application Properties:

spring.application.name=order
server.port=9093

# Eureka
eureka.client.service-url.defaultZone=http://eureka-server:8761/eureka/
eureka.client.register-with-eureka=true
eureka.client.fetch-registry=true
eureka.instance.prefer-ip-address=true

# Zeebe (gRPC only)
camunda.client.mode=simple
camunda.client.zeebe.gateway-address=zeebe:26500
camunda.client.zeebe.auth.enabled=false
camunda.client.zeebe.plaintext=true
camunda.client.rest.enabled=false
camunda.client.zeebe.maxMetadataSize=32768
camunda.client.zeebe.maxMessageSize=4194304

# OTLP
management.otlp.metrics.export.enabled=false

# Disable other clients
camunda.client.task-client.enabled=false
camunda.client.console.enabled=false
camunda.client.operate.enabled=false
camunda.client.optimize.enabled=false

# Workers
camunda.client.defaults.jobWorker.enabled=true
camunda.client.defaults.jobWorker.stream-enabled=true

# Logging
logging.level.io.camunda=DEBUG
logging.level.io.camunda.zeebe=DEBUG
logging.level.io.camunda.zeebe.spring.client=DEBUG

Docker-compose.yaml

version: '3.8'

services:
  zeebe:
    image: ektahande/zeebe:8.5.19-custom-v9
    container_name: zeebe
    ports:
      - "26500:26500"
    networks:
      - microservices-network

  eureka-server:
    image: ektahande/eureka-server:v12
    container_name: eureka-server
    ports:
      - "8761:8761"
    networks:
      - microservices-network
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://localhost:8761"]
      interval: 5s
      timeout: 2s
      retries: 20

  order-service:
    image: ektahande/order-service:v17
    container_name: order-service
    ports:
      - "9093:9093"
    environment:
      - EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8761/eureka/
      - CAMUNDA_CLIENT_MODE=simple
      - CAMUNDA_CLIENT_ZEEBE_GATEWAY_ADDRESS=zeebe:26500
      - CAMUNDA_CLIENT_ZEEBE_AUTH_ENABLED=false
      - CAMUNDA_CLIENT_ZEEBE_PLAINTEXT=true
      - MANAGEMENT_OTLP_METRICS_EXPORT_ENABLED=false
      - CAMUNDA_CLIENT_ZEEBE_MAXMETADATASIZE=32768
      - CAMUNDA_CLIENT_ZEEBE_MAXMESSAGESIZE=4194304
    depends_on:
      - zeebe
      - eureka-server
    networks:
      - microservices-network

networks:
  microservices-network:
    driver: overlay

Custom Zeebe image Dockerfile:

FROM camunda/zeebe:8.5.19

COPY zeebe.cfg.yaml /usr/local/zeebe/config/zeebe.cfg.yaml

ENV JAVA_TOOL_OPTIONS="-Dmanagement.otlp.metrics.export.enabled=false"

ENTRYPOINT ["broker"]

zeebe.cfg.yaml:

gateway:
  enable: true
  network:
    host: 0.0.0.0
    port: 26500

broker:
  network:
    host: 0.0.0.0

cluster:
  nodeId: 0
  clusterSize: 1
  replicationFactor: 1
  partitionCount: 1

metrics:
  exporters:
    prometheus:
      enabled: false
    otlp:
      enabled: false

The issue:-
When I start the services, my order-service fails with this error:

Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
Caused by: java.net.ConnectException: Connection refused
java.lang.IllegalStateException: Cannot compose rest address from legacy ZeebeClientConfiguration
java.lang.NullPointerException: Cannot invoke "java.util.function.Supplier.get()" because "legacyPropertySupplier" is null

The order-service should connect to Zeebe via gRPC only — no legacy REST fallback.

My Questions:

  1. Is my zeebe.cfg.yaml and custom image setup correct for gRPC gateway mode?
  2. Do I need to expose any other ports or use a different gateway-address?
  3. Why is it trying to compose a REST address when camunda.client.rest.enabled=false?
    4)Is there something missing for Zeebe’s gRPC to be reachable inside the Docker Swarm network?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.