./activemq start 启动后查看 activemq/data/wrapper.log 查看日志发现如下信息
STATUS | wrapper | 2022/08/02 23:12:06 | --> Wrapper Started as Daemon
STATUS | wrapper | 2022/08/02 23:12:06 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:06 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:06 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:10 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:10 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:10 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:15 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:15 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:15 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:19 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:19 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:19 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:23 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:23 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:23 | JVM exited while loading the application.
FATAL | wrapper | 2022/08/02 23:12:23 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2022/08/02 23:12:23 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2022/08/02 23:12:23 | <-- Wrapper Stopped
原因可能是JVM参数没有配置或者配置错误
处理方案:
activemq/bin/linux-x86-64/bin/wrapper.conf 下增加:
wrapper.java.command=java安装目录/bin/java
例如:
wrapper.java.command=/usr/local/jdk1.8/bin/java
配置完后可正常启动
STATUS | wrapper | 2022/08/02 22:59:23 | <-- Wrapper Stopped
STATUS | wrapper | 2022/08/02 23:12:06 | --> Wrapper Started as Daemon
STATUS | wrapper | 2022/08/02 23:12:06 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:06 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:06 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:10 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:10 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:10 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:15 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:15 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:15 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:19 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:19 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:19 | JVM exited while loading the application.
STATUS | wrapper | 2022/08/02 23:12:23 | Launching a JVM...
ERROR | wrapper | 2022/08/02 23:12:23 | Unable to start JVM: No such file or directory (2)
ERROR | wrapper | 2022/08/02 23:12:23 | JVM exited while loading the application.
FATAL | wrapper | 2022/08/02 23:12:23 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2022/08/02 23:12:23 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2022/08/02 23:12:23 | <-- Wrapper Stopped
STATUS | wrapper | 2022/08/02 23:24:39 | --> Wrapper Started as Daemon
STATUS | wrapper | 2022/08/02 23:24:39 | Launching a JVM...
INFO | jvm 1 | 2022/08/02 23:24:40 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2022/08/02 23:24:40 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2022/08/02 23:24:40 |
INFO | jvm 1 | 2022/08/02 23:24:40 | Java Runtime: Oracle Corporation 1.8.0_161 /usr/local/jdk1.8/jre
INFO | jvm 1 | 2022/08/02 23:24:40 | Heap sizes: current=618496k free=589372k max=932352k
INFO | jvm 1 | 2022/08/02 23:24:40 | JVM args: -Dactivemq.home=../.. -Dactivemq.base=../.. -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.keyStore=../../conf/broker.ks -Djavax.net.ssl.trustStore=../../conf/broker.ts -Dcom.sun.management.jmxremote -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.conf=../../conf -Dactivemq.data=../../data -Djava.security.auth.login.config=../../conf/login.config -Xmx1024m -Djava.library.path=../../bin/linux-x86-64/ -Dwrapper.key=uxzbhb3DLpJp3Icx -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=4706 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
INFO | jvm 1 | 2022/08/02 23:24:40 | Extensions classpath:
INFO | jvm 1 | 2022/08/02 23:24:40 | [../../lib,../../lib/camel,../../lib/optional,../../lib/web,../../lib/extra]
INFO | jvm 1 | 2022/08/02 23:24:40 | ACTIVEMQ_HOME: ../..
INFO | jvm 1 | 2022/08/02 23:24:40 | ACTIVEMQ_BASE: ../..
INFO | jvm 1 | 2022/08/02 23:24:40 | ACTIVEMQ_CONF: ../../conf
INFO | jvm 1 | 2022/08/02 23:24:40 | ACTIVEMQ_DATA: ../../data
INFO | jvm 1 | 2022/08/02 23:24:41 | Loading message broker from: xbean:activemq.xml
INFO | jvm 1 | 2022/08/02 23:24:41 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@7f380636: startup date [Tue Aug 02 23:24:41 HKT 2022]; root of context hierarchy
INFO | jvm 1 | 2022/08/02 23:24:43 | INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/usr/local/src/activemq/bin/linux-x86-64/../../data/kahadb]
INFO | jvm 1 | 2022/08/02 23:24:43 | INFO | KahaDB is version 7
INFO | jvm 1 | 2022/08/02 23:24:43 | INFO | Recovering from the journal @1335:28
INFO | jvm 1 | 2022/08/02 23:24:43 | INFO | Recovery replayed 1349 operations from the journal in 0.188 seconds.
INFO | jvm 1 | 2022/08/02 23:24:43 | INFO | PListStore:[/usr/local/src/activemq/bin/linux-x86-64/../../data/localhost/tmp_storage] started
INFO | jvm 1 | 2022/08/02 23:24:43 | INFO | Apache ActiveMQ 5.16.2 (localhost, ID:ubuntu-44149-1659453883700-0:1) is starting
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Listening for connections at: tcp://ubuntu:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Connector openwire started
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Listening for connections at: amqp://ubuntu:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Connector amqp started
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Listening for connections at: stomp://ubuntu:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Connector stomp started
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Listening for connections at: mqtt://ubuntu:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Connector mqtt started
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Starting Jetty server
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Creating Jetty connector
INFO | jvm 1 | 2022/08/02 23:24:44 | WARN | ServletContext@o.e.j.s.ServletContextHandler@64c41670{/,null,STARTING} has uncovered http methods for path: /
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Listening for connections at ws://ubuntu:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Connector ws started
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | Apache ActiveMQ 5.16.2 (localhost, ID:ubuntu-44149-1659453883700-0:1) started
INFO | jvm 1 | 2022/08/02 23:24:44 | INFO | For help or more information please see: http://activemq.apache.org
INFO | jvm 1 | 2022/08/02 23:24:45 | INFO | ActiveMQ WebConsole available at http://127.0.0.1:8161/
INFO | jvm 1 | 2022/08/02 23:24:45 | INFO | ActiveMQ Jolokia REST API available at http://127.0.0.1:8161/api/jolokia/
linux vi 保存退出 操作:esc键,输入 :wq
linux vi 不保存退出 操作:esc键,键入 :q!