在同一机器中设置多个ActiveMQ代理时出错

时间:2021-04-26 08:25:38

I fallowed the exact steps in [1] in order to setup multiple ActiveMQ brokers in the same server. When I start the second instance I always get the same error.

为了在同一服务器中设置多个ActiveMQ代理,我使用了[1]中的精确步骤。当我开始第二个实例时,我总是得到相同的错误。

One thing I noticed is configurations on both instances are same. for instance configurations like port s are same in both activemq.xml and jetty.xml.

我注意到两个实例上的配置是相同的。例如,像端口s这样的配置在两个activemq中都是相同的。xml和jetty.xml。

I even change the ports of the second instance so it won't get crashed with the first intance. But I get the same Exception.

我甚至修改了第二个实例的端口,这样它就不会在第一个意图中崩溃。但我也有同样的例外。

https://sbforge.org/display/BITMAG/Running+multiple+activemq+instances+on+the+same+server

https://sbforge.org/display/BITMAG/Running +多个+ activemq + +在+ + +服务器实例

INFO | Apache ActiveMQ 5.9.0 (instance1, ID:udara-54224-1391513355578-0:1) is shutdown INFO | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@33e228bc: startup date [Tue Feb 04 06:29:14 EST 2014]; root of context hierarchy WARN | Exception thrown from LifecycleProcessor on context close java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.apache.activemq.xbean.XBeanBrokerFactory$1@33e228bc: startup date [Tue Feb 04 06:29:14 EST 2014]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:360) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1057) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010) at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30) at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:782) at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:574) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73) 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:1608)

信息| Apache activemq5.9.0 (instance1, ID:udara-54224-1391513355578-0:1)是关闭信息|关闭org.apache.activemq.xbean。XBeanBrokerFactory$1@33e228bc:启动日期[Tue Feb 04 06:29:14 EST 2014];上下文层次结构的根警告在上下文关闭java.lang上从生命周期处理器抛出的|异常。IllegalStateException: LifecycleProcessor没有初始化——在通过context: org.apache.activemq.xbean调用生命周期方法之前调用‘refresh’。XBeanBrokerFactory$1@33e228bc:启动日期[Tue Feb 04 06:29:14 EST 2014];org.springframe . context.support.abstractapplicationcontext . context.getlifecycleprocessor (AbstractApplicationContext.java: AbstractApplicationContext.java: springcontext . 360) org.springframeworkcom . brokerservice .stop(BrokerService.java:782)在网站上。调用(nativemethodorimpl .invoke)方法(nativemethodaccessorimpl .invoke) (nativemethodaccess or .java:39)

1 个解决方案

#1


3  

According to those instructions, you definitely need to change the ports for each instance

根据这些说明,您肯定需要更改每个实例的端口

each instance had its port numbers in <instance>/conf/activemq.xml and conf/jetty.xml edited, so instance1 listens on port 60001 and is managed on port 8001, instance2 on 60002 and 8002, instance3 on 60003 and 8003

That stack trace that you printed is a WARN and not an ERROR - does it not still work anyway? The log you printed is for instance1 - are you trying to start instance2? In which case your config for instance2 is wrong. Do a file search in the instance2/conf/ folder for any references to instance1, that should hopefully show you where the error is

您打印的堆栈跟踪是一个警告,而不是一个错误——无论如何它仍然不起作用吗?你打印的日志是instance1 -你是否正在尝试启动instance2?在这种情况下,您的配置为instance2是错误的。在instance2/conf/文件夹中对任何对instance1的引用进行文件搜索,这应该能让您知道错误在哪里

#1


3  

According to those instructions, you definitely need to change the ports for each instance

根据这些说明,您肯定需要更改每个实例的端口

each instance had its port numbers in <instance>/conf/activemq.xml and conf/jetty.xml edited, so instance1 listens on port 60001 and is managed on port 8001, instance2 on 60002 and 8002, instance3 on 60003 and 8003

That stack trace that you printed is a WARN and not an ERROR - does it not still work anyway? The log you printed is for instance1 - are you trying to start instance2? In which case your config for instance2 is wrong. Do a file search in the instance2/conf/ folder for any references to instance1, that should hopefully show you where the error is

您打印的堆栈跟踪是一个警告,而不是一个错误——无论如何它仍然不起作用吗?你打印的日志是instance1 -你是否正在尝试启动instance2?在这种情况下,您的配置为instance2是错误的。在instance2/conf/文件夹中对任何对instance1的引用进行文件搜索,这应该能让您知道错误在哪里