错误R10(启动超时) - > Web流程未能在启动Java的90秒内绑定到$端口

发布于 2025-02-06 17:14:58 字数 1200 浏览 1 评论 0原文

我将Bot的.jar文件上传到Heroku。一切都应尽可能地工作。然后,应用程序分解,一切都停止工作。

应用日志

heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar target/DiscordBot-1.0-SNAPSHOT-jar-with-dependencies.jar -Dserver.port=43997`
app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 
app[web.1]: [main] INFO net.dv8tion.jda.api.JDA - Login Successful!
app[web.1]: [JDA MainWS-ReadThread] INFO net.dv8tion.jda.internal.requests.WebSocketClient - Connected to WebSocket
app[web.1]: [JDA MainWS-ReadThread] INFO net.dv8tion.jda.api.JDA - Finished Loading!
heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
heroku[web.1]: Stopping process with SIGKILL
heroku[web.1]: Process exited with status 137

procfile

web: java $JAVA_OPTS -jar target/DiscordBot-1.0-SNAPSHOT-jar-with-dependencies.jar -Dserver.port=$PORT

application.properties

server.port=${PORT:8080}

I upload the .jar file of my bot for discord to heroku. Everything works as it should. And then the app breaks down and everything stops working.

Application Logs

heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar target/DiscordBot-1.0-SNAPSHOT-jar-with-dependencies.jar -Dserver.port=43997`
app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 
app[web.1]: [main] INFO net.dv8tion.jda.api.JDA - Login Successful!
app[web.1]: [JDA MainWS-ReadThread] INFO net.dv8tion.jda.internal.requests.WebSocketClient - Connected to WebSocket
app[web.1]: [JDA MainWS-ReadThread] INFO net.dv8tion.jda.api.JDA - Finished Loading!
heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
heroku[web.1]: Stopping process with SIGKILL
heroku[web.1]: Process exited with status 137

Procfile

web: java $JAVA_OPTS -jar target/DiscordBot-1.0-SNAPSHOT-jar-with-dependencies.jar -Dserver.port=$PORT

application.properties

server.port=${PORT:8080}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别把无礼当个性 2025-02-13 17:14:58

工人:java -jar target/discordbot-1.0-snapshot-jar-jar-with-with-with-with intedencies.jar

没有 server.port.port = $ {port:8080} application.properties

worker: java -jar target/DiscordBot-1.0-SNAPSHOT-jar-with-dependencies.jar

without server.port=${PORT:8080} in application.properties

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文