Connection behind proxy

旧街凉风 提交于 2020-01-03 05:16:10

问题


I have Enthought Canopy (version 1.2.0.1610) intalled on my system. I'm trying to login to the Enthought server. My system is Ubuntu 13.10 x64, and I'm behind a corporate proxy that uses NTLM authentication protocol. To access the Internet I'm using cntlm proxy server on my system. In the Enthought proxy settings I set up the proxy. And It passes test. But, when I try to login it does not login without any errors. I run Canopy from command line to see if there is any error output, and I got following errors.

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 667, in _locked
  File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 383, in update_addon_index
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 182, in reconnect
    self._connect()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 187, in _connect
    self.remote.connect(self.userpass)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/joined.py", line 11, in connect
    repo.connect(auth)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 18, in connect
    self._index = self.get_index()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 100, in get_index
    fp = self.get_data('index.json?pypi=true')
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 124, in get_data
    return self.opener.open(request)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1215, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1174, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 1160, in connect
    self._tunnel()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 741, in _tunnel
    (version, code, message) = response._read_status()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''
''
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 667, in _locked
  File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 383, in update_addon_index
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 182, in reconnect
    self._connect()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 187, in _connect
    self.remote.connect(self.userpass)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/joined.py", line 11, in connect
    repo.connect(auth)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 18, in connect
    self._index = self.get_index()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 100, in get_index
    fp = self.get_data('index.json?pypi=true')
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 124, in get_data
    return self.opener.open(request)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1215, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1174, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 1160, in connect
    self._tunnel()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 741, in _tunnel
    (version, code, message) = response._read_status()
  File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

I'll highly appreciate any help. Thank you...


回答1:


Updated https://support.enthought.com/entries/23590213-Can-I-use-Canopy-Behind-a-Proxy-Firewall- to reflect the fact that NTLM proxy authentication is not yet supported. Apologies for the inconvenience.



来源:https://stackoverflow.com/questions/21404565/connection-behind-proxy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!