Failing to connect to DBus

Trying to get mender running on an ARMv7 (v7l).
Cross compiled mender (as well as mender-connect) and it’s working.
However, I cannot get it to connect to DBus. Had to cross compile dbus as well (not available on my box) but dbus seems to be working - e.g., I am able to dbus-send messages to org.desktop.DBus (using the dbus CLI). Mender, however, outputs this error message on startup:

(process:1711): GLib-GIO-CRITICAL **: 16:47:20.917: g_dbus_connection_emit_signal: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

Any idea?

When you use dbus-send, are you using the --system argument? Mender needs to connect to the system bus, which is distinct from the (default) session bus. This stackoverflow post gives a decent description of the two.

Thanks. I am using --system.

I’ve figured this one out :slight_smile:
Looks like mender wasn’t able to find the dbus daemon even though I was using --system.
I guess it’s related to the fact that I had to build dbus that does NOT use the stand system folders but only folders under /usr/local and not the standard folders (since, on my target system, the default system folders are all read-only). Anyway, when I set DBUS_SYSTEM_BUS_ADDRESS to the correct address (as printed by dbus-daemon when using the --print-address option) it works. Both mender and mender-connect are now able to connect to dbus and remote terminal works.

Great that you figured it out!