Record problems encountered when upgrading ActiveMQ version

    我负责ActiveMQ服务,本周一队列消费者的系统反馈他们无法正常监听到消息了,从MQ Console上看到该队列A的消息确实堆积了,Number Of Pending Messages  不断增加,本地开启消费者以及他们系统本地开启消费者都能正常监听到消息,但是线上就是不行,他们服务重启后问题依然无法解决,找不到解决的办法,我就考虑升级下AMQ版本,原版本为5.8.0(可从MQ Console中看到)。
    从网上下载到最新版本:5.15.9,上传到服务器上后,修改了conf目录下activemq.xml的TCP端口号(生产者推送和消费者监听的端口)以及jetty.xml中的控制台端口号后,重启服务,提示PID已创建,但是ps查看进程,却找不到该进程信息,并且telnet本TCP端口,也不通,查看data目录下的activemq.log,发现文件修改时间还是3月份。
    找不到更多提示信息,只好硬下头皮(shell水平有待提高)去读下bin目录下的启动脚本:activemq,看到有Detect the location of the java binary,突然想起来MQ是依赖JDK的,而服务器还是JDK1.6,新版本MQ可能不兼容,搜索下发现确认5.15.9版本需要JDK1.8。网上查找AMQ指定JDK目录,在bin目录下env文件中最后一段信息中![env文件中指定JDK方式描述信息](https://img-blog.csdnimg.cn/20190713170157179.png)发现是使用:JAVACMD="auto"自动去服务器上查找,通过which java查看(/usr/bin/java)

The server is indeed JDK1.6. After installing JDK1.8, modify the JAVACMD in the env file and assign it to /aaa/jdk1.8.0_144/bin/java under the JDK. Restarting the service will still not work. . .
Did the configuration not take effect, increase the output in the startup script activemq in the bin directory: echo $ JAVACMD, and found that it is still / usr / bin / java, strangely, the JAVACMD configuration item does not take effect, is the specified JDK directory not correct, just change the directory /aaa/jdk1.8.0_144/bin, restarting the service will still not work, but. . . The JAVACMD directory echoed is /aaa/jdk1.8.0_144/bin. Go to the /aaa/jdk1.8.0_144 and /aaa/jdk1.8.0_144/bin directories to view. The user who logged in the java file does not have x executable permissions , Without considering why there is no permission, first increase the permissions by chmod, and then adjust JAVACMD to /aaa/jdk1.8.0_144/bin/java, start, the service finally starts normally, and the console can also be viewed normally.

Published 14 original articles · praised 3 · visits 938

Guess you like

Origin blog.csdn.net/sjz88888/article/details/95764033