DBus connection with INITSYSTEM ON

Question regarding the INITSYSTEM ON setting and DBus on a Raspberry Pi 3 device:

  • With INITSYSTEM OFF I can connect to DBus fine.
  • With INITSYSTEM ON I get the error below. To fix it, I have to turn INITSYSTEM off again and then powercycle the device.

Error: Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, t
he reply timeout expired, or the network connection was broken.

Have you exported the DBUS address? You can find an example of how to do this here

What command are you using to verify DBUS is working correctly?

Hi Joe - I’m using:

DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket dbus-send --system --print-reply --reply-timeout=2000 --type=method_call --dest=org.freedesktop.timedate1 /org/freedesktop/timedate1  org.freedesktop.DBus.Properties.GetAll string:"org.freedesktop.timedate1"

Which works fine with INITSYSTEM OFF…

What version of resinOS and supervisor are you running?
How are you setting INITSYSTEM on and off?

I’m on
Resin OS 2.0.3+rev1, supervisor version 4.2.2

I’ve tried setting INITSYSTEM both in the dockerfile and remotely via the resin dashboard and seen the same behaviour.

OK thanks, I will try to reproduce and get back to you.

Hi again,

I just tested this and it worked fine for me. I pushed our simple-server-python example, modifying the docker file slightly to install dbus.

I tested both ENV INITSYSTEM on and ENV INITSYSTEM off in the dockerfile and then both INITSYSTEM on and INITSYSTEM off in the dashboard.

I ran the command you posted from the dashboard terminal.

Could you try this and see if the problem persists?

OK I’ll give it a go and get back to you.