Heroku: at=error code=H10 desc= "App crashed" method=GET path= "/"



我尝试部署我的Vaadin Springboot应用程序,它在本地主机上工作得很好,但当试图使用heroku部署它时,我一直得到H10错误代码。

这里是heroku错误日志

2022-07-14T07:56:18.572038+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar server/webapp-runner.jar --port 53930 target/*`
2022-07-14T07:56:19.226444+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2022-07-14T07:56:19.227703+00:00 app[web.1]: Error: Unable to access jarfile server/webapp-runner.jar
2022-07-14T07:56:19.353150+00:00 heroku[web.1]: Process exited with status 1
2022-07-14T07:56:19.422592+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-14T07:56:20.415875+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=puprwebdatabase.herokuapp.com request_id=5906e3c5-b140-4dc3-8643-6d0fe40e76fe fwd="125.160.46.54" dyno= connect= service= status=503 bytes= protocol=https
2022-07-14T07:56:20.689817+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=puprwebdatabase.herokuapp.com request_id=91b25647-700e-4826-b2d1-06de9ea6c745 fwd="125.160.46.54" dyno= connect= service= status=503 bytes= protocol=https
2022-07-14T07:56:23.027810+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=puprwebdatabase.herokuapp.com request_id=916fbeeb-6ba3-4c58-84bf-510c77b6426b fwd="125.160.46.54" dyno= connect= service= status=503 bytes= protocol=https 

这里是我的pom.xml的一部分

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>frontend</id>
<phase>package</phase>
<configuration>
<productionMode>true</productionMode>
<verbose>true</verbose>
<fork>true</fork>
<executable>${java.home}</executable>
<compilerVersion>17</compilerVersion>
<source>17</source>
<target>17</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals><goal>copy</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.github.jsimone</groupId>
<artifactId>webapp-runner</artifactId>
<version>9.0.24.0</version>
<destFileName>webapp-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

Procfile

web: java $JAVA_OPTS -jar server/webapp-runner.jar --port $PORT target/*

我在stackoverflow上没有找到任何可以解决我的问题的答案。

您正在使用Spring Boot并且不需要webapp-runner!

请阅读文档:https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku

相关内容