Python:Gunicorn - 使用SSL cerficate错误

时间:2015-10-21 21:30:42

标签: python ssl gunicorn

我为我的网页编写过Gunicorn REST后端。我想使用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运行正常,证书完全相同,并且随机发生错误。

你能帮帮我吗?

0 个答案:

没有答案