2017-06-19 149 views
1

我运行web应用https://github.com/donhuvy/mycustomer 我面对错误配置为侦听端口80上的Tomcat连接器未能启动

说明:

Tomcat的连接器配置为侦听端口80上启动失败。 端口可能已经在使用中或连接器可能配置错误。

操作:

验证连接器的配置,识别并阻止任何进程 是在听的80端口,或配置该应用程序到另一个端口上侦听 。

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

通过命令

sudo lsof -i TCP:80 | grep LISTEN 

我一直在检查端口80,但结果却是一无所获。如何解决它? (我用的MacOS 10.12.5)

更新:

运行煎茶客户(内部目录client

sencha web -port 8082 start 

,我改变弹簧引导端口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. 
+0

80端口上是否已经有东西在运行?防火墙能阻止你使用那个端口吗? –

+0

我的'/ etc/hosts'' 127.0.0.1 \t localhost 255.255.255.255 \t broadcasthost :: 1 localhost' –

+0

正如我所说的,我使用命令检查端口80,结果是什么都没有。 –

回答

0

80端口已被其他应用程序使用。更改tomcat的帖子号。你不能在80后运行Tomcat直接您需要安装authbind,以供参考你可以按照下面的链接: -

以下工作:

的apt-get安装authbind

首先,设置AUTHBIND =是在/ etc /默认/ tomcat7文件

sudo touch /etc/authbind/byport/80 
sudo chmod 500 /etc/authbind/byport/80 
sudo chown tomcat7 /etc/authbind/byport/80 

参考: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

1

在1024以下的Linux端口只能由根被打开,因此端口80是默认

如果要发布80端口上的应用程序,你需要重定向从80端口的请求限制到港口你会运行springapp(如8080)端口

可以使用的Apache2服务器至极默认情况下,允许端口80上工作,可以转发给你的tomcat

来源请求:Spring Boot running app on port 80

+0

这由'java.net.SocketException:权限被拒绝'表示。如果另一个程序已经绑定到端口80(其他答案建议),你会得到另一个错误消息,如'已经使用的端口'。 BTW:1024以下的端口在macOS上的工作方式相同(问题中提到过)。 –

相关问题