Python 3.2 - uWSGI 进程出现分段错误
Python 3.2 - uWSGI process got Segmentation Fault
简介:
这是一个使用Python3.2、NGINX和uWSGI的web应用环境。
Python 3.2,NGINX 和 uWSGI 组件是通过构建和安装(“./configure”、“make”和“make install”)安装的,它们也使用 OpenSSL 1.0.X通过构建和安装安装。
应用程序 运行 Ubuntu 20.04 LTS。
问题:
应用程序无法启动,uWSGI 日志显示以下信息...
Thu Jan 21 21:44:37 2021 - Respawned uWSGI worker 4 (new pid: 99572)
Thu Jan 21 21:44:37 2021 - worker 3 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 7 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 1 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 8 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 5 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - received message 0 from emperor
Thu Jan 21 21:44:37 2021 - SIGINT/SIGQUIT received...killing workers...
Thu Jan 21 21:44:37 2021 - mem-collector thread started for worker 4
Thu Jan 21 21:44:37 2021 - !!! uWSGI process 99543 got Segmentation Fault !!!
Thu Jan 21 21:44:37 2021 - *** backtrace of 99543 ***
/usr/local/lb/uwsgi_ve32/bin/uwsgi(uwsgi_backtrace+0x2e) [0x556d323f077e]
/usr/local/lb/uwsgi_ve32/bin/uwsgi(uwsgi_segfault+0x27) [0x556d323f0b67]
/lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f60a0f33210]
/lib/x86_64-linux-gnu/libc.so.6(+0x186b7e) [0x7f60a1073b7e]
/usr/local/ssl/lib/libcrypto.so.1.0.0(+0x12254c) [0x7f60a147054c]
/usr/local/ssl/lib/libcrypto.so.1.0.0(lh_insert+0x56) [0x7f60a14707e6]
/usr/local/ssl/lib/libcrypto.so.1.0.0(OBJ_NAME_add+0x74) [0x7f60a13bbc84]
/lib/x86_64-linux-gnu/libssl.so.1.1(+0x36392) [0x7f60a0067392]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x1247f) [0x7f60a181547f]
/lib/x86_64-linux-gnu/libcrypto.so.1.1(CRYPTO_THREAD_run_once+0xd) [0x7f609ff3d78d]
/lib/x86_64-linux-gnu/libssl.so.1.1(OPENSSL_init_ssl+0x5b) [0x7f60a006757b]
/lib/x86_64-linux-gnu/libpq.so.5(+0x26304) [0x7f60a00ea304]
/lib/x86_64-linux-gnu/libpq.so.5(PQconnectPoll+0xe80) [0x7f60a00d4ec0]
/lib/x86_64-linux-gnu/libpq.so.5(+0x11fd7) [0x7f60a00d5fd7]
/lib/x86_64-linux-gnu/libpq.so.5(PQconnectdb+0x38) [0x7f60a00d9048]
/usr/local/lb/lbg_ve32/lib/python3.2/site-packages/psycopg2/_psycopg.cpython-32m.so(+0x10939) [0x7f60a012e939]
/usr/local/lb/lbg_ve32/lib/python3.2/site-packages/psycopg2/_psycopg.cpython-32m.so(+0x117a2) [0x7f60a012f7a2]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0xab58c) [0x7f60a11c558c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(_PyObject_CallFunction_SizeT+0xd2) [0x7f60a1175192]
/usr/local/lb/lbg_ve32/lib/python3.2/site-packages/psycopg2/_psycopg.cpython-32m.so(+0xbace) [0x7f60a0129ace]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x76e3) [0x7f60a1210b53]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81f92) [0x7f60a119bf92]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0xfb9) [0x7f60a120a429]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81f92) [0x7f60a119bf92]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0xfb9) [0x7f60a120a429]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81eaf) [0x7f60a119beaf]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x7033c) [0x7f60a118a33c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0xacf47) [0x7f60a11c6f47]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0xab58c) [0x7f60a11c558c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x4106) [0x7f60a120d576]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81f92) [0x7f60a119bf92]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0xfb9) [0x7f60a120a429]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81eaf) [0x7f60a119beaf]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
*** end of backtrace ***
重要提示:
似乎该应用程序正在“混合”OpenSSL 1.0.X 组件与 OpenSSL 1.1.X 组件...
/usr/local/ssl/lib/libcrypto.so.1.0.0(+0x12254c) [0x7f60a147054c]
/usr/local/ssl/lib/libcrypto.so.1.0.0(lh_insert+0x56) [0x7f60a14707e6]
/usr/local/ssl/lib/libcrypto.so.1.0.0(OBJ_NAME_add+0x74) [0x7f60a13bbc84]
/lib/x86_64-linux-gnu/libssl.so.1.1(+0x36392) [0x7f60a0067392]
/lib/x86_64-linux-gnu/libcrypto.so.1.1(CRYPTO_THREAD_run_once+0xd) [0x7f609ff3d78d]
/lib/x86_64-linux-gnu/libssl.so.1.1(OPENSSL_init_ssl+0x5b) [0x7f60a006757b]
我真的需要帮助解决这个问题...我已经尝试了所有方法!
谢谢! =D
原因: 大多数现代版本的 Ubuntu 服务器都将 PostgreSQL 9.4 配置为使用 ssl - tls 实际上 - 在版本 1.0 以上的版本中,它与 Python 3.2 不兼容,它使用 OpenSSL 来获得 ssl 资源。当 Python 3.2 尝试使用 ssl 连接到 PostgreSQL 9.4 时,第一个正在使用的某些库 (psycopg2?) 会尝试加载与客户端兼容的更现代版本的 OpenSSL,然后应用程序开始使用两个不同版本的 OpenSSL 运行 - 其中一个与 Python 3.2 不兼容 - 这会导致 分段错误 应用程序加载错误。
解决方案: 我们可以使用带有 1.0 版本 ssl 的 PostgreSQL 9.4 或禁用此功能。我们选择禁用“ssl”。下面的过程将 PostgreSQL 9.4 配置为 不使用 ssl 来建立连接,就像在使用 PostgreSQL 9.4 的旧版本发行版中所做的那样。
程序:
打开文件 /var/lib/pgsql/9.4/data/postgresql.conf
- 路径可能不同 - 然后 注释掉 这些行:
ssl = on # (change requires restart)
... , ...
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart)
...和...
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart)
重新启动 Python 3.2 应用程序和 PostgreSQL 9.4。
对于 PostgreSQL 9.4,可以使用以下命令重新启动它...
systemctl stop postgresql
sleep 2
systemctl start postgresql
完成!
谢谢! =D
简介:
这是一个使用Python3.2、NGINX和uWSGI的web应用环境。
Python 3.2,NGINX 和 uWSGI 组件是通过构建和安装(“./configure”、“make”和“make install”)安装的,它们也使用 OpenSSL 1.0.X通过构建和安装安装。
应用程序 运行 Ubuntu 20.04 LTS。
问题:
应用程序无法启动,uWSGI 日志显示以下信息...
Thu Jan 21 21:44:37 2021 - Respawned uWSGI worker 4 (new pid: 99572)
Thu Jan 21 21:44:37 2021 - worker 3 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 7 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 1 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 8 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - worker 5 buried after 0 seconds
Thu Jan 21 21:44:37 2021 - received message 0 from emperor
Thu Jan 21 21:44:37 2021 - SIGINT/SIGQUIT received...killing workers...
Thu Jan 21 21:44:37 2021 - mem-collector thread started for worker 4
Thu Jan 21 21:44:37 2021 - !!! uWSGI process 99543 got Segmentation Fault !!!
Thu Jan 21 21:44:37 2021 - *** backtrace of 99543 ***
/usr/local/lb/uwsgi_ve32/bin/uwsgi(uwsgi_backtrace+0x2e) [0x556d323f077e]
/usr/local/lb/uwsgi_ve32/bin/uwsgi(uwsgi_segfault+0x27) [0x556d323f0b67]
/lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f60a0f33210]
/lib/x86_64-linux-gnu/libc.so.6(+0x186b7e) [0x7f60a1073b7e]
/usr/local/ssl/lib/libcrypto.so.1.0.0(+0x12254c) [0x7f60a147054c]
/usr/local/ssl/lib/libcrypto.so.1.0.0(lh_insert+0x56) [0x7f60a14707e6]
/usr/local/ssl/lib/libcrypto.so.1.0.0(OBJ_NAME_add+0x74) [0x7f60a13bbc84]
/lib/x86_64-linux-gnu/libssl.so.1.1(+0x36392) [0x7f60a0067392]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x1247f) [0x7f60a181547f]
/lib/x86_64-linux-gnu/libcrypto.so.1.1(CRYPTO_THREAD_run_once+0xd) [0x7f609ff3d78d]
/lib/x86_64-linux-gnu/libssl.so.1.1(OPENSSL_init_ssl+0x5b) [0x7f60a006757b]
/lib/x86_64-linux-gnu/libpq.so.5(+0x26304) [0x7f60a00ea304]
/lib/x86_64-linux-gnu/libpq.so.5(PQconnectPoll+0xe80) [0x7f60a00d4ec0]
/lib/x86_64-linux-gnu/libpq.so.5(+0x11fd7) [0x7f60a00d5fd7]
/lib/x86_64-linux-gnu/libpq.so.5(PQconnectdb+0x38) [0x7f60a00d9048]
/usr/local/lb/lbg_ve32/lib/python3.2/site-packages/psycopg2/_psycopg.cpython-32m.so(+0x10939) [0x7f60a012e939]
/usr/local/lb/lbg_ve32/lib/python3.2/site-packages/psycopg2/_psycopg.cpython-32m.so(+0x117a2) [0x7f60a012f7a2]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0xab58c) [0x7f60a11c558c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(_PyObject_CallFunction_SizeT+0xd2) [0x7f60a1175192]
/usr/local/lb/lbg_ve32/lib/python3.2/site-packages/psycopg2/_psycopg.cpython-32m.so(+0xbace) [0x7f60a0129ace]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x76e3) [0x7f60a1210b53]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81f92) [0x7f60a119bf92]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0xfb9) [0x7f60a120a429]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81f92) [0x7f60a119bf92]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0xfb9) [0x7f60a120a429]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81eaf) [0x7f60a119beaf]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x7033c) [0x7f60a118a33c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0xacf47) [0x7f60a11c6f47]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0xab58c) [0x7f60a11c558c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x4106) [0x7f60a120d576]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81f92) [0x7f60a119bf92]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0xfb9) [0x7f60a120a429]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x65f1) [0x7f60a120fa61]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalFrameEx+0x670c) [0x7f60a120fb7c]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyEval_EvalCodeEx+0x733) [0x7f60a12115e3]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(+0x81eaf) [0x7f60a119beaf]
/usr/local/lb/py32/lib/libpython3.2m.so.1.0(PyObject_Call+0x5b) [0x7f60a1174dcb]
*** end of backtrace ***
重要提示:
似乎该应用程序正在“混合”OpenSSL 1.0.X 组件与 OpenSSL 1.1.X 组件...
/usr/local/ssl/lib/libcrypto.so.1.0.0(+0x12254c) [0x7f60a147054c]
/usr/local/ssl/lib/libcrypto.so.1.0.0(lh_insert+0x56) [0x7f60a14707e6]
/usr/local/ssl/lib/libcrypto.so.1.0.0(OBJ_NAME_add+0x74) [0x7f60a13bbc84]
/lib/x86_64-linux-gnu/libssl.so.1.1(+0x36392) [0x7f60a0067392]
/lib/x86_64-linux-gnu/libcrypto.so.1.1(CRYPTO_THREAD_run_once+0xd) [0x7f609ff3d78d]
/lib/x86_64-linux-gnu/libssl.so.1.1(OPENSSL_init_ssl+0x5b) [0x7f60a006757b]
我真的需要帮助解决这个问题...我已经尝试了所有方法!
谢谢! =D
原因: 大多数现代版本的 Ubuntu 服务器都将 PostgreSQL 9.4 配置为使用 ssl - tls 实际上 - 在版本 1.0 以上的版本中,它与 Python 3.2 不兼容,它使用 OpenSSL 来获得 ssl 资源。当 Python 3.2 尝试使用 ssl 连接到 PostgreSQL 9.4 时,第一个正在使用的某些库 (psycopg2?) 会尝试加载与客户端兼容的更现代版本的 OpenSSL,然后应用程序开始使用两个不同版本的 OpenSSL 运行 - 其中一个与 Python 3.2 不兼容 - 这会导致 分段错误 应用程序加载错误。
解决方案: 我们可以使用带有 1.0 版本 ssl 的 PostgreSQL 9.4 或禁用此功能。我们选择禁用“ssl”。下面的过程将 PostgreSQL 9.4 配置为 不使用 ssl 来建立连接,就像在使用 PostgreSQL 9.4 的旧版本发行版中所做的那样。
程序:
打开文件 /var/lib/pgsql/9.4/data/postgresql.conf
- 路径可能不同 - 然后 注释掉 这些行:
ssl = on # (change requires restart)
... , ...
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart)
...和...
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart)
重新启动 Python 3.2 应用程序和 PostgreSQL 9.4。
对于 PostgreSQL 9.4,可以使用以下命令重新启动它...
systemctl stop postgresql
sleep 2
systemctl start postgresql
完成! 谢谢! =D