Activemq can't run due to address already in u

2020-06-08 03:08发布

How to solve the error?

Java Runtime: Oracle Corporation 1.7.0_05 E:\Program Files\Java\jdk1.7.0_05\jre
  Heap sizes: current=1004928k  free=994439k  max=1004928k
    JVM args: -Dcom.sun.management.jmxremote -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\conf;F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\../conf;F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\../conf; -Dactivemq.home=F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\.. -Dactivemq.base=F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\.. -Dactivemq.conf=F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\conf -Dactivemq.data=F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\data -Djava.io.tmpdir=F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\data\tmp
ACTIVEMQ_HOME: F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..
ACTIVEMQ_BASE: F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..
ACTIVEMQ_CONF: F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\conf
ACTIVEMQ_DATA: F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\data
Loading message broker from: xbean:activemq.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@2b9f7952: startup date [Sat Jul 28 18:10:38 CST 2012]; root of context hierarchy
 INFO | PListStore:[F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\data\localhost\tmp_storage ] started
 INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[F:\workspace\Eclipse java\destinytalk\DestinyServer\apache-activemq-5.6.0\bin\..\data\kahadb]
 INFO | KahaDB is version 4
 INFO | Recovering from the journal ...
 INFO | Recovery replayed 1 operations from the journal in 0.071 seconds.
 INFO | ActiveMQ 5.6.0 JMS Message Broker (localhost) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
ERROR | Failed to start ActiveMQ JMS Message Broker (localhost, null). Reason: java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use: JVM_Bind
java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use: JVM_Bind
    at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
    at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1836)
    at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2327)
    at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2243)
    at org.apache.activemq.broker.BrokerService.start(BrokerService.java:551)
    at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)

标签: activemq
14条回答
手持菜刀,她持情操
2楼-- · 2020-06-08 03:42

The error is telling you that there is either already a broker running or some other service running that is using the required ports that ActiveMQ want to bind its TCP transport and JMX service to. You can see this in the error string "Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use:" and "Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use:"

To resolve the issue you need to figure out what is running that is using those ports, or change the config to use other ports

查看更多
放荡不羁爱自由
3楼-- · 2020-06-08 03:43

Try running it with admin rights.

In windows- Go to the directory -apache-activemq-5.4.3\bin and Right click on activemq.bat and run as administrator.

Cheers

查看更多
登录 后发表回答