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

posted @   sowler  阅读(171)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示