Docker Community Forums

Share and learn in the Docker community.

No connection with ports exposed and published

I have some middleware running in a docker container.

When I run this middleware on my host everything works fine.

When I ran it on the docker container with all the necessary ports exposed and published:

Dockerfile:

EXPOSE 5672 15672 1337 1338 5556 3000

Docker-compose.yml

ports:
- "5672:5672"
- "15672:15672"
- "1337:1337"
- "1338:1338"
- "5556:5556"
- "3000:3000"

It’s weird because I have rabbitmq and mule in that image. Rabbit works well beacause I can access the management console and my mule app publish in it.

  • I have a flow, that with a quartz component publish in rabbitmq a keep alive each 30ms, and works well. But I have other flow which receives information in an UDP inbound endpoint and publish that on a rabbitmq queue. The inbound endpoind doesn´t receive anything, this endpoint listens in 0.0.0.0 and port 1338, and I am binding 1338:1338.

  • So if I receive packages on my localhost:1338 in my host machine, the inbound endpoint should receive it no?

  • Also in other flow I have a java client socket which gives me connection refeused.

The strange thing is that nothing of this happens when I run this on my host machine, and in docker I have the ports exposed and published.

Thanks everyone

Just need to indicate that it’s UDP protocol

FROM:

  • 1338:1338

TO:

  • 1338:1338/udp