Getting 502 bad request after deploying Play 2.1.0 app to Cloudbees
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…
One Solution collect form web for “Getting 502 bad request after deploying Play 2.1.0 app to Cloudbees”
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:
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).