0

我尝试通过 https 连接到 jira 开发沙箱,但出现 SSL23_GET_SERVER_HELLO:unknown 协议错误

这是错误日志/堆栈跟踪。我尝试了 8080 和 443 端口,但没有任何乐趣。

>>> from jira.client import JIRA


>>> options = {'server':'localhost:8080'}

>>> auth = ('username', 'password')
>>> jira = JIRA(options, auth)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 88, in __init__
    self._create_http_basic_session(*basic_auth)
  File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 1369, in _create_http_basic_session
    r = self._session.post(url, data=json.dumps(payload))
  File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 284, in post
    return self.request('post', url, data=data, **kwargs)
  File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 241, in request
    r.send(prefetch=prefetch)
  File "/home/ve/lib/python2.6/site-packages/requests/models.py", line 638, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

>>> options = {'server':'localhost:443'}

>>> auth = ('username', 'password')
>>> jira = JIRA(options, auth)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 88, in __init__
    self._create_http_basic_session(*basic_auth)
  File "/home/ve/lib/python2.6/site-packages/jira/client.py", line 1369, in _create_http_basic_session
    r = self._session.post(url, data=json.dumps(payload))
  File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 284, in post
    return self.request('post', url, data=data, **kwargs)
  File "/home/ve/lib/python2.6/site-packages/requests/sessions.py", line 241, in request
    r.send(prefetch=prefetch)
  File "/home/ve/lib/python2.6/site-packages/requests/models.py", line 631, in send
    raise ConnectionError(sockerr)
requests.exceptions.ConnectionError: [Errno 110] Connection timed out
>>> 
4

2 回答 2

2

尝试这个:

from jira.client import JIRA
options = {'server':'localhost:8080'}
jira = JIRA(options)
jira = JIRA(basic_auth=('username', 'password')) 

如果它没有帮助,是否有可能OpenSSL发生冲突

当 curl 与 OpenSSL 0.9.8 链接并尝试访问运行 OpenSSL 1.0.0 的服务器时,SSL 握手失败并显示: curl: (35) error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)

于 2013-02-16T09:49:42.870 回答
0

现在明白了。端口 8080 已设置并且不是 http 连接的默认设置,对于 https 我使用验证操作基本上在 jira-python 方法主体中设置 validate = False

于 2013-02-20T20:01:09.167 回答