【发布时间】:2018-08-14 10:21:41
【问题描述】:
我收到"Could not obtain connection to query metadata : Cannot create Poolable ConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)"
当我尝试通过我的代码连接到 Postgress 时,
我尝试通过这个命令通过 ssh 连接它正在连接
gcloud beta sql connect instance_name --user=USER
但是当我尝试通过普通 PSQL 命令连接时,它会给出连接超时。 Google Cloud SQL 连接突然停止,而它运行了 5 天以上。
我正在尝试连接为
<beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<beans:property name="driverClassName" value="org.postgresql.Driver" />
<beans:property name="url"
value="jdbc:postgresql://databaseip:5432/db" />
<beans:property name="username" value="user" />
<beans:property name="password" value="password" />
</beans:bean>
请帮我把它正确连接,让我们知道是什么问题 我正在使用 PostgreSQL 9.6 和谷歌云 wildfly-10.1.0.Final 服务器,托管在谷歌云服务器的内部 ip 中
【问题讨论】:
标签: postgresql google-cloud-platform google-cloud-datastore google-cloud-sql wildfly-10