activemq:INFO: Broker not available at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
(win7系统下)我用jdk7下启动apache activemq 5.14.5服务后,在用命令activemq stop停止服务时遇到文章标题的错误,服务没有被停止。C:\ >activemq stopJava Runtime: Oracle Corporation 1.7.0_55 C:\Program Files\Java\jdk1.7.0_55\jreHeap sizes: ...
(win7系统下)我用jdk7下启动apache activemq 5.14.5服务后,在用命令activemq stop
停止服务时遇到文章标题的错误,服务没有被停止。
C:\ >activemq stop
Java Runtime: Oracle Corporation 1.7.0_55 C:\Program Files\Java\jdk1.7.0_55\jre
Heap sizes: current=1005568k free=995061k max=1005568k
JVM args: -Dcom.sun.management.jmxremote -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=D:/j/apache-activemq-5.14.5\conf\login.config -Dactivemq.classpath=D:/j/apache-activemq-5.14.5\conf;D:/activemq-default/conf;D:/j/apache-activemq-5.14.5/conf; -Dactivemq.home=D:/j/apache-activemq-5.14.5 -Dactivemq.base=D:/activemq-default -Dactivemq.conf=D:/j/apache-activemq-5.14.5\conf -Dactivemq.data=D:/j/apache-activemq-5.14.5\data -Djava.io.tmpdir=D:/j/apache-activemq-5.14.5\data\tmp
Extensions classpath:
[D:\activemq-default\lib,D:\j\apache-activemq-5.14.5\lib,D:\activemq-default\lib\camel,D:\activemq-default\lib\optional,D:\activemq-default\lib\web,D:\activemq-default\lib\extra,D:\j\apache-activemq-5.14.5\lib\camel,D:\j\apache-activemq-5.14.5\lib\optional,D:\j\apache-activemq-5.14.5\lib\web,D:\j\apache-activemq-5.14.5\lib\extra]
ACTIVEMQ_HOME: D:\j\apache-activemq-5.14.5
ACTIVEMQ_BASE: D:\activemq-default
ACTIVEMQ_CONF: D:\j\apache-activemq-5.14.5\conf
ACTIVEMQ_DATA: D:\j\apache-activemq-5.14.5\data
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO: Broker not available at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
显然这是关于JMX的问题,对于JMX我只知道个概念,这会学习已经来不及了,
网上找到一些关于这个问题的信息,都是基于5.8左右的版本,而我用的这个5.14.5版本是最后一个JDK7的版本(2017),按理说也是挺新的了,为什么还有这个问题呢?
在google上一通找,看到这个stackoverflow上的帖子:
https://stackoverflow.com/questions/19093003/apache-activemq-browser-cant-connect-to-jmx-console
看到上面这位仁兄提到一句话:Since JDK7u4....
让我意识到,这个问题可能与JDK版本有关。
我果然切换到JDK8,再执行命令activemq stop
停止服务,一切正常
C:\Users\guyadong>activemq-default stop
Java Runtime: Oracle Corporation 1.8.0_111 C:\Program Files\Java\jdk1.8.0_111\jre
Heap sizes: current=1005056k free=989327k max=1005056k
JVM args: -Dcom.sun.management.jmxremote -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=D:/j/apache-activemq-5.14.5\conf\login.config -Dactivemq.classpath=D:/j/apache-activemq-5.14.5\conf;D:/activemq-default/conf;D:/j/apache-activemq-5.14.5/conf; -Dactivemq.home=D:/j/apache-activemq-5.14.5 -Dactivemq.base=D:/activemq-default -Dactivemq.conf=D:/j/apache-activemq-5.14.5\conf -Dactivemq.data=D:/j/apache-activemq-5.14.5\data -Djava.io.tmpdir=D:/j/apache-activemq-5.14.5\data\tmp
Extensions classpath:
[D:\activemq-default\lib,D:\j\apache-activemq-5.14.5\lib,D:\activemq-default\lib\camel,D:\activemq-default\lib\optional,D:\activemq-default\lib\web,D:\activemq-default\lib\extra,D:\j\apache-activemq-5.14.5\lib\camel,D:\j\apache-activemq-5.14.5\lib\optional,D:\j\apache-activemq-5.14.5\lib\web,D:\j\apache-activemq-5.14.5\lib\extra]
ACTIVEMQ_HOME: D:\j\apache-activemq-5.14.5
ACTIVEMQ_BASE: D:\activemq-default
ACTIVEMQ_CONF: D:\j\apache-activemq-5.14.5\conf
ACTIVEMQ_DATA: D:\j\apache-activemq-5.14.5\data
useJmxServiceUrl Found JMS Url: service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc3AAtVbmljYXN0UmVmMgAADDE5Mi4xNjguNTYuMQAAF2NrDem6Kg8DV7ojMEwAAAFvrBzmRYABAHg=
Connecting to pid: 9804
Stopping broker: localhost
网上很多文章从都从activemq启动配置(conf/activemq.xml)中修改jmx相关配置来解决,但我还不太理解。
对于我来说,目前切换到JDK8更方便,就先用这个办法了。
更多推荐
所有评论(0)