Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a test setup running with a MaaS Server, a JuJu Server and a number of Nodes in the MaaS Cluster.

After I reinstalled my MaaS Server (and subsequently the JuJu-Core Server) with Saucy instead of Precise, certain things definitely improved while, at least one other thing seems to be broken now. The maas-cli. I always get an error :

httplib2.socks.HTTPError, 403, Forbidden.

I also created a new MaaS Key/OAuth Token, but to no avail. I have a couple of machines, that have different number of Disks in the cluster. But they have the same number of CPUs and the same amount of memory. According to this article on Juju charm restraints.

I can also use tags as constraints in the deployment process to distinguish between the nodes. As I'm seemingly unable to tag the nodes through the MaaS Web UI, I wanted to use the maas-cli. On precise it worked well, I used it to release nodes etc. But on Saucy I haven't even once been able to at least login. I always get:

Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/dist-packages/maascli/", line 20, in <module>
  File "/usr/lib/python2.7/dist-packages/maascli/", line 46, in main
  File "/usr/lib/python2.7/dist-packages/maascli/", line 70, in __call__
    description = fetch_api_description(options.url, options.insecure)
  File "/usr/lib/python2.7/dist-packages/maascli/", line 71, in fetch_api_description
    ascii_url(url_describe), "GET", insecure=insecure)
  File "/usr/lib/python2.7/dist-packages/maascli/", line 60, in http_request
    return http.request(url, method, body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/", line 1569, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/", line 1316, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/", line 1251, in _conn_request
  File "/usr/lib/python2.7/dist-packages/httplib2/", line 900, in connect
    self.sock.connect((, self.port) + sa[2:])
  File "/usr/lib/python2.7/dist-packages/httplib2/", line 424, in connect
    self.__negotiatehttp(destpair[0], destpair[1])
  File "/usr/lib/python2.7/dist-packages/httplib2/", line 390, in __negotiatehttp
    raise HTTPError((statuscode, statusline[2]))
httplib2.socks.HTTPError: (403, 'Forbidden')

The maas.log does not hold anything regarding this issue. It holds Error messages about OAuth and that a request was unauthorized. But that's an 'old' message. No new messages seem to be written to that log.

ERROR 2013-11-22 09:35:37,592 maasserver Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/decorators/", line 19, in inner_func
    response = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston/", line 128, in __call__
    actor, anonymous = self.authenticate(request, rm)
  File "/usr/lib/python2.7/dist-packages/piston/", line 103, in authenticate
    if not authenticator.is_authenticated(request):
  File "/usr/lib/python2.7/dist-packages/maasserver/", line 57, in is_authenticated
    raise OAuthUnauthorized(error)

How can I resolve this ?

share|improve this question


to answer my own question, it were the http/https proxy environment variable. As I'm using private IP's for POC, I had to setup http/https proxy environment variables. Especially since maas-import-pxe-files needs this.

I had a phone call with an engineer from canonical who suggested removing those, to solve an issue that I have with JuJu. That's when it struck me. Now of to check, if this solves the juju issue as well.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.