在cloudfoundry中启动播放框架应用程序时出错

时间:2012-11-17 05:08:08

标签: java mongodb playframework cloudfoundry morphia

当我在云代工厂启动播放框架应用程序(java)后发生错误。我正在使用morphia morphia 1.2.4b,播放框架1.2.4      

ERROR play - Can't start in PROD mode with errors
        com.mongodb.MongoException$Network: can't call something
                at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:211)
                at com.mongodb.DBApiLayer$MyCollection._find(DBApiLayer.java:303)
                at com.mongodb.DB.command(DB.java:159)
                at com.mongodb.DBCollection.getCount(DBCollection.java:769)
                at com.mongodb.DBCollection.getCount(DBCollection.java:740)
                at com.mongodb.DBCollection.count(DBCollection.java:695)
                at com.mongodb.gridfs.GridFS.(GridFS.java:85)
                at play.modules.morphia.MorphiaPlugin.initMorphia(MorphiaPlugin.java:402)
                at play.modules.morphia.MorphiaPlugin.onApplicationStart(MorphiaPlugin.java:452)
                at play.plugins.PluginCollection.onApplicationStart(PluginCollection.java:480)
                at play.Play.start(Play.java:515)
                at play.Play.init(Play.java:300)
                at play.server.ServletWrapper.contextInitialized(ServletWrapper.java:77)
                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
                at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
                at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
                at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
                at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
                at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
                at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
                at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
                at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
                at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
                at org.apache.catalina.core.StandardService.start(StandardService.java:525)
                at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
                at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
                at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
        Caused by: java.io.IOException: couldn't connect to [XXXXX-XXXX-XXXX-XXXX-XXXX/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused
                at com.mongodb.DBPort._open(DBPort.java:224)
                at com.mongodb.DBPort.go(DBPort.java:101)
                at com.mongodb.DBPort.go(DBPort.java:82)
                at com.mongodb.DBPort.call(DBPort.java:72)
                at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:202)
                ... 32 more
        Stopping Tomcat because the context stopped.

1 个答案:

答案 0 :(得分:1)

看起来你无法连接到云端的mongodb服务器。您可以检查您的配置并确保可以访问mongodb服务。