Openshift MySQL“通信链接失败" [英] Openshift MySQL "Communications Link Failure"
问题描述
当尝试将在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屋!