1

I have trouble with using juju and maas with Ubuntu.

I I ran command 'juju bootstrap', the following error was shown in /var/log/maas/maas.log:

==================================================================================== ERROR 2012-11-26 09:05:09,041 maas.maasserver ################################ Exception: File not found ################################

159 ERROR 2012-11-26 09:05:09,041 maas.maasserver Traceback (most recent call last):

160 File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response

161 response = callback(request, *callback_args, **callback_kwargs)

162 File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func

163 response = func(*args, **kwargs)

164 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 167, in call

165 result = self.error_handler(e, request, meth, em_format)

166 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 165, in call

167 result = meth(request, *args, **kwargs)

168 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 296, in dispatch

169 return function(self, request, *args, **kwargs)

170 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 945, in get_file

171 MAASAPINotFound: File not found

172

173 ERROR 2012-11-26 09:05:09,343 maas.maasserver ################################ Exception: You are not allowed to start up this node. ##### ###########################

174 ERROR 2012-11-26 09:05:09,343 maas.maasserver Traceback (most recent call last):

175 File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response

176 response = callback(request, *callback_args, **callback_kwargs)

177 File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func

178 response = func(*args, **kwargs)

179 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 167, in call

180 result = self.error_handler(e, request, meth, em_format)

181 File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 165, in call

182 result = meth(request, *args, **kwargs)

183 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 296, in dispatch

184 return function(self, request, *args, **kwargs)

185 File "/usr/lib/python2.7/dist-packages/maasserver/api.py", line 585, in start

186 "You are not allowed to start up this node.")

187 PermissionDenied: You are not allowed to start up this node.

====================================================================================

It seems that there is problem with getting a file in api.py. So, I tried to add some logs like the following, but maasserver can not recognize 'logging' module.

import logging
...
logger = logging.getLogger('maas.maasserver')
logger.info(filename)

Could you let me know

  1. how to add logs in juju and maasserver python scripts ?
  2. how to debug maasserver and juju python script more easily ?

Thanks in advance,

1 Answer 1

1

It looks like your API key is invalid. You didn't say what versions of anything you're using, but go to your user page in MAAS and copy the API key into the juju environments.yaml again.

1
  • I forgot to say, ignore the "file not found", that's normal on first bootstrap.
    – bigjools
    Nov 26, 2012 at 3:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .