我运行webapp https://github.com/donhuvy/mycustomer我面临错误
描述:配置为侦听端口80的Tomcat连接器无法启动 . 端口可能已在使用中,或者连接器可能配置错误 . 操作:验证连接器的配置,识别并停止正在侦听端口80的任何进程,或将此应用程序配置为侦听另一个端口 .
这是我的日志https://gist.github.com/donhuvy/93210850f955f9ddbc00ab735a0ade18#file-terminal-log-L191
我已经通过命令检查了端口80
sudo lsof -i TCP:80 | grep LISTEN
但结果却一无所获 . 怎么解决? (我使用macOS 10.12.5)
Update:
运行Sencha客户端(内部目录 client
)
sencha web -port 8082 start
我将Spring Boot端口更改为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.
3 回答
假设您正在使用eclipse,解决此错误的一种方法是右键单击控制台并单击Terminate / Disconnect All . 之后运行应用程序它应该工作正常 .
右键单击Console选项卡 - >并选择Terminate / Disconnect all现在尝试运行您的代码 .
注意:在再次运行之前,请不要忘记停止服务器 .
在linux下,1024以下的端口只能由root打开,因此默认情况下端口80受限制
如果你想在80端口上发布你的应用程序,你需要将请求从端口80重定向到你将运行springapp的端口(例如8080)端口
您可以使用apache2服务器,默认情况下允许在端口80上工作,并可以将请求转发给tomcat
资料来源:Spring Boot running app on port 80
80端口已被另一个应用程序使用 . 更改tomcat的帖子号 . 你不能直接在80帖子上运行tomcat你需要安装authbind,作为参考你可以按照以下链接: -
以下作品:
apt-get install authbind
首先,在/ etc / default / tomcat7文件中设置AUTHBIND = yes
参考:http://georgik.sinusgear.com/2012/03/10/tomcat-7-listen-on-port-80-linux-debian/comment-page-1/
和
http://2ality.com/2010/07/running-tomcat-on-port-80-in-user.html