The project in eclipse has been started, but tomcat has been displayed in the startup

 Recently, my colleague's project has been starting up in eclipse, and the console shows that the project has been successfully started in tomcat, but the lower right corner of eclipse also shows that tomcat is starting.....starting your sister. . . The end result is a startup timeout. There are many sayings on the Internet, what to increase the timeout, increase the JVM, clean up the project, change tomcat, re-download the project, change the project directory. . . Totally useless. . . Evil door. . . Could it be a supernatural event + moral corruption? . . I can't. . .

      The project can be started and used normally if it is directly placed in the tomcat outside.

      Finally, I finally thank the gods and the ground, and I solved it. On stackoverflow, a buddy's sentence woke us up,

      Link: http://stackoverflow.com/questions/12799265/tomcat-is-not-starting-up-in-eclipse

      原话:I was able to figure it out. Currently I am not able to remember on application (software) running behind. (install by network admin) for IP/Port related configuration.

      Our situation: Our colleague opened a proxy proxifier, which caused the port to be occupied. After closing the software, it can be used.

Or you can start tomcat in eclipse first, and then open proxifier.

 

1. Exception description

1. Start tomcat in eclipse, the application has been started successfully, but tomcat is still in the starting loading

 

Second, the cause of analysis

1. Change the port 8080 to 9080, start tomcat, and it can be fully started. It turns out to be a port 8080 problem;

2. But port 8080 is not occupied;

3. Search the Internet for possible reasons, the possible reason is that the proxy is turned on, causing the port to be occupied;

http://www.cnblogs.com/winkey4986/p/3303412.html

http://zhangzhaoaaa.iteye.com/blog/2113072

4. Inspired by the analysis of the reasons on the Internet, analyze the possible reasons of my computer.

(1) I use NATAPP to map the domain name to the local machine, that is, map a second-level domain name to the local machine, which is convenient for debugging;

(2) The domain name is mapped to port 80 of this machine by default. I use mac osx.

Mac OS X needs ROOT permission to bind port 80, but if you start eclipse or tomcat with root permission, it will cause all kinds of files created by startup to be root, and ordinary users cannot delete them.

(3) Since it requires root privileges, it is more troublesome, so I set up port 80 to forward requests to port 8080.

sudo vim /etc/pf.conf

rdr on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080

sudo pfctl -d

sudo pfctl -f /etc/pf.conf

sudo pfctl -e

4. When using tomcat to start port 8080, an exception will occur.

5. Reason conclusion, the port is occupied

eclipse   53997 yeahwell  215u    IPv6 0x2058db610a8d8d5f        0t0      TCP localhost:56644->localhost:9080 (SYN_SENT)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326685871&siteId=291194637