CAUSE: Most modern versions of Ubuntu Server have PostgreSQL 9.4 configured to use ssl - tls actually - in a version above version 1.0 which is incompatible with Python 3.2 that uses OpenSSL to have the ssl resource. When Python 3.2 tries to connect to PostgreSQL 9.4 using ssl, some library in use by the first (psycopg2?) tries to load a more modern version of OpenSSL compatible with the client, then the application starts to operate with two different versions of OpenSSL - one of which is incompatible with Python 3.2 - which causes a segmentation fault error in the application load.
SOLUTION: We can use PostgreSQL 9.4 with a 1.0 version of ssl or disable this feature. We chose disable "ssl". The procedure below configures PostgreSQL 9.4 to do not use ssl to establish connections as was done in the older versions of distros that use PostgreSQL 9.4.
PROCEDURE:
Open the file /var/lib/pgsql/9.4/data/postgresql.conf
- the path may vary - and comment out these lines:
ssl = on # (change requires restart)
... , ...
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart)
... and...
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart)
Restart the Python 3.2 application and PostgreSQL 9.4.
For PostgreSQL 9.4 the following commands can be used to restart it...
systemctl stop postgresql
sleep 2
systemctl start postgresql
Done!
Thanks! =D
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…