Openshift MySQL“通信链接失败" [英] Openshift MySQL "Communications Link Failure"

查看:78
本文介绍了Openshift MySQL“通信链接失败"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试将在EAP6上运行的Web应用程序连接到OpenShift中的MySQL时,出现以下错误消息.

I get the following error message when trying to connect a web app running on EAP6 to MySQL in OpenShift.

javax.persistence.PersistenceException:org.hibernate.exception.JDBCConnectionException:通信链接失败

javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Communications link failure

我该如何解决?

推荐答案

https中讨论了相同的问题: //community.jboss.org/thread/202318 .

解决方案是将?autoReconnect = true"附加到连接URL.您可以在OpenShift Maven项目的.openshift/config文件夹中的standalone.xml文件中执行此操作.

The solution is to append "?autoReconnect=true" to the connection URL. You do this in the standalone.xml file, found in the .openshift/config folder in your OpenShift Maven project.

编辑

这实际上是一个已知的错误: https://community.jboss.org/thread/177144.验证连接可用作解决方法.

This is actually a known bug: https://community.jboss.org/thread/177144. Validating the connection can be used as a workaround.

<validation>
 <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
</validation>

这篇关于Openshift MySQL“通信链接失败"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆