【发布时间】:2017-11-02 12:47:34
【问题描述】:
我正在尝试将我的应用部署到 Heroku。我的应用程序崩溃了。这是错误:
at=error code=H10 desc="App crashed" method=GET path="/"
host=smartmed2017.herokuapp.com request_id=3e8cc17e-320b-4230-bdbb-
3a751e3477de fwd="195.19.247.73" dyno= connect= service= status=503
bytes= protocol=https
2017-06-01T11:17:42.380548+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=smartmed2017.herokuapp.com request_id=9ab6574e-3fed-4af3-9cae-
0651e13d9112 fwd="195.19.247.73" dyno= connect= service= status=503
bytes= protocol=https
像往常一样,但我这个问题的原因可能不同。
这是 Main.class
@Controller
@SpringBootApplication
public class Main
{
public static void main(String[] args) throws Exception {
SpringApplication.run(Main.class, args);
}
@RequestMapping("/")
String index() {
return "index";
}
}
过程文件:
web: java -Dserver.port=$PORT -jar target/untitled-1.0-SNAPSHOT.jar
【问题讨论】:
-
你能在重启dyno后运行
heroku logs -t并从JVM捕获错误信息吗? -
@codefinger here。感谢您的回复
-
你贴的日志不够详细。尝试从头开始复制日志,让我们看看会发生什么。如果您有一个连接到 localhost 的数据库,请检查并更改端口。你有 webapp-runner 添加到 pom.xml 吗?
-
@AwotunboOlakunleOladeji 我还没有使用任何数据库。 First screenshot,Second one。我没有这个。感谢您的帮助!
-
@AwotunboOlakunleOladeji 我的意思是我没有 webapp-runner