Python:Gunicorn-使用SSL证书错误

Python:Gunicorn-使用SSL证书错误,python,ssl,gunicorn,Python,Ssl,Gunicorn,我已经为我的网页编写了GunicornREST后端。我想使用HTTPS,因为我正在发送敏感信息。我已将所有证书添加到gunicorn的启动中。但是,有时我会出现以下错误: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1750) [2015-10-21 21:44:33 +0000] [20490] [ERROR] Error handling request Traceback (most recent call la

我已经为我的网页编写了GunicornREST后端。我想使用HTTPS,因为我正在发送敏感信息。我已将所有证书添加到gunicorn的启动中。但是,有时我会出现以下错误:

[SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1750)
[2015-10-21 21:44:33 +0000] [20490] [ERROR] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/sync.py", line 129, in handle
    req = six.next(parser)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/parser.py", line 41, in __next__
    self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/message.py", line 153, in __init__
    super(Request, self).__init__(cfg, unreader)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/message.py", line 53, in __init__
    unused = self.parse(self.unreader)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/message.py", line 165, in parse
    self.get_data(unreader, buf, stop=True)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/message.py", line 156, in get_data
    data = unreader.read()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/unreader.py", line 38, in read
    d = self.chunk()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/http/unreader.py", line 65, in chunk
    return self.sock.recv(self.mxchunk)
  File "/usr/lib/python2.7/ssl.py", line 714, in recv
    return self.read(buflen)
  File "/usr/lib/python2.7/ssl.py", line 608, in read
    v = self._sslobj.read(len or 1024)
SSLError: [SSL: SSL_HANDSHAKE_FAILURE] ssl handshake failure (_ssl.c:1750)
我不知道该怎么办。我也试着用谷歌搜索这个问题,但是没有任何解决办法。这个错误很奇怪。Apache使用完全相同的证书运行良好,错误随机发生


您能帮助我吗?

我还没有找到python解决方案,但是我停止使用gunicorn和SSL,而是安装了Apache代理。