杨梅冲
每天在想什么呢?
随笔 - 198,  文章 - 0,  评论 - 8,  阅读 - 17万

官网:https://activemq.apache.org/index.html

下载最新:https://activemq.apache.org/components/classic/download/

下载老版本:https://activemq.apache.org/components/classic/documentation/download-archives

复制代码
tar -xzvf apache-activemq-5.15.14-bin.tar.gz
mv apache-activemq-5.15.14-bin activemq
cd activemq/bin

# 启动失败查看错误使用
./activemq console
# 启动
./activemq start
# 带日志的启动
./activemq start > logs/activestart.log
复制代码

linux启动报错

复制代码
# activemq/data/activemq.log
2024-06-26 17:55:11,498 | ERROR | Failed to start Apache ActiveMQ (localhost, ID:server_test-38193-1719395711115-0:1) | org.apache.activemq.broker.BrokerService | main
java.net.URISyntaxException: Illegal character in hostname at index 11: ws://server_test:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600

# 解决方法:
# 这个不是端口占用问题,将配置文件中0.0.0.0的ip改为127.0.0.1 就可以重新启动解决
vim activemq/conf/activemq.xml
<transportConnector name="openwire" uri="tcp://127.0.0.1:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="amqp" uri="amqp://127.0.0.1:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp" uri="stomp://127.0.0.1:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="mqtt" uri="mqtt://127.0.0.1:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="ws" uri="ws://127.0.0.1:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>

# 5.18版本已修复这个错误
5.18 版本需要将activemq/conf/jetty.xml中 8161端口的 host改为 0.0.0.0或者 IP,或者不能远程连接
复制代码

登陆后台:http://192.168.10.10:8161/ ,默认账号密码:admin/admin

如果需要修改默认密码conf/jetty-realm.properties:

# Defines users that can access the web (console, demo, etc.)
# username: password [,rolename ...]
admin: 123456, admin
user: 123456, user

Jms连接MQ需要的帐号密码: 

默认帐号:system

默认密码:manager

cat conf/credentials.properties
activemq.username=system
activemq.password=manager

docker安装 activemq

docker run --name='activemq5' --restart=always -d -e 'ACTIVEMQ_ADMIN_LOGIN=admin' -e 'ACTIVEMQ_ADMIN_PASSWORD=123456' -e 'ACTIVEMQ_CONFIG_MINMEMORY=1024' -e  'ACTIVEMQ_CONFIG_MAXMEMORY=1024' -v /usr/local/activemq/data:/opt/apache-activemq/data -p 8161:8161 -p 61616:61616 -p 61613:61613 apache/activemq-classic:5.18.6

密码要是没生效就登录到里面去修改

 

posted on   杨梅冲  阅读(578)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2019-06-26 python之pymysql模块

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示