当我试图通过我的代码连接到Postgress时,我得到了"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.)"。
我尝试通过这个命令通过ssh连接它正在连接
gcloud beta sql connect in
我对Google非常陌生,一般运行应用程序。我目前有一个Django应用程序运行在上的一个Docker容器中,它连接到同一个项目中的Google (PostgreSQL)实例。最新的版本已经运行了大约3天,现在没有问题。
问题是:
今天,我开始反复接收来自应用程序的OperationalError: server closed the connection unexpectedly错误。我可以运行Cloud代理并正常启动它(Ready for new connections),但是如果我试图连接psql,我会收到以下错误:
psql: server closed the connection
我在Google上的hadoop上运行sqoop,通过Cloud代理访问postgresql,但我得到了一个Java依赖项错误:
INFO: First Cloud SQL connection, generating RSA key pair.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.Nat
我试图在浏览器上使用谷歌云外壳,在我拥有12.1之前的win 10 PC上有最新的psql 12.3,但是,我更新了看看这个问题是否会解决,但是,它仍然说我的机器有9.6我在google云上创建的依赖是12,所以我不知道为什么它会给我这个警告。
我使用的是1vcpu,内存3.75GB的SSD存储器10 GB
CLOUD SHELL
Terminal
psql (9.6.17, server 12.1)
WARNING: psql major version 9.6, server major version 12.1
Some psql features might not
我在Google的同一个项目中有Cloud SQL和Instance。
我想通过命令行从实例连接Mysql (从)。
我正在使用命令连接:
gcloud sql connect cloud-sql-name --user=username
它的给予:
ERROR: (gcloud.sql.connect) There was no instance found or you are not authorized to connect to it.
我该怎么联系。
我正在跟踪,将我现有的Django项目上传到Google / Postgres,该项目在sqlite上本地运行。
我已经运行了cloud_sql_proxy服务,可以从命令行登录到Postgres。
我正准备运行命令
python manage.py migrate
我得到了一个错误:
django.db.utils.OperationalError: connection to server on socket "/cloudsql/cgps-registration-2:us-central-1:cgps-reg-2-postgre-sql/.s.PGSQL.5432" f
我有一个ubunut计算引擎实例和一个postgres Cloud SQL实例,这两个实例都是同一个项目的一部分,并且都在同一个专区中。我想从Compute Engine连接到Cloud SQL,但遇到了一些问题
我的postgres有默认的用户设置和添加的新数据库。我已经为我的计算引擎保留了一个静态IP,并将此IP添加到postgres的授权列表中。我尝试过(从云外壳)使用psycopg2的python脚本连接,以及使用psql直接从bash连接。我在这两种情况下得到的错误消息如下:
Connection timed out
Is the server running on host
我想在linux机器中postgresql中的数据库级别上执行一些SQL命令。我想学习命令行
我想运行SQL。我有一个名为somesuperuser的角色,它使用phppgadmin创建。
CREATE DATABASE new_database OWNER somesuperuser;
我知道postgres是默认的超级用户。
我试着
$ psql -U postgres
psql (11.2)
Type "help" for help.
postgres=# \c
You are now connected to database "postgres" a