我的Play 2.2.1应用程序在我的家用机器上运行良好。
在推送到Cloudbees后,它已成功编译和部署。
但是在运行时,当我访问应用程序的URL时,我有时会得到502 Bad Gateway。然后我可以做 bees app:restart ,问题可能会消失或无法解决。然后我做 bees app:restart ,它可能会再次出现。
我完全没有看到它背后的逻辑。重启后50%出现。
以下是来自日志的堆栈跟踪:
Play server process ID is 782
[[37minfo[0m] play - database [default] connected at jdbc:mysql://ec2-23-21-211-172.compute-1.amazonaws.com:3306/totointer
Exception in thread "main" java.lang.NoSuchMethodError: com.avaje.ebean.config.AutofetchConfig.isGarbageCollectionOnShutdown()Z
at com.avaje.ebeaninternal.server.autofetch.DefaultAutoFetchManager.setOwner(DefaultAutoFetchManager.java:98)
at com.avaje.ebeaninternal.server.autofetch.AutoFetchManagerFactory.createAutoFetchManager(AutoFetchManagerFactory.java:29)
at com.avaje.ebeaninternal.server.autofetch.AutoFetchManagerFactory.create(AutoFetchManagerFactory.java:23)
at com.avaje.ebeaninternal.server.core.InternalConfiguration.createAutoFetchManager(InternalConfiguration.java:154)
at com.avaje.ebeaninternal.server.core.DefaultServer.<init>(DefaultServer.java:237)
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:207)
at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:65)
at com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:59)
at play.db.ebean.EbeanPlugin.onStart(EbeanPlugin.java:79)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:88)
at scala.collection.immutable.List.foreach(List.scala:318)
at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.api.Play$$anonfun$start$1.apply(Play.scala:88)
at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
at play.api.Play$.start(Play.scala:87)
at play.core.StaticApplication.<init>(ApplicationProvider.scala:52)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:279)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:274)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:274)
at play.core.server.NettyServer.main(NettyServer.scala)
任何想法为什么?