- 浏览: 40881 次
- 性别:
- 来自: 北京
最新评论
最近用了一下ActiveMQ做JMS通信使用,在linux上启动不是太顺利。如果你的activemq在linux不能启动可以到${activeMQ_home}/data/activemq.log中查看日志。问题解决了记录一下。
错误日志:
解决办法:
问题很明显是端口占用了,修改${activeMQ_home}/conf/avtivemq.xml中的5672端口即可。
错误日志:
引用
MX: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use | org.apache.activemq.broker.BrokerService | main
java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1970)
at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2431)
at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2349)
at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:650)
at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:617)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:553)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:101)
at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:101)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:65)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:125)
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:84)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.io.IOException: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)
at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)
at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)
at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:307)
at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:139)
at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:106)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1965)
... 41 more
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:132)
... 47 more
java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1970)
at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2431)
at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2349)
at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:650)
at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:617)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:553)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:101)
at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:101)
at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:65)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:125)
at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:84)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:150)
at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
at org.apache.activemq.console.Main.main(Main.java:115)
Caused by: java.io.IOException: Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to: java.net.BindException: Address already in use
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)
at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)
at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)
at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:307)
at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:139)
at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:106)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1965)
... 41 more
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:132)
... 47 more
解决办法:
问题很明显是端口占用了,修改${activeMQ_home}/conf/avtivemq.xml中的5672端口即可。
发表评论
-
springMVC返回json数据时报406错误
2017-02-03 10:32 1260问题描述 初步搭建起springmvc时候使用@respon ... -
duubo服务端无错客户端报错
2016-10-20 10:57 479问题现象: dubbo消费端调用服务端的时候,服务端没有错误日 ... -
javadoc生成文档问题
2016-06-03 16:09 1901今天试着做了一下使用maven生成doc文档,这个功能开始还是 ... -
Windows 安装SCALA后cmd识别不到环境变量
2016-02-01 10:24 3610今天安装了一下scala2.8.1final版本,安装完毕以后 ... -
mysql timestamp 类型字段自动更新时间
2016-09-08 14:37 1375以下两个建表语句的效果是一样的: 以下是代码片段: C ... -
GBase报错INSERT comand denied to user
2015-11-25 10:25 820错误代码: INSERT comand denied to ... -
FtpClient下载zip压缩包之后不能正确解压
2015-11-25 10:10 3639在实施过程中发现java类库FTPClient下载的zip解压 ... -
Maven在linux编译问题
2015-11-05 15:27 1914工作中在linux上Maven打包代码遇到一些问题这里记录一下 ... -
安装好hadoop集群后上传文件出错
2014-12-04 13:04 1872错误日志如下: Java HotSpot(TM) Clie ... -
嵌入iframe页面中使用My97DatePicker问题解决
2014-10-11 10:41 2292现象: 在iframe嵌套的页面点击日历控件年、月部分手动输入 ... -
iframe会导致Jquery入口代码执行延时较长
2014-05-06 22:03 563问题描述: 信息时变慢,经过排查发现是浏览器解析完HTM ...
相关推荐
3. 启动ActiveMQ服务,通常是运行`bin/activemq start`命令。 4. 访问Web控制台(默认地址为`http://localhost:8161/admin`),检查服务状态并进行管理操作。 5. 使用客户端API或协议连接到ActiveMQ,发送和接收消息...
在ActiveMQ 5.8版本中,我们可以通过源码分析来深入了解其内部工作原理和设计模式。 1. **JMS接口与实现**:ActiveMQ作为JMS提供者,实现了JMS规范中的ConnectionFactory、Destination、MessageProducer、...
设置ActiveMQ在系统启动时自动启动: ```bash chkconfig activemq on ``` - **配置Java环境变量**: 在`/usr/local/apache-activemq/bin/env`文件中配置Java环境变量: ```bash nano /usr/local/apache-...
首先,为了启动或停止ActiveMQ,你需要确保已经正确安装了Apache ActiveMQ,并且它的二进制目录位于`/opt/Founder/install/mq/apache-activemq-5.7/bin`。这个目录包含了用于操作ActiveMQ的各种脚本。 **关闭...
### JDK与ActiveMQ版本对应关系 在探讨JDK与ActiveMQ版本对应关系之前,我们首先了解下两者的基本概念。 #### JDK(Java Development Kit) JDK是Java开发工具包的简称,它包含了Java运行环境(JRE)、Java工具、...
解压后,启动ActiveMQ服务,通常通过执行`bin/activemq start`命令。然后,你可以访问默认的Web管理界面`http://localhost:8161/admin`,监控和管理消息队列。 创建Master环境意味着我们需要确保高可用性和故障转移...
本压缩包提供了适合Windows系统的启动工具,使得用户能够快速启动和运行ActiveMQ服务。 首先,我们来了解一下ActiveMQ的基本概念。ActiveMQ的核心功能是作为消息代理,它接收和转发消息,连接不同的应用程序,使得...
在本篇ActiveMQ学习笔记中,我们将探讨如何通过纯代码方式启动一个嵌入式的Broker,这对于测试、开发或者快速原型构建非常有用。ActiveMQ是一个开源的消息代理,它遵循Java消息服务(JMS)规范,提供了高可靠性的...
- **安装**:解压`apache-activemq-5.8.0.zip`,在解压后的目录中运行`bin\start.bat`(Windows)或`bin/activemq start`(Linux/Unix)启动服务。 - **配置**:根据需求编辑`conf\activemq.xml`配置文件,设置...
1. **安装 ActiveMQ**:首先在两台服务器上分别安装 ActiveMQ 5.8,遵循官方文档进行解压、配置和启动。 2. **环境配置**:配置环境变量,例如在 `.bashrc` 文件中添加 `ACTIVEMQ_HOME` 和 `PATH`。 3. **主从配置**...
qt5.8 msvc2015 加载activemq 成功自发自首,编写了模块,可以自行下载,activemq里面的dll,也都存在, 调用方法 CSpiderPluginAMq::GetInstance()->InitNetwork(); CSpiderPluginAMq::GetInstance()->...
本篇文章将详细解析ActiveMQ的启动步骤以及两种不同的测试方法。 首先,让我们了解如何在Windows环境下启动ActiveMQ服务。你需要找到ActiveMQ安装目录下的`bin`目录。在这个目录中,你会看到一个名为`activemq.bat`...
分别在每个节点上启动配置好的ActiveMQ服务,集群就形成了。当一个节点失败时,其他节点会自动接管其任务。 7. **监控与管理**: 由于我们设置了`useJmx="true"`,可以使用JMX工具(如jconsole或VisualVM)监控...
解压缩安装包,设置启动 ActiveMQ 的默认配置文件,然后启动 ActiveMQ 服务。可以使用命令 ./activemq start 启动 ActiveMQ。 测试 ActiveMQ 启动 ActiveMQ 后,可以使用命令 netstat -an | grep 61616 查看 61616...
Wrapper.jar是一个工具,它允许Java应用程序作为Windows服务来运行,这意味着ActiveMQ可以在没有用户登录的情况下启动,并在系统启动时自动运行,提供持续的服务。 在提供的文件名列表`Windows版apache-activemq-...
通过在命令行中执行`java -jar xxx.jar`命令,用户可以启动这个工具,其中`xxx.jar`是实际的jar文件名,需要替换为压缩包内的具体文件名。 使用这个工具,用户可以实现以下关键知识点: 1. **JMS接口**:了解Java ...
描述中提到"启动要求jdk版本8+", 这意味着在运行Apache ActiveMQ 5.16.5之前,你需要确保你的系统上安装了Java Development Kit(JDK)的至少8.0版本。JDK是Java程序开发和运行的基础,ActiveMQ作为Java应用程序,...
在Windows系统上安装并启动ActiveMQ是一项常见的任务,尤其是对于开发和测试环境。以下是一篇关于“Windows系统Apache ActiveMQ一键安装启动”的详细说明。 首先,我们需要了解ActiveMQ的基本概念。ActiveMQ是基于...
1. 安装部署:解压"ActiveMQ-activemq-6.1.0"文件,启动`bin/activemq`脚本,即可启动ActiveMQ服务器。 2. 配置管理:通过Web控制台(默认地址:http://localhost:8161/admin/)进行配置和监控,或者修改`conf/...
在G:\apache-activemq-5.2.0\data目录下可以找到activemq.log日志文件,查看日志文件可以了解ActiveMQ的启动过程和错误信息。 日志文件解释 日志文件中记录了ActiveMQ的启动过程和错误信息。例如,日志文件中显示...