Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the Linux server tomact 8.0 starts slowly?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what to do when the Linux server tomact 8.0 starts slowly. I hope you will get something after reading this article. Let's discuss it together.

Environmental Information:

CentOS release 6.8

Tomcat-8.0

JDK1.8

First, start tomcat

# sh / root/tomcat-8.0/bin/startup.sh#tailf / root/tomcat-8.0/logs/catalina.out26-Aug-2017 12:58:31.661 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read26-Aug-2017 12:58:31.662 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 680 ms26-Aug-2017 12:58:31.685 INFO [main] org.apache.catalina .core.StandardService.startInternal Starting service Catalina26-Aug-2017 12:58:31.685 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.3226-Aug-2017 12:58:31.695 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory / root/tomcat-8.0/webapps/ROOT26-Aug-2017 12:58:36.184 INFO [localhost-startStop-1] org.apache.jasper.servlet. TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.26-Aug-2017 12:58:37.895 INFO [localhost-startStop-1] java.util.prefs.FileSystemPreferences$2.run Created system preferences directory in java.home.26-Aug-2017 12:58:37.897 INFO [localhost-startStop-1] java.util.prefs.FileSystemPreferences$1.run Created user preferences directory.26-Aug-2017 12:58:37.907 WARNING [localhost-startStop-1] java.util.prefs.FileSystemPreferences$6.run Prefs file removed in background / root/.java/.userPrefs/prefs.xml26-Aug-2017 12:58:37.908 WARNING [localhost-startStop-1] java.util.prefs.FileSystemPreferences$6.run Prefs file removed in background / root/jdk-1.8/jre/.systemPrefs/prefs.xml

The process of waiting for tomcat to start was excruciating, 5 minutes and 6 minutes, but without hope, it started again.

There are two solutions:

1) solve in Tomcat environment

Add this line to the catalina.sh:

-Djava.security.egd=file:/dev/./urandom

For example:

JAVA_OPTS= "- server-Xms2048m-Xmx4096m-XX:PermSize=256M-XX:MaxPermSize=512m-Djava.security.egd=file:/dev/./urandom"

2) solve in JVM environment

Modify $JAVA_PATH/jre/lib/security/java.security

Securerandom.source=file:/dev/urandom

Replace with

Securerandom.source=file:/dev/./urandom has finished reading this article, I believe you have a certain understanding of "what to do when Linux server tomact 8.0 starts slowly". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report