When eclipse is on run server, Tomcat is on, but the error shows that 8080, 8005, and 8009 ports are occupied
Terminal input
To view all open ports
sudo lsof-i-P | Grep-i "Listen"
Appears as follows
HTTPD Root 4u IPv6 0xbc257c1a68e3d681 0t0 TCP *:80 (LISTEN)
Mysqld _mysql 30u IPv6 0xbc257c1a68e3d121 0t0 TCP *:3306 (LISTEN)
HTTPD 277 _www 4u IPv6 0xbc257c1a68e3d681 0t0 TCP *:80 (LISTEN)
ADB 673 Wangchunqian 7u IPv4 0xbc257c1a7972ea39 0t0 TCP localhost:5037 (LISTEN)
Alipaydis 2154 Root 16u IPv4 0xbc257c1a8440f341 0t0 TCP localhost:27382 (LISTEN)
Java 8900 root 48u IPv6 0xbc257c1a68e3dbe1 0t0 TCP *:8080 (LISTEN)
Java 8900 root 49u IPv6 0xbc257c1a73b70121 0t0 TCP *:8009 (LISTEN)
Java 8900 root 56u IPv6 0xbc257c1a68e3cbc1 0t0 TCP localhost:8005 (LISTEN)
Office365 8916 Wangchunqian 5u IPv4 0xbc257c1a6f146c49 0t0 TCP localhost:1538 (LISTEN)
Where the second column is the PID
Then according to the PID kill process:
sudo kill-9 8900
Rerun run on server ok
View port usage and kill process under Mac