Port 8161 is the Apache ActiveMQ web console port. ActiveMQ Classic uses 8161 for its admin UI and REST API. The default credentials are admin/admin. In 2023, a critical remote code execution vulnerability (CVE-2023-46604) in ActiveMQ's OpenWire protocol (port 61616) made unpatched instances trivial to compromise. Port 8161 should require strong authentication and not be publicly exposed.
Port Number
8161
Protocol
TCP
Service
ActiveMQ Management Console
Range
IANA Registered (1024–49151)
Check if default credentials still work (should return 401 after hardening)
curl -u admin:admin http://localhost:8161/admin/ -o /dev/null -w '%{http_code}'Get ActiveMQ version via Jolokia (check if CVE-2023-46604 patch needed)
curl -s http://localhost:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost | jq .value.BrokerVersionScan for default credentials and service versions
nmap -sV -p 8161,61616 --script=http-default-accounts targetCheck configured web console users (look for default 'admin' entries)
grep -r 'admin' /opt/activemq/conf/jetty-realm.propertiescurl -u admin:admin http://localhost:8161/api/brokers
curl -u admin:admin http://localhost:8161/api/queuesActiveMQ was created at LogicBlaze in 2004, donated to Apache Foundation in 2005. Port 8161 was chosen for the embedded Jetty web console. ActiveMQ became the most popular open-source message broker before Kafka (2011) and RabbitMQ's rise. ActiveMQ Artemis (the next-generation broker, merged from HornetQ) uses the same port. CVE-2023-46604 in October 2023 was one of the most exploited vulnerabilities of the year.
How do I patch CVE-2023-46604?
Upgrade to ActiveMQ 5.15.16, 5.16.7, 5.17.6, or 5.18.3+. If immediate upgrade impossible: set environment variable ACTIVEMQ_OPTS=-Dorg.apache.activemq.SERIALIZABLE_PACKAGES=java.lang,javax.security,java.util,org.apache.activemq,org.fusesource.hawtbuf,com.thoughtworks.xstream.converters.collections to restrict deserialization classes. Also block external access to port 61616.
ActiveMQ Classic vs Artemis?
ActiveMQ Classic: mature, widely deployed, KahaDB storage, simpler configuration. Artemis: high-performance (journal-based storage, non-blocking architecture), supports AMQP 1.0 natively, better clustering (live/backup pairs). New deployments should use Artemis. Classic is in maintenance mode. Both use port 8161 for web console by default.