Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

300
Vistas
Can't reach ActiveMQ Port on Docker from my host

I have a docker Image base on Tomcat 7. My web application start a instance of ActiveMQ. To build the container I add the following configuration docker run .... -p 61616:61616 ...

I can see the configuration on Docker Inspect command:

        "Ports": {
            "5005/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "8091"
                }
            ],
            "61616/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "61616"
                }
            ],
            "8080/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "8090"
                }
            ]
        },

Inside the container if I run:

telnet localhost 61616

i can connect to ActiveMQ instance:

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
▒ActiveMQTcpNoDelayEnabledSizePrefixDisabled    CacheSizeStackTraceEnabled
                                                                          CacheEnabledTightEncodingEnabledMaxInactivityDurationu0 MaxInactivityDurationInitalDelay'

From my host I can't:

Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.

I look for the port with netstat and is avaliable:

netstat -nao

tcp6       0      0 :::61616                :::*                    LISTEN      26503/docker-proxy   off (0.00/0/0)    
tcp6       0      0 :::8090                 :::*                    LISTEN      26511/docker-proxy   off (0.00/0/0)
tcp6       0      0 :::8091                 :::*                    LISTEN      26519/docker-proxy   off (0.00/0/0)

If I try to telnet to the other port, I can connect. What I'm missing?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I solved this problem configuring activeMQ networks with ip 0.0.0.0 Normally the ip was 127.0.0.1 and without dockerizing it, this worked. But inside the docker it didn't

This is my spring jms config (which uses activeMQ)

<amq:broker brokerName="${local.broker.name}" id="broker" persistent="false" deleteAllMessagesOnStartup="true" enableStatistics="false" useLoggingForShutdownErrors="true">
<amq:transportConnectors>
<amq:transportConnector uri="nio://${local.broker.ip}:${local.broker.port}?jms.useAsyncSend=true?jms.useCompression=true" disableAsyncDispatch="false" />
<amq:transportConnectors>
<amq:broker>

the application.properties was

local.broker.name=broker
local.broker.ip=127.0.0.1
local.broker.port=61617

changed it with

local.broker.name=broker
local.broker.ip=0.0.0.0
local.broker.port=61617
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda