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

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!

Related

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.

SolrCore is loading running as Windows Service

Logged into Windows Server 2016 as Administrator, I can run Solr from the command line: bin\solr.cmd start -p 8983 -f
I have configured a Solr to run as a Windows Service - running as the same user, with the same command, same startup directory, etc. - however under load, the following error comes back from the upstream application (Sitecore xConnect, though this shouldn't make a difference)
{metadata={error-class=org.apache.solr.common.SolrException,root-error-class=org.apache.solr.common.SolrException},msg=SolrCore is loading,code=503}
To reiterate, everything works fine when Solr is started from the command line, only when it's run as a Windows Service does it error.
Solr version: 6.6.3
Windows version: Server 2016
Environment: AWS (m5.large EC2 instance)
Sitecore compatibility table says to use Solr 6.6.1 with Sitecore, You should still use 6.6.2 as it fixes a bug in Solr 6.6.1 that can affect the installation of SIF. Read here
I recommend you try again with Solr 6.6.2
It turns out that the service was configured to run without the -f flag. So the process would continually stop and re-spawn.

Error configuring wildfly as a windows service

I am using wildfly 10.1 in standalone mode and need to use it as a service.
I copied the service files to the bin folder and then installed the service from the command prompt.
This works well, except that it is impossible to stop the service without killing the process using taskkill.
As a fix, I tried replacing
set DESCRIPTION="WildFly Application Server"
with
set DESCRIPTION=WildFly Application Server
in the service.bat file as mentioned here. But this is causing the service not to start. The system log says:
The Wildfly service terminated with the following service-specific
error: Incorrect function.
How can I fix this issue and get the service starting and stoppping normally?
Add System variable JAVA_HOME to System variable and try to start the service. It worked for me.

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.

Unable to debug tomcat server using eclipse

I'm using:
Spring Tool Suite Version: 3.2.0.RELEASE
Tomcat v7.0.42
When I just run my tomcat server everything is fine but I'm unable to debug it even locally. It produces following error:
Startich Apache Tomcat v7.0.42 at localhost has encoutered a problem.
Server Apache Tomcat v7.0.42 bat localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.
I've tried the following:
increase the timeout.
remove all the apps before starting the debugging.
install new instance of tomcat (the only configuration that I've did on fresh install is turning on Use Tomcat installation and Never publish automatically).
But it didn't help, I still can only run the tomcat, without the debug option. Does anyone know how to make this debugging work?
When I've used new, clear workspace for Spring Tool Suite, debugging started to work.
Cheers,

Resources