【发布时间】:2014-06-06 02:00:52
【问题描述】:
我刚刚使用 cleardb 插件在 heroku 中部署了一个非常简单的 grails 应用程序,直到几分钟后一切都很好,当我尝试获取可以访问数据库的视图时,我得到了错误消息。
这里我从heroku日志中粘贴了一个sn-p
2014-06-04T20:12:17.511251+00:00 app[web.1]: 2014-06-04 20:12:17,511 [http-nio-38536-exec-1] ERROR util.JDBCExceptionReporter - No operations allowed after
connection closed.
2014-06-04T20:12:17.515181+00:00 app[web.1]: 2014-06-04 20:12:17,514 [http-nio-38536-exec-1] ERROR errors.GrailsExceptionResolver - EOFException occurred when processing request: [GET] /user
2014-06-04T20:12:17.515187+00:00 app[web.1]: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.. Stacktrace follows:
2014-06-04T20:12:17.515190+00:00 app[web.1]: at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3166)
2014-06-04T20:12:17.515188+00:00 app[web.1]: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
这是我的数据源生产部分
production {
dataSource {
dbCreate = "update"
driverClassName = "com.mysql.jdbc.Driver"
dialect = org.hibernate.dialect.MySQL5InnoDBDialect
uri = new URI(System.env.CLEARDB_DATABASE_URL?:"//bb2c98a68a13fe:3a6fd398@us-cdbr-east-06.cleardb.net/heroku_b28cc03a245469f?reconnect=true")
url = "jdbc:mysql://"+uri.host+uri.path
username = uri.userInfo.split(":")[0]
password = uri.userInfo.split(":")[1]
}
}
日志告诉我连接已关闭。我不知道从这里做什么,希望你能帮助我,谢谢你的时间
【问题讨论】: