Killing process in Windows
1. First of all, find out the PID of the process number that occupies port 8080 ( tomcat, the default is port 8080. If you modify the monitoring port of tomcat, please write in your Tomcat port number or other port numbers ) what I query is port 7777
netstat -ano | findstr 8080
The last column of the command output indicates the number of the process occupying port 7777, assuming 10976
2. Kill the process, thus freeing the port
taskkill /f /pid 10976
Closing Tomcat process under Linux operating system
1. See if Tomcat is already running
ps -ef |grep tomcat
If Tomcat is running, the result will be similar to the following:
sun 5144 1 0 10:21 pts/1 00:00:06 /java/jdk/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/java/tomcat/common/endorsed -classpath :/java/tomcat/bin/bootstrap.jar:/java/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/java/tomcat -Dcatalina.home=/java/tomcat -Djava.io.tmpdir=/java/tomcat/temp org.apache.catalina.startup.Bootstrap start
From the above output information, we can know that the process number of Tomcat execution is 5144.
2. Execute the following command to kill the 5144 process
pid = 5144 kill -9 5144
3. Get the occupancy of a certain port (for example, get the occupancy of port 5533 below)
sudo lsof -i :5533
The result is as follows: you can see that the process number is 2960, we just need to kill it.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 2960 zhengcanrui 55u IPv6 0xb866409b03202701 0t0 TCP *:5533 (LISTEN)
Kill process command:
kill -9 2960
Read More:
- Docker Create tomcat Error standard_init_linux.go:211: exec user process caused “no such file or directory”
- Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl
- How to Solve Docker Run Error: standard_init_linux.go:219: exec user process caused: exec format error
- [Solved] Error running Tomcat8: Address localhost:8080 is already in use
- [Solved] JMETER pressure measure with a lot of Ports Error: 504GATEWAY TIMEOUT
- [Solved] Error running tomcat8: Address localhost:80 is already in use
- How to Solve “parcel segmentation fault” Error in Linux
- Eclipse Tomcat Error creating bean with name ‘sqlSessionFactory’ defined in URL…
- [Solved] standard_init_linux.go:190: exec user process caused “exec format error“
- How to Solve “Status bar could not find cached time string image. Rendering in-process.” in Xcode
- AN ERROR MESSAGE APPEARS WHEN TOMCAT DEPLOYS A NEW PROJECT: INVALID BYTE TAG IN CONSTANT POOL: 15
- How to Solve bootstrap.sh error during the construction of fabric environment
- [Solved] Windows10 Start Linux Subsystem Error: WslRegisterDistribution failed with error: 0x80370102
- PIKA trouble02 — (error) ERR Syntax error, try CLIENT (LIST [order by [addr|idle]| KILL ip:port)
- Maven configuration error: JAVA_HOME not found in your environment
- Log separation using tool cronlog
- [Solved] RuntimeError: An attempt has been made to start a new process before the current process…
- Implement base64_decode in GO language to solve the problem of illegal characters
- Windows: How to Solve PCL C2065 Error
- [Go] Solve the problem of exec: “gcc” executable file not found in %PATH% error when using cgo