Run ActiveMQ as a 64-bit service on Windows Server 2008 - windows

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

Related

"Failed creating Java" when using Windows Services to start Cassandra

I have had Cassandra 3.11.1 up and running correctly with no Java issues. I've been trying to set it up as a service using Apache Commons Daemon as recommended in the install guide. I was able to install it as a service, but when I attempt to start the service through Windows Services Manager it fails. The log reads:
Commons Daemon procrun (64-bit) started
Running 'cassandra' service...
Starting Service...
Failed creating Java
ServiceStart returned 1
Run Service finished.
Through cassandra config I am pointing to the 64 bit daemon prunsrv application.
Since cassandra seems to be working perfectly on its own it seems like it's a problem with prunsrv, but I have no idea how to track that down. I've seen similar problems, but it always seems to be a 32 vs 64 bit issue or the wrong environment paths for cassandra. Those seem fine for me.
Thank you!

Windows Service created with apache commons not starting correctly and errors with path to jvm.dll not found

I am running a java program as a windows service on windows server 2019 build 1809.
I am using apache commons procrun to create a windows service.
This is my configuration to start a service
"C:\Users\Public\agent\commons-daemon-1.2.1-bin-windows\amd64\prunsrv.exe" //IS//ic^
--DisplayName "Agent"^ --Description "This is a Agent Windows Service."^
--Startup=auto^
--Install="C:\Users\Public\agent\commons-daemon-1.2.1-bin-windows\amd64\prunsrv.exe"^
--Jvm="C:\Users\Public\agent\jre\bin\server\jvm.dll"^
--Classpath "C:\Users\Public\agent\agent-jar-with-dependencies.jar"^
++Environment="PATH='C:\Windows\system32';'C:\Users\Public\agent\jre\bin'"^
--JavaHome="C:\Users\Public\agent\jre"^
--StartPath=C:\Users\Public\agent\^
--StartMode=jvm^
--StartClass=com.agent.int.Runner^
--StdOutput=C:\Users\Public\agent\service-stdout.log^
--StdError=C:\Users\Public\agent\service-stderr.log
When i start the service, it fails with below error
2020-06-26 07:27:52 Apache Commons Daemon procrun stderr initialized.
[2020-06-26 07:27:52] [error] [5716] Failed creating Java 'C:\Users\Public\agent\jre\bin\server\jvm.dll'.
[2020-06-26 07:27:52] [error] [ 5716] The specified module could not be found.
[2020-06-26 07:27:52] [error] [ 5716] ServiceStart returned 1.
[2020-06-26 07:27:52] [error] [ 5716] The specified module could not be found.
Note - jvm.dll has correct path in configuration and in error log as well.
My configurations
apache commons procrun is 64 bit
JRE which i am supplying is also 64 bit
Windows server is also 64 bit
Let me know if any other details required
Thanks in advance.
I was not able to find root cause of the issue.
The way i solved the issue is i changed StartMode from jvm to Java.
--StartMode=Java
It worked on Windows 2016 Server, Windows 2019 Server and Windows 10 workstation.
Let me know if anyone has a reason for why it didn't work with jvm option.
We faced a similar issue lately and the root cause seemed to be a missing or too old installation of the Microsoft Visual C++ Redistributable package:
https://support.microsoft.com/de-de/help/2977003/the-latest-supported-visual-c-downloads
After installation/update of the package services could be started with --StartMode=Jvm again.

Azure Pack Service Bus - Windows Fabric Missing

Recieve this error when configuring service bus before joining it to WAPAdmin Portal.
How can i install Windows Fabric which should contain FabricHostSrv manually. I cannot find a standalone installer for this.
[Error] [12/15/2017 10:05:47 AM]:
System.Management.Automation.CmdletInvocationException: Service
FabricHostSvc was not found on computer '.'. --->
System.InvalidOperationException: Service FabricHostSvc was not found
on computer '.'. --->
System.ComponentModel.Win32Exception: The
specified service does not exist as an installed service
--- End of inner exception stack trace ---
Run this command from PS window:
WebpiCmd.exe /offline /products:WindowsFabric /Path:c:\temp\OfflineCache
More info: https://rakibism.wordpress.com/2015/11/09/sharepoint-2013-workflow-manager-configuration-error-service-fabrichostsvc-was-not-found-on-computer/

Error while installing primavera web service. Could not find the main class the program will exit

I am trying to install Primavera web services so i can deploy them on oracle Weblogic server(10.3) but its showing the error message box:
could not find the main class the program will exit.
JVM launcher displays this message box.
I have installed all the prerequisites (Java 1.7,Apache ant, Apache cxf 2.2.2,Jackrabit etc.)
and also set the environment variables for both JAVA_HOME and CXF_HOME.
please help.
Thanks in advance.

import neo4j database from windows to ubuntu

I have created a neo4j database on my windows machine.
I have transferred the content of the database directory to my linux machine. This is because I have the community edition which does not support the backup functions.
mtt#mttPC:/var/lib/neo4j/data/log$ sudo service neo4j-service start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
WARNING! You are using an unsupported Java runtime.
* Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [21498]... waiting for server to be ready..... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
The file messages.log in the database directory says nothing.
Any idea? Are the windows and linux neo4js compatible? Thank you.
Edit
I have made a fresh install of neo4j on my ubuntu machine.
Now I finally get some logs:
2014-05-16 20:01:10.958+0000 ERROR [o.n.k.EmbeddedGraphDatabase]: Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#25984c63' was successfully initialized, but failed to start. Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#3d34dcb' was successfully initialized, but failed to start. Please see attached cause exception.: 'neostore' has a store version number that we cannot upgrade from. Expected 'NeoStore v0.A.0' but file is version 'NeoStore v0.A.2'.
2014-05-16 20:01:10.958+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
I should be related to this but I am not sure how to proceed. Is the issue related to the fact that when I copied the database, I just stopped neo4j on my windows machine from the neo4j window?
There is no reason why a Neo4j database should not be transferable between operating systems. Can you please provide the output of data/log/console.log? First thought is that you may have permission issues. The files should be read/write for the user the Neo4j process will run as.

Resources