How to fix SSL Error: sslobj.do_handshake failure and SSLError: [Errno bad ca_certs: '/home/root/virtual/local...] while upgrading semantic - python package to 0.3.6
Recently I encountered an ssl error in apache server on upgrading semantics package from 0.3.4 to 0.3.6. The error looks like this:
SSLError: [Errno bad ca_certs: '/home/root/virtual/local/lib/python2.7/site-packages/requests/cacert.pem'] [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'BIO_new_file', 'no such file'), ('x509 certificate routines', 'X509_load_cert_crl_file', 'system lib')]
and also an ssl handshake error: [Errno 0] Error
After trying various cases we were able to solve this issue. This issue can be fixed from the apache virtualhost configuration by place WSGIApplicationGroup %{GLOBAL} .
For Example:
<Directory /var/path/to/wsgi> <Files wsgi.py> ... ... </Files> WSGIApplicationGroup %{GLOBAL} </Directory>
Restart server after adding the above code.