Unable to connect to charms store

Reported by Kodamati Pradeep Vinesh Reddy on 2012-07-23
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
The Lomond project
Medium
Kodamati Pradeep Vinesh Reddy
Juju Charms Collection
Undecided
Unassigned

Bug Description

when I try to download the charms using charm get wordpress(or any other charm) I get a connection timed out error. I have a proxy added in my network and I am able to use wget, apt-get but charm alone wont work.

Due to this I am also not able to use juju deploy charm.

pradeep@juju-desktop:~/charms/precise$ charm get wordpress
Traceback (most recent call last):
  File "/usr/share/charm-tools/scripts/list", line 5, in <module>
    lp = Launchpad.login_anonymously('charm-tools', 'production', version='devel')
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 373, in login_anonymously
    version=version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 198, in __init__
    credentials, service_root, cache, timeout, proxy_info, version)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 460, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 299, in get_wadl_application
    response, content = self._request(url, media_type=wadl_type)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 242, in _request
    str(url), method=method, body=data, headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 211, in _request_and_retry
    url, method=method, body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1444, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 126, in _request
    LaunchpadOAuthAwareHttp, self)._request(*args)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 130, in _request
    redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1196, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1170, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 927, in connect
    raise socket.error, msg
socket.error: [Errno 110] Connection timed out
wordpress does not exist in official charm store.

Jason X. (jasxun) wrote :

charm doe not respect system proxy settings, you have to modify /usr/share/charm-tools/scripts,

adding:
  proxy_info = httplib2.ProxyInfo(socks.PROXY_TYPE_HTTP, 'your.proxy.server', your_proxy_port)
to the Launchpad.login_anonymously function call.

socks and httplib2 packages should be imported.

Jason after adding the above mentioned "proxy_info" details to the Launchpad.login_anonymously function call I am getting the following error

pradeep@pradeep-ProLiant-ML350p-Gen8:~/charms/precise$ charm get mysql
Traceback (most recent call last):
  File "/usr/share/charm-tools/scripts/list", line 8, in <module>
    lp = Launchpad.login_anonymously('charm-tools', 'production', version='devel', proxy_info=httplib2.ProxyInfo(socks.PROXY_TYPE_HTTP, 'http://proxy.compaq.com', 8080) )
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 373, in login_anonymously
    version=version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 198, in __init__
    credentials, service_root, cache, timeout, proxy_info, version)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 460, in __init__
    self._wadl = self._browser.get_wadl_application(self._root_uri)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 299, in get_wadl_application
    response, content = self._request(url, media_type=wadl_type)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 242, in _request
    str(url), method=method, body=data, headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 211, in _request_and_retry
    url, method=method, body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1444, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 126, in _request
    LaunchpadOAuthAwareHttp, self)._request(*args)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 130, in _request
    redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1196, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1138, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at api.launchpad.net
mysql does not exist in official charm store.

Ilari Shafer (mrcaps) wrote :

This might have been resolved or outdated by now, but when specifying proxy_info, you'll want to not include http:// in the hostname of the proxy:
proxy_info=httplib2.ProxyInfo(socks.PROXY_TYPE_HTTP, 'proxy.compaq.com', 8080)

Narinder Gupta (narindergupta) wrote :

Pradeep will you please test the same with the changes mentioned by mrcaps?

Changed in lomond:
assignee: nobody → Kodamati Pradeep Vinesh Reddy (pradeep-reddy2)
importance: Undecided → Medium
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers