Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!