将Play 2.1.0应用程序部署到Cloudbees后,收到502错误的请求 [英] Getting 502 bad request after deploying Play 2.1.0 app to Cloudbees

查看:174
本文介绍了将Play 2.1.0应用程序部署到Cloudbees后,收到502错误的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Play应用程序部署到Cloudbees(仅通过推送到git repo(由jenkins生成该应用程序)),它已编译并且可以正常工作,但是加载该应用程序时出现"502 Bad Gateway"错误.控制台中没有显示任何错误,只是尝试访问它时回答"502错误的网关".但这也是我在浏览器中看到的. Cloudbees说,没有其他必要的操作,只需克隆/拉动ClickStart-Project,使其成为您的应用程序并将其推回即可. Play项目在本地运行良好.

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!

仅在添加Procfile的情况下,它与Heroku兼容.我没有Cloudbees的问题...

It works fine with Heroku only adding a Procfile. I don't get the problem with 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!

您可以在应用程序控制台中看到该错误: https://run.cloudbees.com/a/strehlst#app -manage/logs:strehlst/odzh 或通过bees app:tail(如果您安装了bees CLI)进行

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).

这篇关于将Play 2.1.0应用程序部署到Cloudbees后,收到502错误的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆