RoonBridge on Docker, aplay works, RAATServer's "raatmanager" not finding devices

Hi fellow Roonians, Roon developers,

I’m playing around with RoonBridge on Docker, on a RaspBerry PI3+; I’ver verified-working my setup with Ropieee and know that hardware + connection wise, my setup works. I’ve verified that from from within the Docker container, I can see the alsa device (a snd-usb-audio device in this case) and that I can send sound to it (tested using aplay) succesfully.

What I’ve noticed whilst comparing output from the RAATServer log, is that raatmanager within RAATServer does not find my sound device. See this log, specifically the lines containing [raatmanager] starting and [raatmanager] initialized:

11/28 10:49:01 Info: Starting RAATServer v1.7 (build 571) stable on linuxarmv8
11/28 10:49:01 Trace: [RAATServer] detected ALSA support
11/28 10:49:02 Info: [RAATServer] creating RAAT__manager
11/28 10:49:02 Info: [RAATServer]     appdata_dir  = /data/RAATServer
11/28 10:49:02 Info: [RAATServer]     unique_id    = 939624dd-27d3-4831-9851-b476875dc045
11/28 10:49:02 Info: [RAATServer]     machine_id   = e0a6e5a6-28be-2e96-34e2-e295a2db25fe
11/28 10:49:02 Info: [RAATServer]     machine_name = allo
11/28 10:49:02 Info: [RAATServer]     os_version   = Linux 5.4.72-0-rpi
11/28 10:49:02 Info: [RAATServer]     vendor       = 
11/28 10:49:02 Info: [RAATServer]     model        = 
11/28 10:49:02 Info: [RAATServer]     service_id   = d7634b85-8190-470f-aa51-6cb5538dc1b9
11/28 10:49:02 Info: [RAATServer]     is_dev       = False
11/28 10:49:02 Trace: [raatmanager] starting
11/28 10:49:02 Trace: [raatmanager] initialized
11/28 10:49:02 Info: [RAATServer] running RAAT__manager
11/28 10:49:02 Trace: [raatmanager] starting discovery
11/28 10:49:02 Trace: [discovery] starting
11/28 10:49:02 Info: [discovery] [iface:127.0.0.1] multicast recv socket is bound to 0.0.0.0:9003
11/28 10:49:02 Info: [discovery] [iface:127.0.0.1] multicast send socket is bound to 0.0.0.0:37171
11/28 10:49:02 Info: [discovery] [iface:192.168.1.102] multicast recv socket is bound to 0.0.0.0:9003
11/28 10:49:02 Info: [discovery] [iface:192.168.1.102] multicast send socket is bound to 0.0.0.0:57890
11/28 10:49:02 Info: [discovery] unicast socket is bound to 0.0.0.0:9003
11/28 10:49:02 Trace: [raatmanager] starting server
11/28 10:49:02 Info: [jsonserver] listening on port 44043
11/28 10:49:02 Trace: [raatmanager] announcing
11/28 10:49:02 Trace: [jsonserver] [192.168.1.101:51270] accepted connection
11/28 10:49:02 Debug: [discovery] broadcast op is complete
11/28 10:49:02 Trace: [jsonserver] [192.168.1.101:51270] GOT[LL] [1] {"request":"enumerate_devices","subscription_id":"0"}
11/28 10:49:02 Trace: [jsonserver] [192.168.1.101:51270] SENT [1] [nonfinal] {"status": "Success", "devices": []}
11/28 10:49:12 Trace: [RAATServer] refreshing @ 10s
11/28 10:49:12 Trace: [raatmanager] announcing
11/28 10:49:12 Debug: [discovery] broadcast op is complete

Notice that there are no lines there, indicating detected audio hardware. For example, on Ropieee, there are additional lines between the previously mentioned [raatmanager] lines indicating that a device is found. Take a look:

11/28 20:07:19 Trace: [raatmanager] starting
11/28 20:07:19 Trace: [raatmanager/linux] FOUND id=hw:CARD=Device,DEV=0 usb_id=1852:5034
11/28 20:07:19 Trace: [raatmanager/linux]       vendor=T+A elektroakustik             name=T+A USB Audio Device USB Audio
11/28 20:07:19 Trace: [raatmanager/linux] FOUND id=hw:CARD=Device,DEV=1 usb_id=1852:5034
11/28 20:07:19 Trace: [raatmanager/linux]       vendor=T+A elektroakustik             name=T+A USB Audio Device USB Audio #1
11/28 20:07:19 Trace: [raatmanager] [T+A USB Audio Device USB Audio] loaded config from /var/roon/RAATServer/Settings/device_b672c7fd90fde14805f717e68fd2a589.json
11/28 20:07:19 Trace: [raatmanager] initialized

My question is (maybe a RoonBridge dev could answer): how does raatmanager actually enumerate/find devices?

I noted that even though RoonBridge, RoonBridgeHelper and RAATServer come up without errors, when RAATServer’s raatmanager does not find any audio devices, my main Roon instance on my Mac Mini also does not actually find the RoonBridge; only when devices are detected by raatmanager does RoonBridge become “findable” by Roon itself.

Any insights much appreciated!

PS: I know that I could simply run Ropieee, however, I would really like to run RoonBridge on Docker.

2 Likes

It turns out that in my specific situation, I needed to add --user root to my docker start invocation; after having done so, RoonBridge’s RAATServer picks up the Alsa devices as expected and the RoonBridge shows up in Roon’s audio settings window.

For posterity: my Docker invocation is:

docker run --net host --name bridge --read-only --cap-drop ALL --group-add audio --device /dev/snd --user root roon-bridge