环境

win7 x64

java1.8.0_20

activemq:5.15.12(当前最新)

报错信息

运行apache-activemq\bin\win64\activemq.bat报如下错误:

jvm 1    | Failed to connect to the Wrapper at port 32000.
jvm 1    | java.net.ConnectException: connect: Address is invalid on local machine, or port is not valid on remote machine
jvm 1    | Exiting JVM...

编辑win64目录下wrapper.conf文件,取消注释

# wrapper.debug=TRUE

title: 'activemq启动报错Failed to connect to the Wrapper at port 32000'
date: 2020-05-06 16:36:28
tags: [activemq,wrapper,报错]
published: true
hideInList: false
feature:
isTop: false


INFO   | jvm 1    | 2020/05/06 16:26:52 | Load native library.  One or more attempts may fail if platform specific libraries do not exist.
INFO   | jvm 1    | 2020/05/06 16:26:52 | Loading native library failed: wrapper-windows-x86-64.dll  Cause: java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-64 in java.library.path

试图解决

根据以上两个关键信息进行Google,然而崩溃的是股沟了好久没有找到解决方法

期间尝试了网上说的修改conf/activemq.xmlconf/jetty.xml配置文件中的ip0.0.0.0改为127.0.0.1

修改wrapper.conf文件中的wrapper.java.command=java为指定jdkpath\bin\java

均无效,最后放弃这种启动方式,改为下面方式启动.没有报错

最终解决方案

双击运行apache-activemq\bin\win6\InstallService.bat以安装服务

win+r启动cmd输入:

net start activemq

完全没报错,顺利启动

浏览器打开http://127.0.0.1:8161

成功访问