Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/dist-packages/maascli/__main__.py", line 20, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/maascli/__init__.py", line 46, in main
    options.execute(options)
  File "/usr/lib/python2.7/dist-packages/maascli/cli.py", line 70, in __call__
    description = fetch_api_description(options.url, options.insecure)
  File "/usr/lib/python2.7/dist-packages/maascli/api.py", line 71, in fetch_api_description
    ascii_url(url_describe), "GET", insecure=insecure)
  File "/usr/lib/python2.7/dist-packages/maascli/api.py", line 60, in http_request
    return http.request(url, method, body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", 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/__init__.py", line 1316, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1251, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 900, in connect
    self.sock.connect((self.host, self.port) + sa[2:])
  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 424, in connect
    self.__negotiatehttp(destpair[0], destpair[1])
  File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", 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/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
    response = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 128, in __call__
    actor, anonymous = self.authenticate(request, rm)
  File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 103, in authenticate
    if not authenticator.is_authenticated(request):
  File "/usr/lib/python2.7/dist-packages/maasserver/api_auth.py", line 57, in is_authenticated
    raise OAuthUnauthorized(error)
OAuthUnauthorized

How can I resolve this ?

share|improve this question
add comment

1 Answer 1

Hoi,

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.

Phil

share|improve this answer
add comment

Your Answer

 
discard

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.