Open hardillb opened 3 years ago
cname.1 | Traceback (most recent call last): cname.1 | File "cname.py", line 93, in <module> cname.1 | main() cname.1 | File "cname.py", line 74, in main cname.1 | publisher = AvahiPublisher(30) cname.1 | File "/usr/local/lib/python3.8/site-packages/mpublisher/mpublisher.py", line 45, in __init__ cname.1 | self.bus = dbus.SystemBus(private=True) cname.1 | File "/usr/local/lib/python3.8/site-packages/dbus/_dbus.py", line 195, in __new__ cname.1 | return Bus.__new__(cls, Bus.TYPE_SYSTEM, mainloop=mainloop, cname.1 | File "/usr/local/lib/python3.8/site-packages/dbus/_dbus.py", line 102, in __new__ cname.1 | bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop) cname.1 | File "/usr/local/lib/python3.8/site-packages/dbus/bus.py", line 124, in __new__ cname.1 | bus = cls._new_for_bus(address_or_type, mainloop=mainloop) cname.1 | dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender="(null)" (inactive) interface="org.freedesktop.DBus" member="Hello" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus) cname.1 | Exception ignored in: <function AvahiPublisher.__del__ at 0x7fd4c5936310> cname.1 | Traceback (most recent call last): cname.1 | File "/usr/local/lib/python3.8/site-packages/mpublisher/mpublisher.py", line 62, in __del__ cname.1 | self.bus.close() cname.1 | AttributeError: 'AvahiPublisher' object has no attribute 'bus'
https://bugs.launchpad.net/apparmor/+bug/1751474
Need to look in /var/log/syslog and look at aa-genprog
/var/log/syslog
https://github.com/edgexfoundry-holding/device-bluetooth-c/issues/4 and https://github.com/edgexfoundry-holding/device-bluetooth-c/pull/15/files
Thanks @hardillb that last link gave me the clue I needed! Running privileged makes it work, albeit a not perfect solution!