ActiveMQ not running

今天,在虚拟机的Linux系统安装ActiveMQ,发现启动不了,查看状态发现是ActiveMQ not running。

[root@localhost bin]# ./activemq start
INFO: Loading '/root/Desktop/apache-activemq-5.15.8//bin/env'
INFO: Using java '/usr/local/src/java/jdk1.7.0_71/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/root/Desktop/apache-activemq-5.15.8//data/activemq.pid' (pid '4809')
[root@localhost bin]# ./activemq status
INFO: Loading '/root/Desktop/apache-activemq-5.15.8//bin/env'
INFO: Using java '/usr/local/src/java/jdk1.7.0_71/bin/java'
ActiveMQ not running

然后在activemq目录下运行 ./bin/activemq console 会以调试模式启动,并将日志输出到当前页面。

[root@localhost apache-activemq-5.15.8]# ./bin/activemq console
INFO: Loading '/root/Desktop/apache-activemq-5.15.8//bin/env'
INFO: Using java '/usr/local/src/java/jdk1.7.0_71/bin/java'
INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
INFO: Creating pidfile /root/Desktop/apache-activemq-5.15.8//data/activemq.pid
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/activemq/console/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

发现这个Unsupported major.minor version 52.0错误,到网上查了一下发现是版本问题,我下了最新版的apache-activemq-5.15.8,而我虚拟机装的jdk版本是1.7;所以再去下载activemq的旧版本装就好了。我下载apache-activemq-5.14.4版本再次安装,安装好之后发现可以启动成功,ActiveMQ is running。

[root@localhost bin]# ./activemq start
INFO: Loading '/root/Desktop/apache-activemq-5.14.4//bin/env'
INFO: Using java '/usr/local/src/java/jdk1.7.0_71/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/root/Desktop/apache-activemq-5.14.4//data/activemq.pid' (pid '5283')
[root@localhost bin]# ./activemq status
INFO: Loading '/root/Desktop/apache-activemq-5.14.4//bin/env'
INFO: Using java '/usr/local/src/java/jdk1.7.0_71/bin/java'
ActiveMQ is running (pid '5283')

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐