Tomcat 7 getting CreateJavaVM Failed Error - apache

I have an Apache tomcat 7.0.5 Server on a Windows R2 Server and I've deployed a webApp ( java JSF) on it, everything was working fine, but it suddenly stopped and won't run again. when I try to run it, it tells me "Error 1067: The Process terminated unexpectedly" and In the logs I get these files:
tomcat7-stdout.2012-08-08.log
2012-08-08 18:00:06 Commons Daemon procrun stdout initialized
commons-daemon.2012-08-08.log
[2012-08-08 19:02:30] [info] Commons Daemon procrun finished
[2012-08-08 19:13:02] [info] Commons Daemon procrun (1.0.4.0 64-bit) started
[2012-08-08 19:13:02] [info] Running 'Tomcat7' Service...
[2012-08-08 19:13:02] [info] Starting service...
[2012-08-08 19:13:02] [error] CreateJavaVM Failed
[2012-08-08 19:13:03] [info] Service started in 1000 ms.
[2012-08-08 19:13:03] [info] Run service finished.
[2012-08-08 19:13:03] [info] Commons Daemon procrun finished
tomcat7-stderr.2012-08-08.log
2012-08-08 18:00:06 Commons Daemon procrun stderr initialized
Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future
Unrecognized VM option '+HeapDumpOnOutOfMemoryError '
since I was having some 'perm gen' memory error I added some stuff to my apache Tomcat properties, folowing this link how to handle Perm Gen
so my Java Options look like this:
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 7.0
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 7.0
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 7.0\endorsed
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 7.0\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\logging.properties
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+HeapDumpOnOutOfMemoryError
Any ideas as to why the server won't start anymore? THANKS!
~Myy

After spending hours trying to figure this out, I finally found it. I had an extra space at the end of VM command.
'+HeapDumpOnOutOfMemoryError '
which was giving me the Unrecognized VM option.....
Thanks for reading, hopefully when you get this error, you can take extra precautions to verify the syntax.

to manage the memory you need to set some Xms and Xmx parameter
Xms manages the initial heap size
Xmx manages the maximum heap size
Thus try to add :
-Xms=256m -Xmx=256m
regards

The error is on option "HeapDumpOnOutOfMemoryError" which is not even listed in your post. Can you post a screen print of the "Java" tab from the "tomcat" service screen (similar to the link you have provided) ? This will tell us the actual options you are using and also the memory you have set.

copy the file msvcr71.dll from the bin dir of your java installation, to the bin dir of the tomcat installation.

Related

Run PLay Framework 2.x in IntelliJ IDEA using SBT task auto stop server

I try to run Play project in IntelliJ IDEA. i follow this document.
this is my config. api is my sub project
But when I hit run icon, my service start successful and immediately AkkaHttpServer - Stopping server. then I type api/run in sbt shell, my service start successful and work normally. this issue only happen when I check User sbt shell in config
this is my log in sbt shell
"C:\Program Files\Java\jdk1.8.0_251\bin\java.exe" -server -Xmx1536M -Dsbt.supershell=false -Didea.managed=true -Dfile.encoding=UTF-8 -Dsbt.version=1.3.8 -Dsbt.log.noformat=true -jar C:\Users\LAP13556-local\AppData\Roaming\JetBrains\IntelliJIdea2020.1\plugins\Scala\launcher\sbt-launch.jar early(addPluginSbtFile=\"\"\"C:\Users\LAP13556-local\AppData\Local\Temp\idea979.sbt\"\"\") "; set ideaPort in Global := 51722 ; idea-shell"
[info] Loading global plugins from C:\Users\LAP13556-local\.sbt\1.0\plugins
[info] Loading settings for project crm-server-build from plugins.sbt,idea979.sbt ...
[info] Loading project definition from C:\Users\...\crm-server\project
[info] Loading settings for project crm-server from build.sbt ...
[info] Set current project to crm-server (in build file:/C:/Users/.../crm-server/)
[info] Defining Global / ideaPort
[info] The new value will be used by Compile / compile, Test / compile and 3 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to crm-server (in build file:/C:/Users/.../crm-server/)
[IJ]sbt:crm-server> api/run
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console...)
[info] p.c.s.AkkaHttpServer - Stopping server...
[success] Total time: 26 s, completed Jul 31, 2020 9:26:28 AM
[IJ]sbt:crm-server> api/run // I type this command
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console...)
Can anyone tell me the reason. Thank you.

Problems with CATALINA_PID and ARTIFACTORY_PID while upgrading Artifactory to the latest version

While upgrading my Artifactory server (free OSS version) from the version 5.2.0 to the latest 5.4.5, I was hit by an ARTIFACTORY_PID problem.
After migrating from 5.3.2 to 5.4.0, the Artifactory server did not want to start anymore complaining about
PID file /var/opt/jfrog/run/artifactory.pid not readable (yet?) after start.
I found the only way around it is to remove the line export CATALINA_PID=$ARTIFACTORY_PID from the setenv.sh of the tomcat.
Note that upgrade from 5.2.0 to 5.3.2 went smoothly.
However, after upgrading from 5.4.0 to the latest 5.4.5 this trick does not work anymore. Now I get an error:
Job for artifactory.service failed because a configured resource limit was exceeded. See "systemctl status artifactory.service" and "journalctl -xe" for details.
And when executing service artifactory status, I get:
● artifactory.service - Setup Systemd script for Artifactory in Tomcat Servlet Engine
Loaded: loaded (/usr/lib/systemd/system/artifactory.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: resources) since Tue 2017-07-25 09:40:10 CEST; 4s ago
Process: 31912 ExecStart=/opt/jfrog/artifactory/bin/artifactoryManage.sh start (code=exited, status=0/SUCCESS)
Jul 25 09:40:10 linux systemd[1]: Failed to start Setup Systemd script for Artifactory in Tomcat Servlet Engine.
Jul 25 09:40:10 linux systemd[1]: Unit artifactory.service entered failed state.
Jul 25 09:40:10 linux systemd[1]: artifactory.service failed.
In fact Artifactory is now running showing version 5.4.5, but I am not happy about all those errors above.
Plus I am a bit failing to understand the purpose of CATALINA_PID and/or ARTIFACTORY_PID. Why the tomcat was failing on the startup because of this file? What was wrong with the permissions? I think I did no extra actions before.
The only difference that before it was installed from an official downloaded rpm. But now using an official remote yum repo.
If I try to create an empty /var/opt/jfrog/run/artifactory.pid file, while Artifactory is running, it gets deleted. Who is deleting this file and why? Is it a standard tomcat behavior?
OS: CentOS 7, up to date.
In my case (in a slow virtual machine) the error message from the command artifactoryManage.sh start was:
ERROR: Artifactory Tomcat server did not start in 60 seconds. Please check the logs
The log file told that the only problem was slowness (/var/opt/jfrog/artifactory/logs/artifactory.log):
### Artifactory successfully started (64.802 seconds) ###
The problem was solved by adding a longer timeout to the service definition at /etc/systemd/system/artifactory.service:
[Service]
Environment=START_TMO=120
After editing the service definition, as you know, systemctl daemon-reload was needed.
Run this script:
/opt/jfrog/artifactory/bin/artifactoryManage.sh start
It will show the exact error to you.
In my case it was java version not updated. So I updated to java 1.8.

Red5 Service Fails to Start on Win 10 - Incorrect Function

I installed Red5. Service installed ok, but when I manually try to start it, I get the following error in my Windows Event Log:
"The Red5 Media Server service terminated with the following service-specific error:
Incorrect function"
In the commons-daemon.log, I see the following:
[2017-05-17 20:36:54] [info] [11044] Starting service...
[2017-05-17 20:36:54] [error] [11044] Failed creating java
[2017-05-17 20:36:54] [error] [11044] ServiceStart returned 1
[2017-05-17 20:36:54] [info] [13816] Run service finished.
[2017-05-17 20:36:54] [info] [13816] Commons Daemon procrun finished
Event ID was 7024. Any help would be appreciated. Thanks!
Had the same issue on Windows Server 2012 R2. Solution was to install the latest release of the Java SE Development Kit. In my case I just installed Java SE DK 8U144: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-windows-x64.exe
I resolved it by setting up the rtmp:// url correctly. I did not enter in a stream name, as I thought the name parameter above the rtmp text box would do it for me.
It works, but it seems that the chip in my Note 5 just doesn't have the cpu power to stream smoothly, although I will admit I have only spent about 20 minutes trying to tune settings for best performance on my Sprint cell service.
Thank you for your quick reply.

nettyserver not started for Play2 in intellij

I'm new to Intellij IDEA for Play/Scala and apparently need to do something to start NettyServer when I Run a project. My run configuration ran once OK. Then I killed the server, made some changes and tried to run again:
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java -Dfile.encoding=UTF8 -Djline.terminal=none -Dsbt.log.noformat=true -Dsbt.global.base=/private/var/folders/97/16yb2phd7sz78q0sf5wl7z200000gn/T/sbt-global-pluginstub -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M -classpath "/Users/j/Library/Application Support/IntelliJIdea2016.1/Scala/launcher/sbt-launch.jar" xsbt.boot.Boot run
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading project definition from /Users/jch/IdeaProjects/editor/project
[info] Set current project to ...
--- (Running the application, auto-reloading is enabled) ---
[error] p.c.s.NettyServer - Failed to listen for HTTP on /0.0.0.0:9000!
[error] (compile:run) play.runsupport.ServerStartException
[error] Total time: 3 s, completed Apr 4, 2016 11:24:31 AM
Process finished with exit code 1
What am I missing?
My Mistake. - Apparently NettyServer could not start because it was already running. When I browse to localhost:9000 it's up. A better error message would have helped, and IDEA apparently did not autoload into my browser because of the NettyServer exit code.

CruiseControl.Net restarts after project with msbuild task

I'm trying to setup a fairly simple CruiseControl.NET build server and I'm seeing strange behavior with a project using MSBuild. Everytime the project's build is run and it executes msbuild (either through forcing or through a change in source control), the build completes successfully but CCNet also restarts. I notice this because the 'Next Build Time' of all the projects are moved ahead to the current time + initialSeconds.
This behavior appears whether I'm running CCNet as a serivce or through the command line executable.
When running on the command line, the debug output doesn't give me anything useful - it just immediately jumps from the last line of the project's build to the 'startup' output.
Additional information:
TFS is the source control server
My build is only hitting the working directory
My publish is just copying from the working directory to the artifact directory
If I comment out the msbuild task, running the project build does not restart CruiseControl
Not hitting or updating the Server or State directories of CruiseControl during build
Nothing useful in Event Viewer when this happens and I'm running as a service. CCService doesn't report stopping/starting - it's like cruise control is internally restarting.
And here is the msbuild configuration:
<tasks>
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>$[$CCNetWorkingDirectory]\$(PathToSolution)</workingDirectory>
<projectFile>$(SolutionFile)</projectFile>
<buildArgs>/p:Configuration=Release /v:d</buildArgs>
<timeout>900</timeout>
</msbuild>
</tasks>
Finally, here is the trace log at the end of the msbuild process / restart of server.
Done building target "Build" in project "MYAPP.sln".
Done Building Project "C:\CCNet\WD\NET\Main\MYAPP\MYAPP.sln" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:05.35
2014-08-26 20:11:41,881 [NET.App.MYAPP] [INFO] - Delete merged file 'C:\CCNet\BuildArtifacts\NET.App.MYAPP\msbuild-results-dcf002da-d0d0-4d0a-8b86-fb25adaf1ac3.xml'.
2014-08-26 20:11:46,478 [NET.App.MYAPP] [INFO] - Integration complete: Success - 8/26/2014 8:11:41 PM
2014-08-26 20:11:46,579 [NET.App.MYAPP] [INFO] - Integrator for project: NET.App.MYAPP is now stopped.
2014-08-26 20:11:57,444 [257] [INFO] - CruiseControl.NET Server 1.8.5.0 -- .NET Continuous Integration Server
2014-08-26 20:11:57,465 [257] [INFO] - Copyright © 2003 - 2014 ThoughtWorks Inc. All Rights Reserved.
2014-08-26 20:11:57,466 [257] [INFO] - .NET Runtime Version: 2.0.50727.5477 Image Runtime Version: v2.0.50727
2014-08-26 20:11:57,467 [257] [INFO] - OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1 Server locale: English (United States)
2014-08-26 20:11:57,467 [257] [INFO] - Reason: File change delay finished
2014-08-26 20:11:57,944 [CCNet Server] [INFO] - Reading configuration file "C:\CCNet\Server\ccnet.config"
2014-08-26 20:11:58,347 [CCNet Server] [WARN] - Configuration does not have any version information - assuming the configuration is for version 1.8
2014-08-26 20:11:58,800 [CCNet Server] [INFO] - Log cache time set to 5 minutes
2014-08-26 20:11:58,990 [CCNet Server] [INFO] - Registered channel: tcp
2014-08-26 20:11:58,991 [CCNet Server] [INFO] - CruiseManager: Listening on url: tcp://32.32.29.129:21234/CruiseManager.rem
2014-08-26 20:11:58,992 [CCNet Server] [INFO] - Registered channel: tcp
2014-08-26 20:11:58,993 [CCNet Server] [INFO] - CruiseServerClient: Listening on url: tcp://32.32.29.129:21234/CruiseServerClient.rem
2014-08-26 20:11:58,994 [CCNet Server] [INFO] - Starting CruiseControl.NET Server
It looks like ccnet is noticing a change to a .dll file within the application directory and restarting to assimilate the changes.
Ccnet is looking for changes to any .dll file so if your build outputs at least one to this directory it would cause a restart.