Remote terminal not working

Hi,
Currently using Yocto and Mender with kirkstone branch.
I’ve installed mender-connect successfully, however, mender-client doesn’t have DBus enabled by default. DBus API is not available either on the /usr/share/dbus-1/ folder. Authentication and UpdateManager confs are not available on my rootfs.

I’ve tried to enable manually on the mender.conf and included the confs myself. The mender-client fails to start with the following message:
“DBus API support not available, but DBus is enabled: no D-Bus interface available”

Not sure how to enable dbus on the mender-client recipe.
What am I missing?

Best regards,
Nuno

Hi @nrmmota,

Thanks for getting in touch. Thats strange because given the meta-mender-core and possibly meta-mender-demo layers in the build it should work out of the box. Which board are you using, respectively how does your local.conf look like?

Greetz,
Josef

Hi,
Thank you for your feedback.
I’ve picked up some things from demo, but I’m not including it.

This is mymachine conf

# We are reusing genericx86-64
MACHINEOVERRIDES =. "genericx86-64:"
require conf/machine/genericx86-64.conf

# But we need to force sse3 compatibility
DEFAULTTUNE="core2-64"

# We need to force systemd and not sysvinit (it fails on sysvinit for the core2 stuff)
DISTRO_FEATURES:append = " systemd"
SERIAL_CONSOLES_CHECK_forcevariable = ""
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

mydistro.conf

DISTROOVERRIDES =. "poky:"
require conf/distro/poky.conf

DISTRO_NAME="GSGateway"
DISTRO_VERSION="1.2"
DISTRO_FEATURES:append = " security pam"

MENDER_DEVICE_TYPE="gsgatewaycore2"
MENDER_DEMO_HOST_IP_ADDRESS="10.0.0.108"

# One of the mandatory features
IMAGE_FEATURES += "read-only-rootfs"

MENDER_FEATURES_ENABLE:append = "mender-grub mender-bios mender-image mender-image-sd"
#MENDER_FEATURES_DISABLE:append = "mender-image-uefi"
#INHERIT += "mender-full-bios"
MENDER_ARTIFACT_NAME ?= "GS_Gateway_2.1"
MENDER_STORAGE_DEVICE = "/dev/sda"
#MENDER_STORAGE_TOTAL_SIZE_MB = "14352"
#MENDER_DATA_PART_SIZE_MB = "10240"
MENDER_STORAGE_TOTAL_SIZE_MB = "4352"
MENDER_DATA_PART_SIZE_MB = "240"
ARTIFACTIMG_FSTYPE = "ext4"

# wic fails to build with readonly rootfs
IMAGE_FSTYPES:remove = "wic wic.bmap"
#IMAGE_FSTYPES += "wic.vmdk"

# Extra packages that we need
IMAGE_INSTALL:append = " \
                    openssh \
                    openssh-sftp \
                    openssh-sftp-server \
                    lsof \
                    datafs-overlay \
                    rootfs-overlay \
                    vim \
                    kernel-module-bonding \
                    tcpdump \
                    mtr \
                    autossh \
                    dbus \
                    mender-client \
                    mender-server-certificate \
                    mender-connect \
"
# Some of those packages have commercial licenses
LICENSE_FLAGS_ACCEPTED="commercial"

# Generic stuff for QEMU (although runqemu qemux86-64 still doesn't load mount points properly)
QB_SYSTEM_NAME = "qemu-system-x86_64"
EXTRA_IMAGEDEPENDS += "qemu-system-native qemu-helper-native"

# Download path...
DL_DIR = "/opt/storage/yoctodownloads"

Local.conf is default plus:

DISTRO="mydistro"
MACHINE="mymachine"

All the layers

layer                 path                                      priority
==========================================================================
meta                  /opt/storage/nrmstuff/yocto/poky/meta  5
meta-poky             /opt/storage/nrmstuff/yocto/poky/meta-poky  5
meta-yocto-bsp        /opt/storage/nrmstuff/yocto/poky/meta-yocto-bsp  5
meta-mender-core      /opt/storage/nrmstuff/yocto/poky/meta-mender/meta-mender-core  6
meta-oe               /opt/storage/nrmstuff/yocto/poky/meta-openembedded/meta-oe  5
meta-python           /opt/storage/nrmstuff/yocto/poky/meta-openembedded/meta-python  5
meta-multimedia       /opt/storage/nrmstuff/yocto/poky/meta-openembedded/meta-multimedia  5
meta-mymeta           /opt/storage/nrmstuff/yocto/poky/meta-mymeta  6
meta-webserver        /opt/storage/nrmstuff/yocto/poky/meta-openembedded/meta-webserver  5
meta-networking       /opt/storage/nrmstuff/yocto/poky/meta-openembedded/meta-networking  5
meta-perl             /opt/storage/nrmstuff/yocto/poky/meta-openembedded/meta-perl  5

I’ve managed to understand what was missing.

Adding mender-client to the IMAGE_INSTALL doesn’t trigger the dbus part.
The dbus part is triggered when mender-client-install is added to the MENDER_FEATURES_ENABLE:append

The recipe source is here.
_MENDER_PACKAGECONFIG_DEFAULT = “${@mender_feature_is_enabled(“mender-client-install”, “dbus modules inventory-network-scripts”, “”, d)}”

Hope this helps others that eventually stumble upon this issue.

1 Like

Thanks a lot for sharing! @nrmmota