Skip to content

Avahi/mDNS broken in Scarab unless using --no-drop-root #69

Description

@NotHugo37

Knulli build version

scarab 2026/05/11 21:44

Your architecture

TRIMUI Smart Pro, TRIMUI Brick

Issue description

mDNS hostname resolution no longer works in Scarab.

The device is reachable normally via IP address (SSH/SFTP/Syncthing all work), but hostname.local does not resolve anymore.

This worked correctly in Gladiator II on the same hardware/network/client setup.

Detailed reproduction steps

  1. Install/use Scarab on TrimUI Smart Pro or TrimUI Brick
  2. Set a hostname (example: SmartPro)
  3. Connect the device to Wi-Fi
  4. Verify the hostname appears correctly in the router DHCP client list
  5. Attempt to access:

Using PuTTY:
ssh root@SmartPro.local
ssh root@SmartPro

Using WinSCP:
sftp://SmartPro.local
sftp://SmartPro

Syncthing web UI:
http://SmartPro.local:8384
http://SmartPro:8384

  1. Observe that hostname resolution fails, while direct IP access works normally

Additional findings:

  • avahi-daemon -D exits immediately
  • no avahi process remains running
  • multicast support is present on wlan0
  • D-Bus is running correctly

Running:

avahi-daemon --debug

Produces:

Found user 'avahi' (UID 100) and group 'avahi' (GID 101).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Successfully called chroot().
Successfully dropped remaining capabilities.
No service file found in /etc/avahi/services.
socket() failed: Permission denied
socket() failed: Permission denied
Failed to create server: No suitable network protocol available
avahi-daemon 0.8 exiting.

However, running:

avahi-daemon --no-drop-root --debug

works correctly and produces:

Joining mDNS multicast group on interface wlan0.IPv4 with address ...
Server startup complete. Host name is SmartPro.local.

After running with --no-drop-root:

  • hostname.local works correctly
  • SFTP hostname access works
  • Syncthing hostname access works

Details of any attempts to fix this yourself

Verified multicast support on wlan0 using:

ip link
ip maddr

Verified D-Bus is running:

ps aux | grep dbus

Tested manual Avahi startup
Confirmed issue only occurs after Avahi drops privileges

Details of any modifications you have made to Knulli.

No permanent modifications before testing, except changing the hostname from the default KNULLI to SmartPro or Brick.

Temporary workaround used:

Create a custom.sh file in /userdata/system/ with the following content:

#!/bin/sh

killall avahi-daemon 2>/dev/null
avahi-daemon --no-drop-root -D

Logs and data

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions