[英]Spring Boot App deployed on Azure App Service port 8080
I'm trying to deploy a Spring Boot Rest Api (Gradle) to an Azure app service.我正在尝试将 Spring Boot Rest Api (Gradle) 部署到 Azure 应用程序服务。 There is an executable jar in the /home/site/wwwroot folder and a startup command (java -jar /home/site/wwwroot/app.jar).
/home/site/wwwroot文件夹下有可执行文件jar和启动命令(java -jar /home/site/wwwroot/app.jar)。 When I execute this script, the spring api starts but throws the following error: "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."
当我执行此脚本时,spring api 启动但抛出以下错误:“配置为侦听端口 80 的 Tomcat 连接器无法启动。端口可能已被使用或连接器可能配置错误。”
I can't run the app on another port because the Azure App Service only allows inbound HTTP traffic on port 80 and 443 for SSL. I tried killing the process that is running on port 80 but that kills my ssh terminal.我无法在另一个端口上运行该应用程序,因为 Azure 应用程序服务仅允许端口 80 和 443 上的入站流量 HTTP 流量用于 SSL。我尝试终止在端口 80 上运行的进程,但这会终止我的 ssh 终端。
Is there a solution to 'clear' the proces running on port 80 and actually run my Spring application on it?是否有解决方案来“清除”在端口 80 上运行的进程并在其上实际运行我的 Spring 应用程序?
"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."
“配置为侦听端口 80 的 Tomcat 连接器无法启动。该端口可能已在使用中,或者连接器可能配置错误。”
The error is because another process is running on the same port.该错误是因为另一个进程正在同一个端口上运行。 To solve this, you have two options.
要解决这个问题,您有两种选择。
Check this post on how to change the default tomcat port number .查看这篇文章, 了解如何更改默认的 tomcat 端口号。 See: how the spring boot configuration works .
请参阅: spring 启动配置的工作原理。
Check this blog and SO thread might be helpful.检查此博客和 SO 线程可能会有所帮助。 Tomcat Server Error - Port 8080 already in use
Tomcat 服务器错误 - 端口 8080 已被使用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.