0

我正在使用云代工插件。我已经在 Config.groovy 中设置了我的凭据。你能告诉我更多关于我得到的错误吗?

Application Deployed URL: 'sqr-gb-ks.cloudfoundry.com'
> 
Would you like to create and bind a mysql service?[y,n] > Invalid input. Must be one of [y,n] y
Service 'mysql-8a02c10' provisioned.
> 
Would you like to create and bind a postgresql service?[y,n] > Invalid input. Must be one of [y,n] y
Service 'postgresql-d6ab9c9' provisioned.
| Creating application sqr-gb-ks at sqr-gb-ks.cloudfoundry.com with 1024MB and services [mysql-8a02c10, postgresql-d6ab9c9]: OK
| Uploading Application:
|   Checking for available resources: OK
|   Processing resources: OK
|   Packing application: OK
|   Uploading (50K): OK
| Trying to start Application: 'sqr-gb-ks'.....
| Error ERROR - Application 'sqr-gb-ks' failed to start, logs information below.
==== logs/stderr.log ====

Oct 22, 2012 4:57:47 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-25918
Oct 22, 2012 4:57:47 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 403 ms
Oct 22, 2012 4:57:47 PM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Oct 22, 2012 4:57:47 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 22, 2012 4:57:47 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Oct 22, 2012 4:57:47 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Oct 22, 2012 4:58:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Oct 22, 2012 4:58:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
Oct 22, 2012 4:58:10 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
Oct 22, 2012 4:58:10 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager@403525a2] but has failed to stop it. This is very likely to create a memory leak.

==== logs/stdout.log ====

[  Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
Stopping Tomcat because the context stopped.
4

2 回答 2

1

如果它是一个 Grails 应用程序,您应该使用http://grails.org/plugin/cloud-foundry插件而不是 STS,因为它可以识别用于 JDBC、MongoDB、Redis 等的 Spring bean,并且会自动重新配置它们以用于你在部署。请参阅此处的文档:http: //grails-plugins.github.com/grails-cloud-foundry/docs/manual/index.html

另外——你真的想要一个 MySQL 和一个 PostgreSQL 数据库吗?您可能应该选择一个:)

您可以通过查看服务器上的 tomcat/logs 目录中的 stacktrace.log 和“localhost”日志来查看实际问题 - 这是真正的堆栈跟踪和错误消息所在的位置,而不是您在部署时看到的标准输出中。

于 2012-10-23T00:21:32.043 回答
1

感谢来自 odelia Technologies 的朋友 bertrand,我成功地将我的应用程序推送到了云端。我关闭了我添加的一个插件并运行了命令:grails cf-bind-service mysql-f1 ..(我没有这样做!)然后我不得不修改我的DataSource.groovy;

 production {
            dataSource {
                dialect= org.hibernate.dialect.MySQLInnoDBDialect
                driverClassName = "com.mysql.jdbc.Driver"
                    dbCreate = "update"
                username = "n/a"
                password = "n/a"
                url = "n/a"            
             }
     }
于 2012-10-25T15:30:28.503 回答