Camunda 8 springboot jar with docker

Hi Team,
I am using docker for the camunda self hosted environment, and when spring boot runs from eclipse, it’s working fine. But when deployed in docker container, it fails as connection refused.
In my docker container i hhave two container one is zeebe and second one is my jar file (from springboot).
i research but i did not get any solution.
please help me here , Thanks in advance

Regards,
Supriya K

Hi @Supriya - my first thought is that the issue is with Docker networking. What address are you using in your Spring application to connect to Zeebe? Is that address correctly exposed from the Zeebe image? Does the Spring container know how to route network traffic to the other container? If you connect to your Spring Docker container and try to connect to Zeebe from a command line (ping, or using zbctl, etc.), does it work?

It might be helpful to review some Docker networking, as I find it confusing sometimes. Here’s one tutorial that I have bookmarked: How To Communicate Between Docker Containers - Tutorial Works

1 Like

Thanks for your response.
in java application file i am using
zeebe.client.broker.gateway.address=zeebe:26500

and in my docker container
services:
zeebe:
image: camunda/zeebe:latest
ports:
- “26500:26500”

workflow_ms: ---- this is java jar container
build: .
ports:
- “8081:8081”

Hi @Supriya ,
As mentioned in the tutorial shared by @nathan.loding
One possible solution is: you need let your containers communicate with each other by attaching them to the same network.
Currently the camunda platform will have a network created by default.
You can attach your spring container to the same network to communicate with zeebe

1 Like

Hi @Supriya - I think @Praveen_Kumar_Reddy has a great suggestion. I feel confident that this isn’t related to Camunda, but is rather related to Docker networking and how containers communicate with each other across the host. It’s a complicated subject, but might be beyond the scope of these forums.

Did you read the tutorial I shared? Have you built a virtual network that includes your container? (There’s also lots of other tutorials and videos out there if you search “docker container networking”.)

1 Like

Thank you so much.
now it is working

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