maas-rackd permission denied on /var/lib/maas/dhcpd.sock

Bug #1577356 reported by Nicolas Thomas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Incomplete
Undecided
Unassigned

Bug Description

After upgrading from 1.9 to 2.0 (part of Trusty to Xenial)..

maas-rackd is permanently off with the following error

2016-05-02 11:19:39+0100 [-] Log opened.
2016-05-02 11:19:39+0100 [-] twistd 16.0.0 (/usr/bin/python3 3.5.1) starting up.
2016-05-02 11:19:39+0100 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2016-05-02 11:19:39+0100 [-] Site starting on 5248
2016-05-02 11:19:39+0100 [-] <class 'provisioningserver.pserv_services.lease_socket_service.LeaseSocketService'> starting on '/var/lib/maas/dhcpd.sock'
2016-05-02 11:19:39+0100 [-] Traceback (most recent call last):
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/internet/unix.py", line 402, in _bindSocket
2016-05-02 11:19:39+0100 [-] skt.bind(self.port)
2016-05-02 11:19:39+0100 [-] PermissionError: [Errno 13] Permission denied
2016-05-02 11:19:39+0100 [-]
2016-05-02 11:19:39+0100 [-] During handling of the above exception, another exception occurred:
2016-05-02 11:19:39+0100 [-]
2016-05-02 11:19:39+0100 [-] Traceback (most recent call last):
2016-05-02 11:19:39+0100 [-] File "/usr/bin/twistd3", line 18, in <module>
2016-05-02 11:19:39+0100 [-] run()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 29, in run
2016-05-02 11:19:39+0100 [-] app.run(runApp, ServerOptions)
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 617, in run
2016-05-02 11:19:39+0100 [-] runApp(config)
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
2016-05-02 11:19:39+0100 [-] _SomeApplicationRunner(config).run()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 352, in run
2016-05-02 11:19:39+0100 [-] self.postApplication()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 207, in postApplication
2016-05-02 11:19:39+0100 [-] self.startApplication(self.application)
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 403, in startApplication
2016-05-02 11:19:39+0100 [-] app.startApplication(application, not self.config['no_save'])
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 633, in startApplication
2016-05-02 11:19:39+0100 [-] service.IService(application).startService()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/service.py", line 283, in startService
2016-05-02 11:19:39+0100 [-] service.startService()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/service.py", line 283, in startService
2016-05-02 11:19:39+0100 [-] service.startService()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/provisioningserver/pserv_services/lease_socket_service.py", line 57, in startService
2016-05-02 11:19:39+0100 [-] self.port = self.reactor.listenUNIXDatagram(self.address, self)
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 414, in listenUNIXDatagram
2016-05-02 11:19:39+0100 [-] p.startListening()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/internet/udp.py", line 177, in startListening
2016-05-02 11:19:39+0100 [-] self._bindSocket()
2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/internet/unix.py", line 404, in _bindSocket
2016-05-02 11:19:39+0100 [-] raise error.CannotListenError(None, self.port, le)
2016-05-02 11:19:39+0100 [-] twisted.internet.error.CannotListenError: Couldn't listen on any:/var/lib/maas/dhcpd.sock: [Errno 13] Permission denied.
2016-05-02 11:19:39+0100 [-] Unhandled Error
        Traceback (most recent call last):
        --- <exception caught here> ---
          File "/usr/lib/python3/dist-packages/provisioningserver/rpc/clusterservice.py", line 758, in update
            info = yield self._fetch_rpc_info(info_url)
        builtins.GeneratorExit:

#apparent fix :

chown maas:maas /var/lib/maas

Tags: cpe-sa
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Thomas,

Did you capture what were the permissions of the directory in question after you upgraded and before you changed the permissions ?

I'm guessing that now it all is owned by maas:maas, but without the permissions before you chagned those we wont be able to debug. We've had other people upgrade and not come across this issue. Can you specify from which 1.9 did you upgrade from?

Thnaks1

Changed in maas:
status: New → Incomplete
milestone: none → 2.0.0
Revision history for this message
Nicolas Thomas (thomnico) wrote : Re: [Bug 1577356] Re: maas-rackd permission denied on /var/lib/maas/dhcpd.sock
Download full text (5.6 KiB)

Permissions were root:root.

As far as I can tell it was :
maas-region-controller-min:amd64 ( 1.9.1+bzr4543-0ubuntu2~trusty1)

Use case is the orangebox as you can imagine :)

On Mon, May 2, 2016 at 2:16 PM, Andres Rodriguez
<email address hidden> wrote:
> Hi Thomas,
>
> Did you capture what were the permissions of the directory in question
> after you upgraded and before you changed the permissions ?
>
> I'm guessing that now it all is owned by maas:maas, but without the
> permissions before you chagned those we wont be able to debug. We've had
> other people upgrade and not come across this issue. Can you specify
> from which 1.9 did you upgrade from?
>
> Thnaks1
>
> ** Changed in: maas
> Status: New => Incomplete
>
> ** Changed in: maas
> Milestone: None => 2.0.0
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1577356
>
> Title:
> maas-rackd permission denied on /var/lib/maas/dhcpd.sock
>
> Status in MAAS:
> Incomplete
>
> Bug description:
> After upgrading from 1.9 to 2.0 (part of Trusty to Xenial)..
>
> maas-rackd is permanently off with the following error
>
> 2016-05-02 11:19:39+0100 [-] Log opened.
> 2016-05-02 11:19:39+0100 [-] twistd 16.0.0 (/usr/bin/python3 3.5.1) starting up.
> 2016-05-02 11:19:39+0100 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
> 2016-05-02 11:19:39+0100 [-] Site starting on 5248
> 2016-05-02 11:19:39+0100 [-] <class 'provisioningserver.pserv_services.lease_socket_service.LeaseSocketService'> starting on '/var/lib/maas/dhcpd.sock'
> 2016-05-02 11:19:39+0100 [-] Traceback (most recent call last):
> 2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/internet/unix.py", line 402, in _bindSocket
> 2016-05-02 11:19:39+0100 [-] skt.bind(self.port)
> 2016-05-02 11:19:39+0100 [-] PermissionError: [Errno 13] Permission denied
> 2016-05-02 11:19:39+0100 [-]
> 2016-05-02 11:19:39+0100 [-] During handling of the above exception, another exception occurred:
> 2016-05-02 11:19:39+0100 [-]
> 2016-05-02 11:19:39+0100 [-] Traceback (most recent call last):
> 2016-05-02 11:19:39+0100 [-] File "/usr/bin/twistd3", line 18, in <module>
> 2016-05-02 11:19:39+0100 [-] run()
> 2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 29, in run
> 2016-05-02 11:19:39+0100 [-] app.run(runApp, ServerOptions)
> 2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 617, in run
> 2016-05-02 11:19:39+0100 [-] runApp(config)
> 2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/twistd.py", line 25, in runApp
> 2016-05-02 11:19:39+0100 [-] _SomeApplicationRunner(config).run()
> 2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 352, in run
> 2016-05-02 11:19:39+0100 [-] self.postApplication()
> 2016-05-02 11:19:39+0100 [-] File "/usr/lib/python3/dist-packages/twisted/scripts/_twistd_unix.py", line 207, in postApplication
> 2016-05-02 11:19:39+0100 [-] ...

Read more...

tags: added: cpe-sa
Revision history for this message
mahmoh (mahmoh) wrote :

Unsure if this is related but a clean install, " sudo apt-get install maas " from maas/stable on in a trusty LXC container:

MAAS Version 1.9.1+bzr4543-0ubuntu2 (trusty1)

2016-05-06 01:21:39+0000 [-] Unhandled Error
 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 218, in __call__
     d = defer.maybeDeferred(self.f, *self.a, **self.kw)
   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 139, in maybeDeferred
     result = f(*args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1237, in unwindGenerator
     return _inlineCallbacks(None, gen, Deferred())
   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
     result = g.send(result)
 --- <exception caught here> ---
   File "/usr/lib/python2.7/dist-packages/provisioningserver/rpc/clusterservice.py", line 758, in update
     info_url = self._get_rpc_info_url()
   File "/usr/lib/python2.7/dist-packages/provisioningserver/rpc/clusterservice.py", line 786, in _get_rpc_info_url
     with ClusterConfiguration.open() as config:
   File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
     return self.gen.next()
   File "/usr/lib/python2.7/dist-packages/provisioningserver/config.py", line 748, in open
     with cls.backend.open(filepath) as store:
   File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
     return self.gen.next()
   File "/usr/lib/python2.7/dist-packages/provisioningserver/config.py", line 601, in open
     touch(path)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/config.py", line 402, in touch
     os.close(os.open(path, os.O_CREAT | os.O_APPEND, mode))
 exceptions.OSError: [Errno 13] Permission denied: '/etc/maas/clusterd.conf'

ubuntu@maas19:/var/log/maas$ ls -al /etc/maas/clusterd.conf
-rw-r----- 1 root root 85 May 6 01:19 /etc/maas/clusterd.conf

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.