Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
5.14.4
-
None
-
None
Description
Hi Team,
I had experienced that AMQ automatic restart itself after SQL Exception occur. But it's failed to start because "Address already in use".
Apache ActiveMQ 5.14.4
I've configured for JDBC persistence.
activemq.xml
<persistenceAdapter> <jdbcPersistenceAdapter cleanupPeriod="0" dataSource="#oracle-ds"/> </persistenceAdapter> <import resource="activemq-jdbc.xml"/>
activemq-jdbc.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <bean class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close" id="oracle-ds"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@XX.XX.XX/XXXX" /> <property name="username" value="XXX" /> <property name="password" value="XXX" /> <property name="poolPreparedStatements" value="true" /> </bean> </beans>
Step to reproduced
- Start ActiveMQ by run activemq.bat and wait until it's initialized completed
- Use SQL Developer to kill the session of ActiveMQ.
- Wait around 10 seconds and the SQL exception occurs in activemq.log
- ActiveMQ try to restart itself but failed to start because port 8161 (ActiveMQ Admin page) is already in use.
- ActiveMQ is stopped.
I understand that when the exceptions occurs on ActiveMQ then it's trying to restart itself. But with this scenario it's always failed to start because "Address already in use". Then it's required me to manually to stop and start it again to bounce the process.
My questions are:
- Is this the expected behavior when the exception is occur and then ActiveMQ restart itself?
- Can I increase retry count or retry with delay?
- Port 8161 is not successfully closed during restart process?
- How to avoid the exception "Address already in use"
Please also find my full stack trace here:
2020-11-05 09:57:47,243 | INFO | Started ServerConnector@475958{HTTP/1.1}{0.0.0.0:8161} | org.eclipse.jetty.server.ServerConnector | WrapperSimpleAppMain 2020-11-05 09:57:47,244 | INFO | Started @62783ms | org.eclipse.jetty.server.Server | WrapperSimpleAppMain 2020-11-05 09:59:51,055 | ERROR | Failed to update database lock: java.sql.SQLRecoverableException: ORA-00028: your session has been killed | org.apache.activemq.store.jdbc.DefaultDatabaseLocker | ActiveMQ JDBC PA Scheduled Task java.sql.SQLRecoverableException: ORA-00028: your session has been killed at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1044) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3665) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1352) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:98) at org.apache.activemq.store.jdbc.DefaultDatabaseLocker.keepAlive(DefaultDatabaseLocker.java:164) at org.apache.activemq.broker.LockableServiceSupport.keepLockAlive(LockableServiceSupport.java:127) at org.apache.activemq.broker.LockableServiceSupport$1.run(LockableServiceSupport.java:98) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2020-11-05 09:59:51,059 | ERROR | localhost, no longer able to keep the exclusive lock so giving up being a master | org.apache.activemq.broker.LockableServiceSupport | ActiveMQ JDBC PA Scheduled Task 2020-11-05 09:59:51,061 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:1) is shutting down | org.apache.activemq.broker.BrokerService | ActiveMQ JDBC PA Scheduled Task 2020-11-05 09:59:51,064 | INFO | Connector openwire stopped | org.apache.activemq.broker.TransportConnector | ActiveMQ JDBC PA Scheduled Task 2020-11-05 09:59:51,077 | INFO | PListStore:[C:\DF_STP_Environment\apache-activemq-5.14.4\bin\win64\..\..\data\localhost\tmp_storage] stopped | org.apache.activemq.store.kahadb.plist.PListStoreImpl | ActiveMQ JDBC PA Scheduled Task 2020-11-05 09:59:51,089 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:1) uptime 2 minutes | org.apache.activemq.broker.BrokerService | ActiveMQ JDBC PA Scheduled Task 2020-11-05 09:59:51,089 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:1) is shutdown | org.apache.activemq.broker.BrokerService | ActiveMQ JDBC PA Scheduled Task 2020-11-05 09:59:51,090 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@6128db86: startup date [Thu Nov 05 09:59:51 ICT 2020]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain 2020-11-05 09:59:51,253 | INFO | Using Persistence Adapter: JDBCPersistenceAdapter(org.apache.commons.dbcp2.BasicDataSource@14f00b08) | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:01,836 | INFO | Database adapter driver override recognized for : [oracle_jdbc_driver] - adapter: class org.apache.activemq.store.jdbc.adapter.OracleJDBCAdapter | org.apache.activemq.store.jdbc.JDBCPersistenceAdapter | WrapperSimpleAppMain 2020-11-05 10:00:18,308 | INFO | Database lock driver override not found for : [oracle_jdbc_driver]. Will use default implementation. | org.apache.activemq.store.jdbc.JDBCPersistenceAdapter | WrapperSimpleAppMain 2020-11-05 10:00:18,308 | INFO | Attempting to acquire the exclusive lock to become the Master broker | org.apache.activemq.store.jdbc.DefaultDatabaseLocker | WrapperSimpleAppMain 2020-11-05 10:00:19,298 | INFO | Becoming the master on dataSource: org.apache.commons.dbcp2.BasicDataSource@14f00b08 | org.apache.activemq.store.jdbc.DefaultDatabaseLocker | WrapperSimpleAppMain 2020-11-05 10:00:19,299 | INFO | PListStore:[C:\DF_STP_Environment\apache-activemq-5.14.4\bin\win64\..\..\data\localhost\tmp_storage] started | org.apache.activemq.store.kahadb.plist.PListStoreImpl | WrapperSimpleAppMain 2020-11-05 10:00:36,271 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:2) is starting | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:44,207 | INFO | Listening for connections at: tcp://U6077174-TPL-A:61616 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain 2020-11-05 10:00:44,207 | INFO | Connector openwire started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain 2020-11-05 10:00:44,207 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:2) started | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:44,207 | INFO | For help or more information please see: http://activemq.apache.org | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:44,227 | INFO | jetty-9.2.13.v20150730 | org.eclipse.jetty.server.Server | WrapperSimpleAppMain 2020-11-05 10:00:44,348 | INFO | No Spring WebApplicationInitializer types detected on classpath | /admin | WrapperSimpleAppMain 2020-11-05 10:00:44,406 | INFO | ActiveMQ WebConsole available at http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain 2020-11-05 10:00:44,406 | INFO | ActiveMQ Jolokia REST API available at http://0.0.0.0:8161/api/jolokia/ | org.apache.activemq.web.WebConsoleStarter | WrapperSimpleAppMain 2020-11-05 10:00:44,460 | INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | WrapperSimpleAppMain 2020-11-05 10:00:44,533 | INFO | Started o.e.j.w.WebAppContext@66f69a3c{/admin,file:/C:/DF_STP_Environment/apache-activemq-5.14.4/webapps/admin/,AVAILABLE} | org.eclipse.jetty.server.handler.ContextHandler | WrapperSimpleAppMain 2020-11-05 10:00:44,534 | INFO | ActiveMQ Console at http://ServerConnector@54c2c4a4{HTTP/1.1}{0.0.0.0:8161}/admin | org.eclipse.jetty.webapp.WebAppContext | WrapperSimpleAppMain 2020-11-05 10:00:44,619 | INFO | No Spring WebApplicationInitializer types detected on classpath | /api | WrapperSimpleAppMain 2020-11-05 10:00:45,153 | INFO | jolokia-agent: Using policy access restrictor classpath:/jolokia-access.xml | /api | WrapperSimpleAppMain 2020-11-05 10:00:45,159 | INFO | jolokia-agent: jolokia:type=Config is already registered. Adding it with jolokia:type=Config,uuid=ab3a26c8-8be8-4c46-96e3-1ad94283608c, but you should revise your setup in order to either use a qualifier or ensure, that only a single agent gets registered (otherwise history functionality might not work) | /api | WrapperSimpleAppMain 2020-11-05 10:00:45,159 | INFO | jolokia-agent: Cannot register (legacy) MBean handler for config store with name jmx4perl:type=Config since it already exists. This is the case if another agent has been already started within the same JVM. The registration is skipped. | /api | WrapperSimpleAppMain 2020-11-05 10:00:45,159 | INFO | jolokia-agent: Jolokia Discovery MBean registration is skipped because there is already one registered. | /api | WrapperSimpleAppMain 2020-11-05 10:00:45,160 | INFO | Started o.e.j.w.WebAppContext@463e37b0{/api,file:/C:/DF_STP_Environment/apache-activemq-5.14.4/webapps/api/,AVAILABLE} | org.eclipse.jetty.server.handler.ContextHandler | WrapperSimpleAppMain 2020-11-05 10:00:45,160 | INFO | Apache ActiveMQ REST API at http://ServerConnector@54c2c4a4{HTTP/1.1}{0.0.0.0:8161}/api | org.eclipse.jetty.webapp.WebAppContext | WrapperSimpleAppMain 2020-11-05 10:00:45,160 | WARN | FAILED ServerConnector@54c2c4a4{HTTP/1.1}{0.0.0.0:8161}: java.net.BindException: Address already in use: bind | org.eclipse.jetty.util.component.AbstractLifeCycle | WrapperSimpleAppMain java.net.BindException: Address already in use: bind at java.base/sun.nio.ch.Net.bind0(Native Method) at java.base/sun.nio.ch.Net.bind(Net.java:455) at java.base/sun.nio.ch.Net.bind(Net.java:447) at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.server.Server.doStart(Server.java:366) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269) at org.springframework.beans.factory.config.MethodInvokingBean.invokeWithTargetException(MethodInvokingBean.java:119) at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 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:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67) 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.runTask(StartCommand.java:87) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) at org.apache.activemq.console.Main.main(Main.java:115) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) at java.base/java.lang.Thread.run(Thread.java:834) 2020-11-05 10:00:45,228 | WARN | FAILED org.eclipse.jetty.server.Server@2d86772e: java.net.BindException: Address already in use: bind | org.eclipse.jetty.util.component.AbstractLifeCycle | WrapperSimpleAppMain java.net.BindException: Address already in use: bind at java.base/sun.nio.ch.Net.bind0(Native Method) at java.base/sun.nio.ch.Net.bind(Net.java:455) at java.base/sun.nio.ch.Net.bind(Net.java:447) at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80) at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.server.Server.doStart(Server.java:366) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:269) at org.springframework.beans.factory.config.MethodInvokingBean.invokeWithTargetException(MethodInvokingBean.java:119) at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 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:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67) 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.runTask(StartCommand.java:87) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) at org.apache.activemq.console.Main.main(Main.java:115) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) at java.base/java.lang.Thread.run(Thread.java:834) 2020-11-05 10:00:45,266 | WARN | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'invokeStart' defined in class path resource [jetty.xml]: Invocation of init method failed; nested exception is java.net.BindException: Address already in use: bind | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain 2020-11-05 10:00:45,274 | INFO | Stopped ServerConnector@54c2c4a4{HTTP/1.1}{0.0.0.0:8161} | org.eclipse.jetty.server.ServerConnector | WrapperSimpleAppMain 2020-11-05 10:00:45,280 | INFO | Stopped o.e.j.w.WebAppContext@463e37b0{/api,file:/C:/DF_STP_Environment/apache-activemq-5.14.4/webapps/api/,UNAVAILABLE} | org.eclipse.jetty.server.handler.ContextHandler | WrapperSimpleAppMain 2020-11-05 10:00:45,282 | INFO | Destroying Spring FrameworkServlet 'dispatcher' | /admin | WrapperSimpleAppMain 2020-11-05 10:00:45,284 | INFO | Stopped o.e.j.w.WebAppContext@66f69a3c{/admin,file:/C:/DF_STP_Environment/apache-activemq-5.14.4/webapps/admin/,UNAVAILABLE} | org.eclipse.jetty.server.handler.ContextHandler | WrapperSimpleAppMain 2020-11-05 10:00:45,291 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:2) is shutting down | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:45,292 | INFO | Connector openwire stopped | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain 2020-11-05 10:00:45,295 | INFO | PListStore:[C:\DF_STP_Environment\apache-activemq-5.14.4\bin\win64\..\..\data\localhost\tmp_storage] stopped | org.apache.activemq.store.kahadb.plist.PListStoreImpl | WrapperSimpleAppMain 2020-11-05 10:00:46,291 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:2) uptime 55.038 seconds | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:46,292 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID:U6077174-TPL-A-55145-1604545040076-0:2) is shutdown | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain 2020-11-05 10:00:47,285 | ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'invokeStart' defined in class path resource [jetty.xml]: Invocation of init method failed; nested exception is java.net.BindException: Address already in use: bind | org.apache.activemq.xbean.XBeanBrokerFactory | WrapperSimpleAppMain org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'invokeStart' defined in class path resource [jetty.xml]: Invocation of init method failed; nested exception is java.net.BindException: Address already in use: bind at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) 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:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104) at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67) 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.runTask(StartCommand.java:87) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154) at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63) at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.activemq.console.Main.runTaskClass(Main.java:262) at org.apache.activemq.console.Main.main(Main.java:115) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.net.BindException: Address already in use: bind at java.base/sun.nio.ch.Net.bind0(Native Method) at java.base/sun.nio.ch.Net.bind(Net.java:455) at java.base/sun.nio.ch.Net.bind(Net.java:447) at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227) at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80)