说明:我的mq的安装目录为:/data/mq_server,所以log的位置在:/data/mq_server/apache-activemq-5.10.0/data目录下,直接使用tail -f activemq.log实时查看log的输出,从而判断问题
输出的日志中有“java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: ”
百度搜索了一下,找到了痴线此问题的原因:主机名(tomcat_server)中有下划线,不能识别
再次启动activemq服务:/data/mq_server/apache-activemq-5.10.0/bin//activemq start
2015-07-27 18:09:49,273 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@6276ae34: startup date [Mon Jul 27 18:09:49 EDT 2015]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2015-07-27 18:09:51,121 | INFO | PListStore:[/data/mq_server/apache-activemq-5.10.0/data/localhost/tmp_storage] started | org.apache.activemq.store.kahadb.plist.PListStoreImpl | main
2015-07-27 18:09:51,161 | INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/data/mq_server/apache-activemq-5.10.0/data/kahadb] | org.apache.activemq.broker.BrokerService | main
2015-07-27 18:09:52,602 | INFO | KahaDB is version 5 | org.apache.activemq.store.kahadb.MessageDatabase | main
2015-07-27 18:09:52,634 | INFO | Recovering from the journal ... | org.apache.activemq.store.kahadb.MessageDatabase | main
2015-07-27 18:09:52,637 | INFO | Recovery replayed 1 operations from the journal in 0.022 seconds. | org.apache.activemq.store.kahadb.MessageDatabase | main
2015-07-27 18:09:52,808 | INFO | Apache ActiveMQ 5.10.0 (localhost, ID:tomcat-server-52376-1438034992673-0:1) is starting | org.apache.activemq.broker.BrokerService | main
2015-07-27 18:09:53,103 | INFO | Listening for connections at: tcp://tomcat-server:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
2015-07-27 18:09:53,115 | INFO | Connector openwire started | org.apache.activemq.broker.TransportConnector | main
2015-07-27 18:09:53,133 | INFO | Listening for connections at: amqp://tomcat-server:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
2015-07-27 18:09:53,144 | INFO | Connector amqp started | org.apache.activemq.broker.TransportConnector | main
2015-07-27 18:09:53,159 | INFO | Listening for connections at: stomp://tomcat-server:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
2015-07-27 18:09:53,168 | INFO | Connector stomp started | org.apache.activemq.broker.TransportConnector | main
2015-07-27 18:09:53,184 | INFO | Listening for connections at: mqtt://tomcat-server:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
2015-07-27 18:09:53,193 | INFO | Connector mqtt started | org.apache.activemq.broker.TransportConnector | main
2015-07-27 18:09:53,601 | INFO | Listening for connections at ws://tomcat-server:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.ws.WSTransportServer | main
2015-07-27 18:09:53,603 | INFO | Connector ws started | org.apache.activemq.broker.TransportConnector | main
2015-07-27 18:09:53,619 | INFO | Apache ActiveMQ 5.10.0 (localhost, ID:tomcat-server-52376-1438034992673-0:1) started | org.apache.activemq.broker.BrokerService | main
2015-07-27 18:09:53,624 | INFO | For help or more information please see: | org.apache.activemq.broker.BrokerService | main