Reputation: 52666
I run webapp https://github.com/donhuvy/mycustomer I face error
Description:
The Tomcat connector configured to listen on port 80 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 80, or configure this application to listen on another port.
This is my log https://gist.github.com/donhuvy/93210850f955f9ddbc00ab735a0ade18#file-terminal-log-L191
I have been check port 80 by command
sudo lsof -i TCP:80 | grep LISTEN
But result is nothing. How to fix it? (I use macOS 10.12.5)
Update:
Run Sencha client (inside directory client
)
sencha web -port 8082 start
and I change Spring Boot port to 8082:
APPLICATION FAILED TO START
Description:
The Tomcat connector configured to listen on port 8082 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 8082, or configure this application to listen on another port.
Upvotes: 6
Views: 20239
Reputation: 751
If you start SpringBoot application with configured port 80, here can be 2 problems:
Need to execute a command with root permissions. Just add "sudo" before the start command. This helped me.
Port is using by another application. To check it, you can use the command: "netstat -l";
Upvotes: 0
Reputation: 651
On linux ports below 1024 can be opened only by root, so the port 80 is restricted by default
if you want to publish your app on 80 port you need to redirect request from port 80 to the port you gonna run your springapp (e.g 8080) port
you can use apache2 server wich is allowed by default to work on port 80 and can forward requests for you to tomcat
Source: Spring Boot running app on port 80
Upvotes: 10
Reputation: 3512
80 port is already use by another application. change the post no of tomcat. and you can not run tomcat on 80 post directly you need to install authbind, for reference you can follow below links :-
Following works:
apt-get install authbind
First, set AUTHBIND=yes in /etc/default/tomcat7 file
sudo touch /etc/authbind/byport/80
sudo chmod 500 /etc/authbind/byport/80
sudo chown tomcat7 /etc/authbind/byport/80
Reference: http://georgik.sinusgear.com/2012/03/10/tomcat-7-listen-on-port-80-linux-debian/comment-page-1/
and
http://2ality.com/2010/07/running-tomcat-on-port-80-in-user.html
Upvotes: 0