gpt4 book ai didi

linux - 子用户启动 Spring 应用程序失败

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:17:21 24 4
gpt4 key购买 nike

每当我尝试运行 spring boot 应用程序时,我的 Linux 机器都会返回以下问题:

org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-80]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23][...](LifecycleBase.java:150) ~[tomcat-embed-core-8.5.23.jar!/:8.5.23]
... 21 common frames omitted
Caused by: java.net.SocketException: Permission denied[...]

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.

希望有人能帮助我。

最佳答案

我猜您使用的是 Ubuntu。 1024 以下的端口只能由 root 打开,因此作为普通的非特权用户,您不能在端口 80 上运行您的应用程序。为什么不使用 server.port 属性使用另一个端口?

关于linux - 子用户启动 Spring 应用程序失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49139057/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com