如何在 Windows 上将 ActiveMQ 安装为 64 位服务?
我该如何解决以下错误? 有没有办法可以复制 64 位包装器?
FATAL | wrapper | 2011/01/07 08:53:48 | OpenSCManager failed - Access is denied. (0x5)
STATUS | wrapper | 2011/01/07 08:54:13 | ActiveMQ installed.
STATUS | wrapper | 2011/01/07 08:54:25 | --> Wrapper Started as Service
STATUS | wrapper | 2011/01/07 08:54:26 | Launching a JVM...
INFO | jvm 1 | 2011/01/07 08:54:26 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2011/01/07 08:54:26 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2011/01/07 08:54:26 |
INFO | jvm 1 | 2011/01/07 08:54:26 |
INFO | jvm 1 | 2011/01/07 08:54:26 | WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
INFO | jvm 1 | 2011/01/07 08:54:26 | The file is located on the path at the following location but
INFO | jvm 1 | 2011/01/07 08:54:26 | could not be loaded:
INFO | jvm 1 | 2011/01/07 08:54:26 | C:\stuff\apache-activemq-5.4.2\bin\win32\..\..\bin\win32\wrapper.dll
INFO | jvm 1 | 2011/01/07 08:54:26 | Please verify that the file is readable by the current user
INFO | jvm 1 | 2011/01/07 08:54:26 | and that the file has not been corrupted in any way.
INFO | jvm 1 | 2011/01/07 08:54:26 | One common cause of this problem is running a 32-bit version
INFO | jvm 1 | 2011/01/07 08:54:26 | of the Wrapper with a 64-bit version of Java, or vica versa.
INFO | jvm 1 | 2011/01/07 08:54:26 | This is a 64-bit JVM.
INFO | jvm 1 | 2011/01/07 08:54:26 | Reported cause:
INFO | jvm 1 | 2011/01/07 08:54:26 | C:\stuff\apache-activemq-5.4.2\bin\win32\wrapper.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
INFO | jvm 1 | 2011/01/07 08:54:26 | System signals will not be handled correctly.
INFO | jvm 1 | 2011/01/07 08:54:26 |
How can I get around the following error?
Is there a way I can copy a 64-bit wrapper out there?
FATAL | wrapper | 2011/01/07 08:53:48 | OpenSCManager failed - Access is denied. (0x5)
STATUS | wrapper | 2011/01/07 08:54:13 | ActiveMQ installed.
STATUS | wrapper | 2011/01/07 08:54:25 | --> Wrapper Started as Service
STATUS | wrapper | 2011/01/07 08:54:26 | Launching a JVM...
INFO | jvm 1 | 2011/01/07 08:54:26 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2011/01/07 08:54:26 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2011/01/07 08:54:26 |
INFO | jvm 1 | 2011/01/07 08:54:26 |
INFO | jvm 1 | 2011/01/07 08:54:26 | WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
INFO | jvm 1 | 2011/01/07 08:54:26 | The file is located on the path at the following location but
INFO | jvm 1 | 2011/01/07 08:54:26 | could not be loaded:
INFO | jvm 1 | 2011/01/07 08:54:26 | C:\stuff\apache-activemq-5.4.2\bin\win32\..\..\bin\win32\wrapper.dll
INFO | jvm 1 | 2011/01/07 08:54:26 | Please verify that the file is readable by the current user
INFO | jvm 1 | 2011/01/07 08:54:26 | and that the file has not been corrupted in any way.
INFO | jvm 1 | 2011/01/07 08:54:26 | One common cause of this problem is running a 32-bit version
INFO | jvm 1 | 2011/01/07 08:54:26 | of the Wrapper with a 64-bit version of Java, or vica versa.
INFO | jvm 1 | 2011/01/07 08:54:26 | This is a 64-bit JVM.
INFO | jvm 1 | 2011/01/07 08:54:26 | Reported cause:
INFO | jvm 1 | 2011/01/07 08:54:26 | C:\stuff\apache-activemq-5.4.2\bin\win32\wrapper.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
INFO | jvm 1 | 2011/01/07 08:54:26 | System signals will not be handled correctly.
INFO | jvm 1 | 2011/01/07 08:54:26 |
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使用 procrun 时(请参阅上面 LostInComputer 的回答),您可能需要在安装服务时添加以下 JVM 选项,以便 ${activemq.conf} 和 ${activemq.data} 变量在服务启动时正确解析:
++JvmOptions=-Dactivemq.conf=C:\Java\apache-activemq-5.7.0\conf ++JvmOptions=-Dactivemq.data=C:\Java\apache-activemq-5.7.0\data
替换绝对路径带有您自己的安装路径的片段。
When using procrun (see answer by LostInComputer above), you may need to add the following JVM options when installing the service, in order for the ${activemq.conf} and ${activemq.data} variables to resolve properly upon service startup:
++JvmOptions=-Dactivemq.conf=C:\Java\apache-activemq-5.7.0\conf ++JvmOptions=-Dactivemq.data=C:\Java\apache-activemq-5.7.0\data
Substitute absolute paths in snippet with your own installation paths.
我成功地将 ActiveMQ 作为 Windows 7 上的服务安装,而无需下载任何其他内容。您只需要修改一些配置设置。
如果进入以下文件夹:C:\apache-activemq-5.5.0\bin\win32
在本地文本编辑器中打开“InstallService.bat”文件。
修改脚本的底部部分,如下所示。请注意,您的 JAVA_HOME 环境变量需要已经设置,并且您需要将其作为变量传递给包装器。
然后在本地文本编辑器中打开“C:\apache-activemq-5.5.0\bin\win32\wrapper.conf”
并将其更改
为:
一旦完成,您应该能够运行InstallService.bat 成功。
另外,如果您还希望能够使用 UninstallService.bat 文件,请将其打开并硬编码到包装器的路径:
ActiveMQ 5.6.0 注释
我刚刚安装了最新的 5.6.0 版本的 ActiveMQ,它实际上包含一个 64 位包装器。如果您尝试单击 InstallService.bat 文件,它仍然会失败,不幸的是,会出现如下错误:
。
如果您以管理员身份打开 Windows 命令提示符并从命令行运行 InstallService.bat 文件,它将起作用。否则,如果您绝对坚持能够单击该bat文件,那么如果您按照上面的方式修改bat文件,它就会起作用,但请记住在此行中使用win64而不是win32:
I managed to install ActiveMQ successfully as a service on Windows 7 without having to download anything else. You just need to modify a few config settings.
If you go into the following folder: C:\apache-activemq-5.5.0\bin\win32
Open the "InstallService.bat" file in a local text editor.
Modify the bottom part of the script to look like the following. Notice that your JAVA_HOME environment variable needs to already be set and you'll need to pass it as a variable to the wrapper.
Then open up "C:\apache-activemq-5.5.0\bin\win32\wrapper.conf" in a local text editor
And change this:
to this:
Once you've done that you should be able to run the InstallService.bat successfully.
Also, if you want to be able to use the UninstallService.bat file as well, open it up and hard code the path to the wrapper as well:
ActiveMQ 5.6.0 notes
I just installed the latest 5.6.0 version of ActiveMQ and it actually contains a 64-bit wrapper in this version. If you try clicking on the InstallService.bat file it will still fail unfortunately giving you an error like this:
.
If you open a windows command prompt as an administrator and run the InstallService.bat file from the command line it will work. Otherwise if you absolutely insist on being able to click the bat file it will work if you modify the bat files as above except remember to use win64 in this line instead of win32:
您可以使用 Procrun,因为 64 位的wrapper.dll 不是免费的。
http ://blog.bigrocksoftware.com/2010/10/07/commons-daemon-procrun-as-a-java-service-wrapper-for-activemq/
已经在我们的生产中尝试了本文的设置。效果很好!
You can use Procrun since the wrapper.dll for 64-bit isn't free.
http://blog.bigrocksoftware.com/2010/10/07/commons-daemon-procrun-as-a-java-service-wrapper-for-activemq/
Already tried the article's setup in our production. It works great!
我到达这里是因为我遇到了 ActiveMQ 5.5.1 的问题,但在启动服务时出现了不同的错误(例如“无法创建 tmp 文件夹”)。
解决方案非常简单。我在这里找到它: https://issues.apache.org/jira/browse/AMQ-第2946章
基本上,你只需要手动创建两个文件夹:
{amq-home}/bin/win32/work
和
{amq-home}/bin/win32/temp
希望这有帮助。
I arrived here as I had the issue with ActiveMQ 5.5.1 but a different error when starting the service (something like 'could not create a tmp folder').
The solution is quite simple. I found it here: https://issues.apache.org/jira/browse/AMQ-2946
Basically, you jut have to create manually two folders:
{amq-home}/bin/win32/work
and
{amq-home}/bin/win32/temp
Hope this helps.
如果您尝试将 ActiveMQ 5.7.0 作为 Windows 服务安装并运行,他们忘记将wrapper.jar 文件包含到版本中。需要下载ActiveMQ 5.6.0版本,从该版本的BIN文件夹中取出wrapper.jar,复制到5.7.0对应的BIN文件夹中。那么它应该可以工作。不要忘记需要以管理员身份运行服务安装脚本(右键单击BAT文件,以管理员身份运行)
If you are trying to install and run ActiveMQ 5.7.0 as a windows service, they forgot to include the wrapper.jar file into the release. You need to download the release ActiveMQ 5.6.0, take wrapper.jar from the BIN folder of this release, and copy it to the corresponding BIN folder of 5.7.0. Then it should work. Don't forget that you need to run the service installation script as administrator (right-click the BAT file, Run As Administrator)