繁体   English   中英

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

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

我尝试部署我的 Vaadin Springboot 应用程序,它在 localhost 上运行良好,但是当尝试使用 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>

档案

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM