简体   繁体   English

Spring Boot App部署在Azure App Service端口8080

[英]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.要解决这个问题,您有两种选择。

  1. Try to run the application on a port other than 8080.尝试在 8080 以外的端口上运行应用程序。
  2. Identify and stop the process running on that specific port.识别并停止在该特定端口上运行的进程。

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.

相关问题 将 gRPC 服务部署到 Azure Linux 应用服务 - 端口未打开 - Deploy gRPC service to Azure Linux App Service - port not open 使用root帐户将Spring Boot应用程序作为服务运行 - Running Spring Boot app as service using root account 应用程序“appname”无法在打开的班次节点应用程序上启动(端口8080不可用) - Application 'appname' failed to start (port 8080 not available) on open shift node app 禁用 Spring 的系统日志 作为 Linux init.d 服务运行的引导应用程序 - Disable system logs for Spring Boot app running as Linux init.d service 为什么之后我在 Linux shell 中退出 Spring Boot 应用程序(通过 CTRL+Z)一个进程仍然监听 8080 端口? (我的应用程序使用的端口 - Why after that I quit a Spring Boot application in a Linux shell (by CTRL+Z) a process still listen on the 8080 port? (the port used by my application Azure Linux web 应用程序,通过 ZC728A49363C9A93A5A43A7E7F23 文件部署 - Azure Linux web app, deployed via FTP, files give 404 Spring启动应用程序在ssh注销后无法正常工作 - Spring boot App not working after ssh logout Spring 启动应用无法读取环境属性 - Spring Boot app is not able to read environment properties 从 Docker 运行 Spring Boot 应用程序不起作用 - Running a Spring Boot app from Docker is not working 对 Azure Linux 应用服务中运行的容器进行健康检查 - HealthCheck for the containers running in the Azure Linux App service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM