在Heroku部署Play Framework 2.2.3期间无法连接到Heroku Postgres服务器

时间:2014-07-17 02:23:24

标签: heroku playframework-2.2

我正在尝试使用免费数据库选项在Heroku上部署Play 2.2.3应用程序。

我可以从new成功部署应用程序,但是当我尝试将新版本推送到Heroku时,应用程序崩溃,我在日志中收到以下错误。

这非常烦人,因为目前更新我的应用程序的唯一方法是删除它并再次推送。

我已经看了一些其他答案:

Playframework 2.1 and Heroku update problems 这表明play正在寻找一个新的evolutions文件,即2.sql。我创建了这个文件并将它放在与1.sql相同的目录中,但没有区别。我怀疑这是问题,因为我可以在日志中看到它正在读取evolutions文件。

https://groups.google.com/forum/#!msg/play-framework/F08kemIhQeg/detLnB46mnMJ 这表明DATABASE_URL已过期。我已经检查了,情况并非如此。

?[36m2014-07-17T02:04:01.448124+00:00 app[web.1]:?[0m [?[33mwarn?[0m] play - Run
 with -DapplyEvolutions.default=true and -DapplyDownEvolutions.default=true if y
ou want to run them automatically, including downs (be careful, especially if yo
ur down evolutions drop existing data)
?[36m2014-07-17T02:04:01.447359+00:00 app[web.1]:?[0m
?[36m2014-07-17T02:04:01.453487+00:00 app[web.1]:?[0m   at play.api.db.evolution
s.EvolutionsPlugin.withLock(Evolutions.scala:507)
?[36m2014-07-17T02:04:01.453523+00:00 app[web.1]:?[0m   at play.api.db.evolution
s.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:461)
?[36m2014-07-17T02:04:01.452965+00:00 app[web.1]:?[0m @6ippgoci9: Database 'defa
ult' needs evolution!
?[36m2014-07-17T02:04:01.454019+00:00 app[web.1]:?[0m   at scala.collection.immu
table.List.foreach(List.scala:318)
?[36m2014-07-17T02:04:01.453976+00:00 app[web.1]:?[0m   at play.api.db.evolution
s.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:459)
?[36m2014-07-17T02:04:01.452755+00:00 app[web.1]:?[0m Oops, cannot start the ser
ver.
?[36m2014-07-17T02:04:01.453419+00:00 app[web.1]:?[0m   at play.api.db.evolution
s.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.s
cala:478)
?[36m2014-07-17T02:04:01.454184+00:00 app[web.1]:?[0m   at play.api.Play$$anonfu
n$start$1.apply$mcV$sp(Play.scala:88)
?[36m2014-07-17T02:04:01.454084+00:00 app[web.1]:?[0m   at play.api.Play$$anonfu
n$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
?[36m2014-07-17T02:04:01.454251+00:00 app[web.1]:?[0m   at play.api.Play$$anonfu
n$start$1.apply(Play.scala:88)
?[36m2014-07-17T02:04:01.454115+00:00 app[web.1]:?[0m   at play.api.Play$$anonfu
n$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
?[36m2014-07-17T02:04:01.454052+00:00 app[web.1]:?[0m   at play.api.db.evolution
s.EvolutionsPlugin.onStart(Evolutions.scala:459)
?[36m2014-07-17T02:04:01.454487+00:00 app[web.1]:?[0m   at scala.Option.map(Opti
on.scala:145)
?[36m2014-07-17T02:04:01.454286+00:00 app[web.1]:?[0m   at play.utils.Threads$.w
ithContextClassLoader(Threads.scala:18)
?[36m2014-07-17T02:04:01.454318+00:00 app[web.1]:?[0m   at play.api.Play$.start(
Play.scala:87)
?[36m2014-07-17T02:04:01.454485+00:00 app[web.1]:?[0m   at play.core.server.Nett
yServer$$anonfun$main$3.apply(NettyServer.scala:274)
?[36m2014-07-17T02:04:01.454511+00:00 app[web.1]:?[0m   at play.core.server.Nett
yServer$.main(NettyServer.scala:274)
?[36m2014-07-17T02:04:01.454152+00:00 app[web.1]:?[0m   at scala.collection.immu
table.List.foreach(List.scala:318)
?[36m2014-07-17T02:04:01.454357+00:00 app[web.1]:?[0m   at play.core.StaticAppli
cation.<init>(ApplicationProvider.scala:52)
?[36m2014-07-17T02:04:01.454421+00:00 app[web.1]:?[0m   at play.core.server.Nett
yServer$$anonfun$main$3.apply(NettyServer.scala:279)
?[36m2014-07-17T02:04:01.454217+00:00 app[web.1]:?[0m   at play.api.Play$$anonfu
n$start$1.apply(Play.scala:88)
?[36m2014-07-17T02:04:01.454389+00:00 app[web.1]:?[0m   at play.core.server.Nett
yServer$.createServer(NettyServer.scala:243)
?[36m2014-07-17T02:04:01.454541+00:00 app[web.1]:?[0m   at play.core.server.Nett
yServer.main(NettyServer.scala)
?[36m2014-07-17T02:03:57.456589+00:00 heroku[web.1]:?[0m Starting process with c
ommand `target/universal/stage/bin/publicapp -Dhttp.port=${PORT} -DapplyEvolutio
ns.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DAT
ABASE_URL}`
?[36m2014-07-17T02:04:02.728942+00:00 heroku[web.1]:?[0m State changed from star
ting to crashed
?[36m2014-07-17T02:04:02.718630+00:00 heroku[web.1]:?[0m Process exited with sta
tus 255

0 个答案:

没有答案