How to solve tomcat starting issue in Java Reseller Hosting Server

This article describes how to solve the tomcat starting issue when JDK and kernel version upgraded to higher version during reboot in Java Reseller Hosting Plan.

After this version upgrade if we start the tomcat then it will throw the below error in catalina.err log file.

Reasons:

JDK version upgraded from 1.7 to 1.8.
Kernel version upgraded from current to 2.6.32-954.3.5.lve1.4.59.el6

LOGS:

OpenJDK 64-Bit Server VM warning: ignoring option PermSize=512m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=12288m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:
3222360
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

OpenJDK 64-Bit Server VM warning: ignoring option PermSize=512m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=12288m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Insufficient space for shared memory file:
3222392
Try using the -Djava.io.tmpdir= option to select an alternate temp location.

This error is purely because of tomcat memory size. If we remove the parameters -Xss2m -Xms1024m -Xmx12288m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=512m -XX:MaxPermSize=12288m during tomcat start, it will throw the below error in Java Reseller Hosting Server.

Logs:

A fatal error has been detected by the Java Runtime Environment:

SIGBUS (0x7) at pc=0x00007f8190507594, pid=4171619, tid=0x00007f81a23f9700

JRE version: (8.0_201-b09) (build )

Java VM: OpenJDK 64-Bit Server VM (25.201-b09 mixed mode linux-amd64 compressed oops)

Problematic frame:

j java.lang.Object.()V+0

Failed to write core dump. Core dumps have been disabled. To enable core dumping, try “ulimit -c unlimited” before starting Java again

An error report file with more information is saved as:

/tmp/hs_err_pid4171619.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

[Opened /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el6_10.x86_64/jre/lib/rt.jar]

JVM Parameters :

-Xss: Java thread stack size

-Xms: Initial java heap size

-Xmx: Maximum java heap size.

-XX:PermSize: Initial perm gen size.

-XX: MaxPermSize: Maximum perm gen size.

Solution:

These kind of errors will occur only because of java heap size[memory] problem. Hence we advice you to use the below parameters during tomcat start inorder to get rid of the issue.

-Xss256m -Xmx1G -Xms1G

Hope this will help you in tomcat restart problem after verion upgrade in Java Reseller Hosting Server.