Deploy the project to the project site test environment JDK1.8 Figure 1: Question 1 Since this is the first time Tocmat is started, there is no log file. So start ./startup.sh directly. You can then use the following command to dynamically view the log information. Tips after execution No execute permission ./startup.sh & tailf ../logs/catalina.out Problem Analysis: The current user does not have permission to run the .sh executable file Problem solving: Use command: chmod u+x *.sh. Execute in the tomcat/bin directory Command analysis: It means adding executable permissions to the owners of all .sh files in the current directory.
Figure 2: Question 2 After startup, an error message appears saying that the file in the ***** directory cannot be found. Problem Analysis: This problem occurs because multiple Context environments are configured in the server.xml file of Tomcat. However, no project is deployed in the specified directory. Problem solution: Delete all Context in the server.xml file. Delete all deployed projects under the tomcat directory webapps and wtpwebapps. At this time, just start a separate ebank. Startup successful, access to 8080 successful. Figure 3: Question 3 Add the war packaged by Maven to the tomcat server webapps. Then start it. But the error port is occupied. Problem Analysis: This operation is performed without pausing the previous step. This causes the port to be occupied. But after pausing Tomcat directly, it still reports that the port is occupied Problem solving: Use a more violent approach: Question 4 Although it can be started normally at this time, an error is reported: java.lang.OutOfMemoryError: PermGen space (prompting memory overflow, which belongs to the memory overflow of the permanent area). Problem analysis: Tomcat's memory parameters have not been set before. The currently deployed project occupies a large amount of memory and loads many classes. This results in insufficient memory in the permanent area. Solution: Copy the catalina.sh file under tomcat's bin directory and modify it, and back up the original one. Find the cygwin=false position in the catalina.sh file and add the parameter in front of it. Note that the quotation marks should be included. Figure 5: Figure 6: Question 5 At this time, it is restarted, but it prompts that the catalina.sh file cannot be found? Problem analysis: Because the catalina.sh execution file is called in the startup.sh execution file. Thereby starting the Tomcat service. Then use the command ll to view the bin directory. The problem was found that the catalina.sh file was no longer an executable file. (Not green) Problem solution: Use chmod u+x catalina.sh again to give it executable permissions. Figure 7: Figure 8: The figure takes hello.sh as an example. (displayed in black, different from catalina.sh) Question 6 The startup was successful, but the project could not be accessed in the browser, but access to 8080 was successful. Problem analysis: It is found in the webapps directory of Tomcat that each War package has a version number after being decompressed by Tocmat (the war package is generated by Maven packaging and has a version number). Solution to the problem that the correct address accessed by the browser is without the version number: delete the project and rename the War package. Start again. So far all is successful Figure 8: Additional commands Clear the log: echo -n "" > ../logs/catalina.out Fixed syntax: echo -n "" > Check the log size: du -h ../logs/catalina.out Fixed syntax: du -h > This is the end of this article about solving various problems in the process of deploying Tomcat on Linux and releasing projects. For more relevant content about deploying Tomcat on Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: JS implements simple addition and subtraction of shopping cart effects
>>: js implements form validation function
Several concepts Line box: A box that wraps an in...
Redis is an open source NoSQL database written in...
1. First remotely connect to the server 2. Open S...
I have seen some dynamic routing settings on the ...
1. Big Data and Hadoop To study and learn about b...
In CSS, text is one of the most common things we ...
SQL is the main trunk. Why do I understand it thi...
Shorthand properties are used to assign values ...
introduce If you are using an OSS storage service...
Table of contents Why is addEventListener needed?...
Table of contents 1. Usage 1. Basic usage 2. The ...
<br />Green is between yellow and blue (cold...
Table of contents 1 Create configuration and data...
yum install httpd php mariadb-server –y Record so...
Preface I believe most people have used MySQL and...