In the Python script, I have tried the following in all 4 combinations: I found this SO post which talks about SSL connections using psycog2, but I can't match some of the syntax to the documentation. I have scoured the documentation and don't find much information regarding SSL connections. My understanding is that psycopg2 is the appropriate package to use nowadays. user=test-user has been added to postgres as a Superuser.SSL is running for my table ( psql -U username -W -d test-db -h host returns SSL connection (protocol: TLSAv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off).Postgres is listening on port 5432 ( netstat -na | grep tcp shows "LISTEN" on port 5432).Postgres is currently running ( service postgres-9.5 status shows "active").All other arguments are spelled correctly and refer to the correct object.'server1' was entered correctly and the IP address returned by Python corresponds.What other questions should I be asking?.Is there a different package better suited for this kind of connection?.Where can I find documentation concerning the DSN arguments, such as sslmode, sslcert, and sslkey?.I'm trying to pin down on which side the problem exists: the Python end or the database configuration: I have tried several things (given below). Is the server running on host "server1" (xx.xx.xx.xx) and accepting The connection times out with the following error: psycopg2.OperationalError: could not connect to server: Connection timed out (0x0000274C/10060) To this end, I have the following: import psycopg2ĭsn = 'host='.format(host, dbname, user, sslcert, sslmode, sslkey) Currently, I am testing whether users can query the database. The server is running CentOS 7 and PostgreSQL-9.5. I am in the process of setting up a remote PostgreSQL database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |