部署功能时,ActiveMQ在Fuse Jboss中开始失败

时间:2013-05-14 18:57:08

标签: activemq apache-camel fuseesb

我在部署功能时遇到问题。该功能包含三个捆绑包,Karaf很好地部署了这些捆绑包,但是当部署它们时,ActiveMQ开始出现问题。

部署的捆绑包很简单。 “复杂”是一个暴露CXF端点并调用端点模拟的骆驼路线。我只是附上了.kar,那个kar的拉链和我的保险丝日志。该服务正在运行,但activeMQ的问题始终是

错误始终相同:

2013-05-14 15:19:48,046 | INFO  | veMQ Broker: amq | ActiveMQServiceFactory$$anon$1   | ?                                   ? | 106 - org.springframework.context - 3.1.3.RELEASE | Refreshing org.fusesource.mq.fabric.ActiveMQServiceFactory$$anon$1@33c91e: startup date [Tue May 14 15:19:48 ART 2013]; root of context hierarchy
2013-05-14 15:19:48,048 | INFO  | veMQ Broker: amq | XBeanXmlBeanDefinitionReader     | ?                                   ? | 105 - org.springframework.beans - 3.1.3.RELEASE | Loading XML bean definitions from file [/home/ramiro/tecPlata/jboss-fuse-6.0.0.redhat-024/etc/activemq.xml]
2013-05-14 15:19:48,095 | INFO  | veMQ Broker: amq | DefaultListableBeanFactory       | ?                                   ? | 105 - org.springframework.beans - 3.1.3.RELEASE | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1885c3a: defining beans [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.apache.activemq.xbean.XBeanBrokerService#0]; root of factory hierarchy
2013-05-14 15:19:48,159 | INFO  | veMQ Broker: amq | PListStoreImpl                   | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | PListStore:[/home/ramiro/tecPlata/jboss-fuse-6.0.0.redhat-024/data/amq/amq/tmp_storage] started
2013-05-14 15:19:48,163 | ERROR | veMQ Broker: amq | BrokerService                    | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Failed to start Apache ActiveMQ (amq, null). Reason: javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=amq
javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=amq
          at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)[:1.6.0_30]
          at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_30]
          at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:380)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:72)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2337)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.apache.activemq.broker.BrokerService.start(BrokerService.java:543)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.fusesource.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$$anon$3.run(ActiveMQServiceFactory.scala:307)[128:org.jboss.amq.mq-fabric:6.0.0.redhat-024]
2013-05-14 15:19:48,164 | INFO  | veMQ Broker: amq | BrokerService                    | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Apache ActiveMQ 5.8.0.redhat-60024 (amq, null) is shutting down
2013-05-14 15:19:48,168 | INFO  | veMQ Broker: amq | TransportConnector               | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Connector openwire Stopped
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | PListStoreImpl                   | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | PListStore:[/home/ramiro/tecPlata/jboss-fuse-6.0.0.redhat-024/data/amq/amq/tmp_storage] stopped
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | KahaDBStore                      | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopping async queue tasks
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | KahaDBStore                      | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopping async topic tasks
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | KahaDBStore                      | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Stopped KahaDB
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | BrokerService                    | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Apache ActiveMQ 5.8.0.redhat-60024 (amq, null) uptime 0.010 seconds
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | BrokerService                    | ?                                   ? | 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Apache ActiveMQ 5.8.0.redhat-60024 (amq, null) is shutdown
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | ActiveMQServiceFactory           | ?                                   ? | 128 - org.jboss.amq.mq-fabric - 6.0.0.redhat-024 | Broker amq failed to start.  Will try again in 10 seconds
2013-05-14 15:19:48,169 | INFO  | veMQ Broker: amq | ActiveMQServiceFactory           | ?                                   ? | 128 - org.jboss.amq.mq-fabric - 6.0.0.redhat-024 | Exception on start: javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=amq
javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=amq
          at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)[:1.6.0_30]
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)[:1.6.0_30]
          at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_30]
          at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:380)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:72)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2337)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.apache.activemq.broker.BrokerService.start(BrokerService.java:543)[114:org.apache.activemq.activemq-osgi:5.8.0.redhat-60024]
          at org.fusesource.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$$anon$3.run(ActiveMQServiceFactory.scala:307)[128:org.jboss.amq.mq-fabric:6.0.0.redhat-024]

Dropbox网址到Fuse LOG https://dl.dropboxusercontent.com/u/225304/fuse.log

Dropbox网址为.kar文件https://dl.dropboxusercontent.com/u/225304/PruebaFeature-1.0-SNAPSHOT.kar

这个例子我用了一个干净的保险丝。对于发生了什么的任何想法?我不知道问题是ActiveMQ的配置还是其他任何问题。

当我在Karaf列出activemq时,这就是我所看到的。

这是我在karaf中列出经纪人的时候

JBossFuse:karaf@root> activemq:query --jmxlocal
Name = KahaDBPersistenceAdapter[/home/ramiro/tecPlata/jboss-fuse-6.0.0.redhat-024/data/amq/kahadb]
brokerName = amq
Transactions = []
Size = 13411
InstanceName = KahaDBPersistenceAdapter[/home/ramiro/tecPlata/jboss-fuse-6.0.0.redhat-024/data/amq/kahadb]
Data = [1]
type = Broker
Service = PersistenceAdapter

brokerName = amq
service = Health
CurrentStatus = Good
type = Broker

brokerName = amq
connector = clientConnectors
type = Broker
StatisticsEnabled = true
connectorName = openwire

destinationName = ActiveMQ.Advisory.MasterBroker
MemoryUsageByteCount = 0
DequeueCount = 0
type = Broker
destinationType = Topic
Name = ActiveMQ.Advisory.MasterBroker
MinEnqueueTime = 0
MaxAuditDepth = 2048
AverageEnqueueTime = 0.0
InFlightCount = 0
MemoryLimit = 67108864
brokerName = amq
EnqueueCount = 1
MaxEnqueueTime = 0
MemoryUsagePortion = 1.0
ProducerCount = 0
UseCache = true
BlockedProducerWarningInterval = 30000
AlwaysRetroactive = false
Options = 
MaxProducersToAudit = 64
PrioritizedMessages = false
ConsumerCount = 0
ProducerFlowControl = true
Subscriptions = []
QueueSize = 0
MaxPageSize = 200
DispatchCount = 0
MemoryPercentUsage = 0
ExpiredCount = 0

TopicSubscribers = []
TemporaryQueues = []
Uptime = 1 minute
TemporaryTopicSubscribers = []
MemoryPercentUsage = 0
BrokerVersion = 5.8.0.redhat-60024
StatisticsEnabled = true
TotalDequeueCount = 0
TopicProducers = []
QueueSubscribers = []
Topics = [org.apache.activemq:type=Broker,brokerName=amq,destinationType=Topic,destinationName=ActiveMQ.Advisory.MasterBroker]
TotalMessageCount = 0
SslURL = 
TemporaryQueueSubscribers = []
BrokerName = amq
DynamicDestinationProducers = []
Persistent = true
DataDirectory = /home/ramiro/tecPlata/jboss-fuse-6.0.0.redhat-024/data/amq
Queues = []
DurableTopicSubscribers = []
TotalConsumerCount = 0
InactiveDurableTopicSubscribers = []
JobSchedulerStoreLimit = 0
TempPercentUsage = 0
MemoryLimit = 67108864
VMURL = vm://amq
OpenWireURL = tcp://fluxit-ntb-43:61616?maximumConnections=1000
JobSchedulerStorePercentUsage = 0
TotalEnqueueCount = 1
TemporaryQueueProducers = []
StompSslURL = 
TemporaryTopics = []
StompURL = 
Slave = false
BrokerId = ID:fluxit-ntb-43-58596-1368558172573-0:1
TotalProducerCount = 0
StorePercentUsage = 0
brokerName = amq
StoreLimit = 107374182400
TransportConnectors = {openwire=tcp://fluxit-ntb-43:61616?maximumConnections=1000}
TemporaryTopicProducers = []
TempLimit = 53687091200
QueueProducers = []
type = Broker

2 个答案:

答案 0 :(得分:0)

用户已在许多地方交叉发布相同的问题。当你这样做时,请告诉我们,因为谈话是分散的。

在这里讨论活跃: http://fusesource.com/forums/thread.jspa?threadID=4797&tstart=0

但也贴在这里: https://community.jboss.org/thread/228200

答案 1 :(得分:0)

你的kar中的features.xml不正确会导致此错误。它有一些像

这样的包
<bundle>mvn:org.apache.felix/org.apache.felix.configadmin/1.2.4</bundle>
<bundle>mvn:org.apache.aries/org.apache.aries.util/1.0.0</bundle>
<bundle>mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/1.0.0</bundle>
<bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/1.0.1.redhat-60024</bundle>

这些捆绑包对于容器非常重要,并且默认情况下已经按容器安装。

它不应该在你的features.xml中,或者如果它们在那里,你应该有 resolver =“(obr)”表示功能和依赖关系=“true”表示这些包,以便OBR解析器可以启动以防止安装冗余包。

而且,

<bundle>mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/1.0.1.redhat-60024</bundle>

对于aries.blueprint 1.0.x无效,应该是

<bundle dependency="true" start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1.redhat-60024</bundle>
<bundle dependency="true" start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.0.1.redhat-60024</bundle>
<bundle dependency="true" start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.0.1.redhat-60024</bundle>

代替。否则你会看到像

这样的错误
ERROR: Bundle org.apache.aries.blueprint [251] EventDispatcher: Error during dispatch. (java.lang.ClassCastException: org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler cannot be cast to org.apache.aries.blueprint.NamespaceHandler)

java.lang.ClassCastException:org.apache.aries.blueprint.ext.impl.ExtNamespaceHandler无法强制转换为org.apache.aries.blueprint.NamespaceHandler

这意味着您的容器中安装了两个冲突aries.blueprint捆绑包,这几乎搞砸了所有内容。

在摘要中,更改kar中的features.xml

<?xml version="1.0" encoding="UTF-8"?>
<features>
  <feature name='tosMock' version='1.0.0-SNAPSHOT'>
    <bundle>mvn:com.tecplata.esb.services/tosMock/1.0.0-SNAPSHOT</bundle>
  </feature>
  <feature name='esb-entities' version='1.0.0-SNAPSHOT'>
    <bundle>mvn:com.tecplata.esb/esb-entities/1.0.0-SNAPSHOT</bundle>
  </feature>
  <feature name='vesselsService-sei' version='1.0.0-SNAPSHOT'>
  <feature version='1.0.0-SNAPSHOT'>esb-entities</feature>
    <bundle>mvn:com.tecplata.esb.services.sei/vesselsService-sei/1.0.0-SNAPSHOT</bundle>
  </feature>
  <feature name='vesselsVisitorService' version='1.0.0-SNAPSHOT'>
    <bundle>mvn:org.apache.camel/camel-core/2.10.0.redhat-60024</bundle>
    <feature version='1.0.0-SNAPSHOT'>vesselsService-sei</feature>
    <bundle>mvn:com.tecplata.esb.services/vesselsVisitorService/1.0.0-SNAPSHOT</bundle>
  </feature>
</features>

可以使它工作。 弗里曼