Heap Dump not working Centos 7 - tomcat7

I have added following setting in my catalina.sh file
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/root/logs".
But still the heap dump file is not created when tomcat is going down. I have this setup on centos 7 on AWS.
Please help me in solving this issue... Thanks in advance.

I would suggest try create it manually if it is not generating automatically by using a JDK bundled tool called jmap, although we recommend that you use the automatic method above for best result.
For Linux/Solaris-based Operating Systems:
Please execute the following command on Linux OS:
$JAVA_HOME/bin/jmap -dump:format=b,file=heap.bin <pid>
More Ref Follow the link below :
https://confluence.atlassian.com/doc/generating-a-heap-dump-219024032.html

the tomcat process is usually set up to run as the tomcat user, who most likely will not have any write access to your /root folder.
Please try to set it to somewhere like /tmp

Related

RuntimeError: Java not found

I hava download JDK&deploy the Java_HOME and so on,i can use "javac" in Command,but when i use it like
nlp=StanfordCoreNLP(r'stanfordnlp',lang='zh')
there has a problem:
builtins.RuntimeError: Java not found.
Maybe you run out of memory. According to my experience, shutting down Java and restarting it can solve this issue.

VM not restarting automatically when installed with kickstart with --noautoconsole option

I created a Centos 7.3 VM using kickstart using the following command:
virt-install --name=vm1 --disk path=vm1.img,size=20 --vcpus=2 --ram=10240 --os-type=linux --os-variant=rhel7.0 --network bridge=br0 --graphics none --location=http://<IP>/centos7.3 -x "ks=http://<IP>/centos73vm-ks.cfg append ip=<VM IP> netmask=255.255.252.0 gateway=<gw> bootproto=static console=ttyS0"
This works fine. VM is created, rebooted automatically and the node is usable. However, the problem with this is that I cannot use it to automate since I don't get the control back. To do that, I added the --noautoconsole options of the virt-install command at the end of the above command.
After doing so, VM is installed, but after reboot it does not come up automatically. It remains in shut off state. I need to start it manually. There are no errors on logging to the console. May someone give any leads on how to fix this?
Any help would be greatly appreciated. Thanks in advance.
you need to add --wait=-1 so that virt-install waits for the installation to complete before exiting. The vm will then automatically start when the installation completes.
this sure sounds like an issue that was covered on the RedHat customer portal. I'm not sure if that requires a paid license but your company (or you) might have one already?
-- Jonas

install weblogic on console mode without xming

I'm trying to install weblogic server on Centos 7 with following instruction of oracle about console mode. Everything will be fine till weblogic file 's extracting on my computer. I get this message about
display enviroment variable failed
I google it and found xming as solution. But is there any solution to install weblogic without xming.
You need to do a silent install as mentioned. You can find the documentation here.
Basically, you need two files:
A response file
Here, you will set some parameters like ORACLE_HOME, proxy information if needed and installation type, etc.
An oraInst.loc file
In this file, you need to do the following(from documentation):
Replace oui_inventory_directory with the full path to the directory where you want the installer to create the inventory directory. Then, replace oui_install_group with the name of the group whose members have write permissions to this directory.
After doing all of this, you can run the command as follows;
java -jar distribution_name.jar -silent -responseFile file [-options] [()*]
I uploaded my own oraInst.loc and response files here for demonstration. I strongly suggest you to read the documentation though. Good luck.

Error in sonar startup, Unable to start JVM: No such file or directory (2)

I am facing strange issue with sonarqube 5.0.1 , one one of the machine it is not starting. Here is the error log - sonar.log -
--> Wrapper Started as Daemon
Launching a JVM...
Unable to start JVM: No such file or directory (2)
JVM exited while loading the application.
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
Machine is x86_64 GNU/Linux - Centos 5.1.
this box has java installed -
$java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
The same sonarqube package works on another machine.
Any idea what could be the issue here?
Thanks.
Issue was in the wrapper.conf where the java wrapper command was not getting resolved. It worked if I give the absolute path - ‘wrapper.java.command=/path/to/my/jdk/bin/java’
This could be an issue with an environment on a host.. not sure.
Few things that helped me in troubleshooting this -
log level changed to DEBUG in wrapper.conf
comments given in the wrapper.conf!
Thanks all for chiming in! Appreciate your inputs.
1.Just close all running jvm from task manager
2. Change the port of the sonar runner from the properties
I had the same symptoms (wrapper starts then immediately stops).
I tried these steps and finally succeeded (on a windows 10 pc):
1) in wrapper.conf, specified the java command:
wrapper.java.command=C:\Program Files\Java\jdk1.7...\bin\java.exe
That did not help.
2) Finally this fixed the problem. In the windows Services, open the Sonar service and then open Log On tab.
Changed the Log On to myself as follows:
I was facing the same issue on sonar startup. After reading this post , i modified the JDK path in below file and it works.
Modify the JDK path in wrapper.conf
wrapper.java.command=%JAVA_HOME%/bin/java
Install jdk 11
sudo yum install java-11-openjdk -y
sudo alternatives --config java
Select the JDK 11 version
Set the JDK 11 version in wrapper.conf
vi /opt/sonar/conf/wrapper.conf
wrapper.java.command=/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-3.el8_5.x86_64/bin/java
Could you verify the Java version on the machine starting?
Java 6 is no more supported http://docs.sonarqube.org/display/SONAR/Requirements#Requirements-Prerequisite but from your error message, I don't know if this is the problem you meet.
Solution 1
Set java path globally
Solution 2
Go to sonarqube-{version}/conf directory
Edit wrapper.conf file
Replace wrapper.java.command=java with wrapper.java.command= {path-to-your-java-bin-directory}/java
eg: wrapper.java.command=/usr/java/bin/java
Try using a relative path, if your Sonar Folder is located in the same root folder as your jdk. For me my sonar and jdk are both under "Program Files", which has restrictive permission, hence the error.
E.g:
wrapper.java.command=../../../Java/jdk-11.0.4/bin/java

"The system cannot find the path specified." error message when trying to start GlassFish with asadmin

I tried to follow The Java EE 6 Tutorial and start GlassFish with the command below. But I got an error message. How to solve this?
C:\glassfish3\bin>asadmin start-domain --verbose
The system cannot find the path specified.
Go to asenv.bat file in config directory
remove line set AS_JAVA="C:/Program Files(x86)/Java/"
retry asadmin.
It will work this time!.
I fixed this issue by editing glassfish3\glassfish\config\asenv.bat as described in domain1 not configured -- The system cannot find the path specified
then I got an error because no domains existed, that was solved by editing glassfish3\bin\asadmin.bat as described in Oracle Glassfish "There is no Domain" Issue Fix Solution
Hi I was facing the same issue. I am able to resolve the same issue by following below steps:
Go to \glassfish\config (Note: In my case it is c:\glassfish3\glassfish\config)
Now open asenv.bat in notepad.
Make the value of AS_JAVA same as JAVA_HOME environment variable.
Now open command prompt and go to the bin folder and run asadmin start-domain domain1.
If you are getting error that no domain exist then create new domain by following below link:
http://docs.oracle.com/cd/E19776-01/820-4497/create-domain-1/index.html
I got this error, when installing Java EE (which includes GlassFish) using 64 bit windows 7. As a reference installing same Java EE latest to my 64 bit Linux worked well and I could see how it set default domain up.
It seems that in my 64 bit Window 7 asadmin.bat looks my java from "C:\Program Files (x86)\Java\bin\java" even if I have installed 64 bit version in "C:\Program Files\Java\jdk1.7.0_10\bin".
asadmin.bat runs first "%~dp0..\glassfish\config\asenv.bat" and then studies where if guesses java is. There is something odd in this, almost in my configuration, but I can't fix this nicely
%JAVA% -jar "%~dp0..\glassfish\modules\admin-cli.jar" %*
I could manually set %JAVA% right, but how to set nicer correction?
Set your correct Java path in:
<glassfish_home>\glassfish\config\osgi.properties
e.g.
set AS_JAVA=C:\Program Files\Java\jdk1.7.0_80
Note: follow Oracle glassfish's release notes for the supported JDKs

Resources