Getting 502 bad request after deploying Play 2.1.0 app to Cloudbees

荒凉一梦 提交于 2019-12-25 11:15:14

问题


I tried to deploy a Play app to Cloudbees (only via push to git repo from which it is built by jenkins), it compiled and should work but I get a "502 Bad Gateway" error when loading the app. There is no error shown in the console only that it answers "502 Bad Gateway" when trying to access it. But that's what I see in the browser, too. Cloudbees say that there is no other manipulation necessary, just cloning/pulling the ClickStart-Project, making it you application and pushing it back. The Play project works fine locally.

I am very grateful for any help. Please let me know if I need to provide any other information. Thanks a lot!

Edit: It works fine with Heroku only adding a Procfile. I don't get the problem with Cloudbees...


回答1:


In this case the error is due to the database needing evolutions to be run before it can start:

[warn] play - Run with -DapplyEvolutions.default=true and -DapplyDownEvolutions.default=true if you want to run them automatically (be careful)
Oops, cannot start the server.
@6eg39l651: Database 'default' needs evolution!

You can see the error in your application console: https://run.cloudbees.com/a/strehlst#app-manage/logs:strehlst/odzh or via bees app:tail if you have the bees CLI installed.

You can also deploy direct from your desktop if you like:

play dist
bees app:deploy -t play2 dist/yourapp.zip

And it will push direct to your app (if you don't want a continuous deployment pipeline).



来源:https://stackoverflow.com/questions/16900737/getting-502-bad-request-after-deploying-play-2-1-0-app-to-cloudbees

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!