Caused by: java.net.BindException: Address already in use: JVM_Bind(ActiveMq已经启动)
1.本地启动项目开启两个启动类出错。
Error creating bean with name 'brokerService' defined in class path resource
[com/dfocus/meeting/framework/config/mq/ActiveMQConfig.class]:
Bean instantiation via factory method failed;
nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.apache.activemq.broker.BrokerService]:
Factory method 'brokerService' threw exception;
nested exception is java.io.IOException: Failed to bind to server socket:
tcp://localhost:61616 due to: java.net.BindException: Address already in use: JVM_Bind
由于项目使用了内置的ActiveMq,第一个启动类启动成功,内置ActiveMq也启动了。启动第二个启动类时,ActiveMq正在启动中,所以报错。
2.解决方法
1.在第二个启动类修改ActiveMq端口号,启动一个新的内置ActiveMq。
2.使用外部部署的ActiveMq服务器。
9c773fce-f5bf-4344-b5e0-06e398379c65
分类:
ActiveMq
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构