之前我们使用 Tanuki java 服务包装器来运行 ActiveMQ。迁移到运行 Windows Server 2008 R2 的 64 位服务器后,我们无法将 ActiveMQ 作为服务安装,除非我们付费购买标准版或专业版的 java 服务包装器。
我读到其他人在 64 位架构上使用 Apache Commons Daemon 作为 ActiveMQ 的服务包装 http://blog.bigrocksoftware.com/2010/10/07/commons-daemon-procrun-as-a-java-service-wrapper-for-activemq/ 。该站点上的说明使我能够成功地将 ActiveMQ 作为服务安装在我们的服务器上,但是在启动服务时,我们在事件日志中收到了错误。我在页面底部评论了这篇文章
我能够使用本文中的说明将 ActiveMQ 安装为服务,但是当我通过服务控制面板启动它时,我得到了
Windows 无法在本地计算机上启动 ActiveMQ。有关详细信息,请查看系统事件日志。
当我检查事件日志时,我看到
ActiveMQ 服务因服务特定错误而终止 操作已成功完成。
我想这可能和我的架构有关。我运行的是 Windows Server 2008 R2,我的处理器是 64 位 Intel Xeon。我没有看到 commons-daemon 包中包含该架构。安装时,我使用通用的“prunsrv.exe”文件而不是 amd64/prunsrv.exe 或 ia64/prunsrv.exe – 当我在安装过程中尝试使用这些 exe 文件时收到错误,并且只能使用通用 prunsrv.exe 安装。
有没有办法让它与我的架构一起工作?还是我错过了什么?
我想知道是否有人对此列表有任何建议?也许我在通过 procrun 或其他可在 64 位 Windows 上运行的服务包装器安装时错过了一些东西。如有任何意见,我们将不胜感激。
谢谢。
编辑011312:
感谢您的回复。 activemq-daemon 日志列出了这些错误
[2012-01-11 09:45:43] [error] %1 is not a valid Win32 application.
[2012-01-11 09:45:43] [error] ServiceStart returned 1
[2012-01-11 09:45:43] [error] %1 is not a valid Win32 application.
[2012-01-11 09:45:43] [info] Run service finished.
[2012-01-11 09:45:43] [info] Commons Daemon procrun finished
[2012-01-11 09:46:05] [info] Commons Daemon procrun (1.0.8.0 32-bit) started
[2012-01-11 09:46:05] [info] Running 'ActiveMQ' Service...
[2012-01-11 09:46:05] [info] Starting service...
[2012-01-11 09:46:05] [error] %1 is not a valid Win32 application.
[2012-01-11 09:46:05] [error] Failed creating java C:\Program Files\Java\jdk1.6.0_29\jre\bin\server\jvm.dll
我将这些错误解释为可能是我通过 procrun 作为服务安装 activemq 的选项之一不正确 - 我确实验证了 jvm.dll 确实存在于我的文件系统中的该位置。我使用这些选项安装了 procrun,使用博客文章中列出的选项作为模型
ActiveMQ.exe //IS//ActiveMQ --DisplayName=" ActiveMQ" --Description=" ActiveMQ Java Messaging Server" --Startup=auto - -LogPath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0\data --LogLevel=INFO --LogPrefix=activemq-daemon --StdOutput=auto --StdError=auto --StartPath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5。 0 --StartClass=org.apache.activemq.console.Main --StartMethod=main --StartParams=start --StartMode=jvm --StopPath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0 --StopClass=org.apache.activemq.console.Main --StopMethod =main --StopParams=关闭 --StopMode=jvm --Jvm=C:\Program文件\Java\jdk1.6.0_29\jre\bin\server\jvm.dll --Classpath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5 .0\bin\run.jar --JvmOptions=-Xmx512M ++JvmOptions=-Dorg.apache.activemq.UseDedicatedTaskRunner=true ++JvmOptions=-Djava.util.logging.config.file=logging.properties++JvmOptions=-Dactivemq.home=D:\apache-activemq-5.5。 0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0 ++JvmOptions=-Dactivemq.base=C:\Java\apache-activemq-5.4.1 ++JvmOptions=-Dactivemq.classpath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0 -bin\apache-activemq-5.5.0\conf ++JvmOptions=-Dcom.sun.management.jmxremote.port=9004 ++JvmOptions=-Dcom.sun.management.jmxremote.authenticate=false ++JvmOptions=-Dcom.sun.management.jmxremote.ssl=false
We were using Tanuki java service wrapper to run ActiveMQ previously. After migrating to a 64-bit server running Windows Server 2008 R2, we're not able to install ActiveMQ as a service unless we pay for the Standard or Professional version of java service wrapper.
I read that others were using Apache Commons Daemon as a service wrapper for ActiveMQ on 64-bit architectures http://blog.bigrocksoftware.com/2010/10/07/commons-daemon-procrun-as-a-java-service-wrapper-for-activemq/ . The instructions on this site allowed me to successfully install ActiveMQ as a service on our server, but we received errors in our Event Log when starting the service. I commented on this post at the bottom of the page
I was able to install ActiveMQ as a service using the instructions in this article, however when I start it up via the Service control panel I get
Windows could not start the ActiveMQ on the local computer. For more information, review the System Event Log.
When I check the Event Log I see
The ActiveMQ service terminated with service-specific error The operation completed successfully..
I think this may be related to my architecture. I’m running Windows server 2008 R2, my processers are 64 bit Intel Xeon. I did not see that architecture included in the commons-daemon package. When I installed, I used the generic ‘prunsrv.exe’ file instead of the amd64/prunsrv.exe, or the ia64/prunsrv.exe – I received errors when I tried to use these exe files during installation, and was only able to install using the generic prunsrv.exe.
Is there a way to get this to work with my architecture? or did I miss anything?
I was wondering if anyone had any suggestions for me on this list? Perhaps something I missed when installing via procrun, or another service wrapper that works on 64-bit Windows. Any comments are appreciated.
Thanks.
Edit 011312:
Thanks for your response. The activemq-daemon logs list these errors
[2012-01-11 09:45:43] [error] %1 is not a valid Win32 application.
[2012-01-11 09:45:43] [error] ServiceStart returned 1
[2012-01-11 09:45:43] [error] %1 is not a valid Win32 application.
[2012-01-11 09:45:43] [info] Run service finished.
[2012-01-11 09:45:43] [info] Commons Daemon procrun finished
[2012-01-11 09:46:05] [info] Commons Daemon procrun (1.0.8.0 32-bit) started
[2012-01-11 09:46:05] [info] Running 'ActiveMQ' Service...
[2012-01-11 09:46:05] [info] Starting service...
[2012-01-11 09:46:05] [error] %1 is not a valid Win32 application.
[2012-01-11 09:46:05] [error] Failed creating java C:\Program Files\Java\jdk1.6.0_29\jre\bin\server\jvm.dll
I interpret these errors to mean that maybe one of the options with which I installed activemq via procrun as a service is incorrect - I did verify that the jvm.dll does exist at that location in my file system. I installed procrun with these options, using the options listed in the blog post as a model
ActiveMQ.exe //IS//ActiveMQ --DisplayName=" ActiveMQ" --Description=" ActiveMQ Java Messaging Server" --Startup=auto --LogPath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0\data --LogLevel=INFO --LogPrefix=activemq-daemon --StdOutput=auto --StdError=auto --StartPath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0 --StartClass=org.apache.activemq.console.Main --StartMethod=main --StartParams=start --StartMode=jvm --StopPath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0 --StopClass=org.apache.activemq.console.Main --StopMethod=main --StopParams=shutdown --StopMode=jvm --Jvm=C:\Program Files\Java\jdk1.6.0_29\jre\bin\server\jvm.dll --Classpath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0\bin\run.jar --JvmOptions=-Xmx512M ++JvmOptions=-Dorg.apache.activemq.UseDedicatedTaskRunner=true ++JvmOptions=-Djava.util.logging.config.file=logging.properties++JvmOptions=-Dactivemq.home=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0 ++JvmOptions=-Dactivemq.base=C:\Java\apache-activemq-5.4.1 ++JvmOptions=-Dactivemq.classpath=D:\apache-activemq-5.5.0-bin\apache-activemq-5.5.0-bin\apache-activemq-5.5.0\conf ++JvmOptions=-Dcom.sun.management.jmxremote.port=9004 ++JvmOptions=-Dcom.sun.management.jmxremote.authenticate=false ++JvmOptions=-Dcom.sun.management.jmxremote.ssl=false
发布评论