Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

302
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda