Reputation: 8719
Does ActiveMQ use ports other than mentioned in the activemq.xml?
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:12005?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
</transportConnectors>
In a hosted environment that we use MQ started raising alarms because of the sudden number of ports it was using. I see this in the logs:
WARN | Transport Connection to: tcp://127.0.0.1:41515 failed: java.net.SocketException: Connection reset
WARN | Transport Connection to: tcp://127.0.0.1:41514 failed: java.net.SocketException: Connection reset
WARN | Transport Connection to: tcp://127.0.0.1:41549 failed: java.net.SocketException: Connection reset
WARN | Transport Connection to: tcp://127.0.0.1:41548 failed: java.net.SocketException: Connection reset
This is only part of the many port related WARN messages. Our IT persons informed me that the sniffing tools picked up multiple undeclared ports being used by AMQ.
My Question:
Why MQ is trying to use ports that have not been declared in any conf files?
Why does MQ require so many ports?
Is there a way to know what are the ports OR range of ports that might be used by AMQ?
I am using Active MQ 5.10, JDK 1.7
Upvotes: 1
Views: 3534
Reputation: 22279
The ports you mention are not listening ports used by ActiveMQ.
They are simply ports used by clients connecting to ActiveMQ. There are always two ports in a single TCP connection (client and server). In this case, the server port is always your declared 12005. The client ports will be picked by the operating system, usually "next available". It seems in this case there are some client connections quickly aborted without proper disconnect.
Upvotes: 2