在linux下安装好ActiveMQ后,执行 ./activemq start 启动 ActiveMQ,显示:
INFO: Loading '/home/sso/activemq-5.14.2//bin/env'
INFO: Using java '/home/sso/jdk1.8.0_25/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/home/sso/activemq-5.14.2//data/activemq.pid' (pid '12315')
从提示信息看,似乎启动成功,但根据提示信息中的 pid 查找进程时,却发现并无此进程:
netstat -an|grep 61616 或者 ps -eLf | grep 12315
问题原因:
查看activemq日志:
cat /home/sso/activemq-5.14.2/data/activemq.log 结果如下:
2016-12-15 12:54:09,042 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@62ccf439: startup date [Thu Dec 15 12:54:09 CST 2016]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | WrapperSimpleAppMain
2016-12-15 12:54:11,096 | INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/home/sso/activemq-5.14.1/bin/linux-x86-64/../../data/kahadb] | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2016-12-15 12:54:11,166 | INFO | KahaDB is version 6 | org.apache.activemq.store.kahadb.MessageDatabase | WrapperSimpleAppMain
2016-12-15 12:54:11,211 | INFO | PListStore:[/home/sso/activemq-5.14.1/bin/linux-x86-64/../../data/localhost/tmp_storage] started | org.apache.activemq.store.kahadb.plist.PListStoreImpl | WrapperSimpleAppMain
2016-12-15 12:54:11,387 | INFO | Apache ActiveMQ 5.14.1 (localhost, ID:linux_5f121-36152-1481777651238-0:1) is starting | org.apache.activemq.broker.BrokerService | WrapperSimpleAppMain
2016-12-15 12:54:11,425 | INFO | Listening for connections at: tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain
2016-12-15 12:54:11,435 | INFO | Connector openwire started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2016-12-15 12:54:11,447 | INFO | Listening for connections at: amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain
2016-12-15 12:54:11,456 | INFO | Connector amqp started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2016-12-15 12:54:11,469 | INFO | Listening for connections at: stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain
2016-12-15 12:54:11,477 | INFO | Connector stomp started | org.apache.activemq.broker.TransportConnector | WrapperSimpleAppMain
2016-12-15 12:54:11,490 | INFO | Listening for connections at: mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | WrapperSimpleAppMain
2016-12-15 12:54:11,547 | INFO | Connector mqtt sta