Unable to use 127.0.0.1:8080 access solution after Tomcat cannot start/start in Linux

Source: Internet
Author: User

The boot tomcat scenario is as follows:

[Email protected]:/usr/local/tomcat/apache-tomcat-8.5.20/bin#./catalina.sh
Using catalina_base:/usr/local/tomcat/apache-tomcat-8.5.20
Using Catalina_home:/usr/local/tomcat/apache-tomcat-8.5.20
Using Catalina_tmpdir:/usr/local/tomcat/apache-tomcat-8.5.20/temp
Using Jre_home:/usr/local/java/jdk1.8.0_144
Using CLASSPATH:/usr/local/tomcat/apache-tomcat-8.5.20/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-8.5.20 /bin/tomcat-juli.jar
Usage:catalina.sh (Commands ...)
Commands
Debug Start Catalina in a debugger
Debug-security Debug Catalina with a security manager
JPDA start start Catalina under JPDA debugger
Run Start Catalina in the current window
Run-security Start in the current window with security Manager
Start start Catalina in a separate window
Start-security Start in a separate windows with Security Manager
Stop Stop Catalina, waiting up to 5 seconds for the process to end
Stop n Stop Catalina, waiting up to n seconds for the process to end
Stop-force Stop Catalina, wait up to 5 seconds and then use Kill-kill if still running
Stop N-force stop Catalina, wait up to n seconds and then use Kill-kill if still running
Configtest Run A basic syntax check on Server.xml-check exit code for result
version What version of Tomcat is you running?
Note:waiting for the process-to-end and use of the-force option require-$CATALINA _pid is defined

On a Web site to see that this is because of the environment variables, Tomcat uses the environment variables are own or inherited from the current user, so in Linux even if you set the Java_home will not necessarily use this, so either you inherit the root environment variable, are unified to ensure that the environment variables inside your system are the same, or that you specify the JDK you want to use separately. When Tomcat starts, it needs to steal setclasspath.sh. Just declare the environment variable in setclasspath.sh to know which JDK you use for this tomcat, open the setclasspath.sh below the bin directory of Tomcat, add the path, modify it, add it at the beginning.

Export java_home=/usr/local/java/jdk1.8.0_144
Export JRE_HOME=/USR/LOCAL/JAVA/JDK1.8.0_144/JRE

Then reboot Tomcat to use the

Unable to use 127.0.0.1:8080 access solution after Tomcat cannot start/start in Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.