简体   繁体   English

配置为侦听端口80的Tomcat连接器无法启动

[英]The Tomcat connector configured to listen on port 80 failed to start

I run webapp https://github.com/donhuvy/mycustomer I face error 我运行webapp https://github.com/donhuvy/mycustomer我遇到错误

Description: 描述:

The Tomcat connector configured to listen on port 80 failed to start. 配置为侦听端口80的Tomcat连接器无法启动。 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. 验证连接器的配置,识别并停止正在侦听端口80的任何进程,或将该应用程序配置为侦听另一个端口。

This is my log https://gist.github.com/donhuvy/93210850f955f9ddbc00ab735a0ade18#file-terminal-log-L191 这是我的日志https://gist.github.com/donhuvy/93210850f955f9ddbc00ab735a0ade18#file-terminal-log-L191

I have been check port 80 by command 我已经通过命令检查了端口80

sudo lsof -i TCP:80 | grep LISTEN

But result is nothing. 但是结果什么都没有。 How to fix it? 如何解决? (I use macOS 10.12.5) (我使用macOS 10.12.5)

Update: 更新:

Run Sencha client (inside directory client ) 运行Sencha客户端(在目录client端内部)

sencha web -port 8082 start

and I change Spring Boot port to 8082: 我将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.

On linux ports below 1024 can be opened only by root, so the port 80 is restricted by default 在Linux上,只能由root用户打开低于1024的端口,因此默认情况下限制端口80

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 (eg 8080) port 如果要在80端口上发布应用,则需要将请求从80端口重定向到要运行springapp(例如8080)端口的端口

you can use apache2 server wich is allowed by default to work on port 80 and can forward requests for you to tomcat 您可以使用默认情况下允许在默认端口80上使用的apache2服务器,并且可以将请求转发给tomcat

Source: Spring Boot running app on port 80 来源: 在端口80上运行Spring Boot的应用程序

80 port is already use by another application. 80端口已被另一个应用程序使用。 change the post no of tomcat. 更改tomcat的帖子编号。 and you can not run tomcat on 80 post directly you need to install authbind, for reference you can follow below links :- 并且您不能直接在80帖子上运行tomcat,您需要安装authbind,作为参考,您可以点击以下链接:-

Following works: 以下作品:

apt-get install authbind apt-get安装authbind

First, set AUTHBIND=yes in /etc/default/tomcat7 file 首先,在/ etc / default / tomcat7文件中设置AUTHBIND = yes

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/ 参考: 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 http://2ality.com/2010/07/running-tomcat-on-port-80-in-user.html

Assuming that you are using eclipse , one way of solving this error is right clicking in the console and click on Terminate/Disconnect All. 假设您使用的是eclipse,解决此错误的一种方法是右键单击控制台,然后单击“全部终止/断开连接”。 Afterwards run the application it should work fine. 然后运行该应用程序,它应该可以正常工作。

在此处输入图片说明

Right click on Console tab -> and select Terminate/Disconnect all And now try to run your code. 右键单击“控制台”选项卡->并选择“终止/全部断开连接”,然后尝试运行代码。

Note: Don't forget to stop your server before running again. 注意:不要忘记在再次运行之前停止服务器。

If you start SpringBoot application with configured port 80, here can be 2 problems: 如果您使用配置的端口80启动SpringBoot应用程序,则可能有2个问题:

  1. Need to execute a command with root permissions. 需要以root权限执行命令。 Just add "sudo" before the start command. 只需在启动命令之前添加“ sudo”。 This helped me. 这对我有帮助。

  2. Port is using by another application. 端口正在被另一个应用程序使用。 To check it, you can use the command: "netstat -l"; 要检查它,可以使用命令:“ netstat -l”;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 配置为侦听端口的Tomcat连接器无法启动? - My Tomcat connector configured to listen on a port failed to start? 配置为监听 8080 端口的 Tomcat 连接器启动失败 - The Tomcat connector configured to listen on port 8080 failed to start Spring Boot:配置监听8080端口的Tomcat连接器启动失败 - Spring Boot: The Tomcat connector configured to listen on port 8080 failed to start 配置为侦听端口 9001 的 Tomcat 连接器启动失败 - The Tomcat connector configured to listen on port 9001 failed to start 配置为侦听端口 8080 的 Tomcat 连接器无法启动。 端口可能已在使用中或连接器可能配置错误 - The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured 配置为侦听端口 8080 的 Tomcat 连接器无法启动 - 端口 8080 上没有运行 - Tomcat connector configured to listen on port 8080 failed to start - Nothing running on port 8080 https 后的 Spring 启动:配置为侦听端口 8444 的 Tomcat 连接器启动失败。 - Spring boot after https: The Tomcat connector configured to listen on port 8444 failed to start. Spring Boot application in eclipse,Tomcat connector配置为监听端口XXXX启动失败 - Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start Spring 在 https 后启动:配置为侦听端口 8443 的 Tomcat 连接器无法启动 - Spring boot after https: The Tomcat connector configured to listen on port 8443 failed to start 无法从端口80的Linux中的Eclipse Juno启动Apache tomcat - Failed to Start Apache tomcat from eclipse juno in linux at port 80
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM