VPN won't connect to Roon Core

Trying to connect my Android device over VPN but won’t connect 100% of the time. Core runs on Linux. Connecting…

09/11 13:15:25 Info: [transport] destroyed zone Pixel 2 was playing? False
09/11 13:15:25 Trace: [zone Pixel 2] Suspend
09/11 13:15:25 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:15:25 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:39798] client connection failed. Retrying in 500ms
09/11 13:15:26 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:39798] connecting (attempt 2)
09/11 13:15:26 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:15:26 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:39798] client connection failed. Retrying in 750ms
09/11 13:15:27 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:39798] connecting (attempt 3)
09/11 13:15:27 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:15:27 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:39798] client connection failed. Retrying in 1125ms
09/11 13:15:28 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:42098] connecting (attempt 4)
09/11 13:15:28 Trace: [raatserver] [RaatServer Charles Snider's Pixel 2 @ 172.27.232.15:42098] connected
09/11 13:15:28 Trace: [rnet/RnetJsonClient] SENT {"request":"enumerate_devices","subscription_id":"0"}
09/11 13:15:28 Trace: [rnet/RnetJsonClient] GOT NONFINAL {"status": "Success", "devices": [{"auto_enable": true, "device_id": "default", "type": "android", "is_system_output": true, "name": "Default Output", "config": {"volume": {"type": "android", "device": "default"}, "external_config": {"is_private": true, "max_sample_rate_multiplier": 1, "max_bits_per_sample": 16}, "unique_id": "a2161a95-db97-6649-6ba8-b505cf2b5c40", "output": {"type": "android", "device": "default", "name": "Default Output", "max_bits_per_sample": 16}}, "auto_name": "Charles Snider's Pixel 2"}]}
09/11 13:15:28 Info: [raatserver] GOT DEVICE 9a5b604b434afb3001d34cce484dc7a4::default Type=android Name=Default Output 
09/11 13:15:28 Trace: [rnet/RnetJsonClient] SENT {"request":"enable_device","device_id":"default","subscription_id":"16"}
09/11 13:15:28 Trace: [rnet/RnetJsonClient] GOT NONFINAL {"status": "DeviceChanged", "device": {"auto_enable": true, "device_id": "default", "type": "android", "is_system_output": true, "name": "Default Output", "config": {"volume": {"type": "android", "device": "default"}, "external_config": {"is_private": true, "max_sample_rate_multiplier": 1, "max_bits_per_sample": 16}, "unique_id": "a2161a95-db97-6649-6ba8-b505cf2b5c40", "output": {"type": "android", "device": "default", "name": "Default Output", "max_bits_per_sample": 16}}, "discovery_data": {"vendor": "N/A", "tcp_port": 38163, "unique_id": "a2161a95-db97-6649-6ba8-b505cf2b5c40", "raat_version": "1.1.30", "version": "N/A", "protocol_version": "3", "model": "N/A"}, "auto_name": "Charles Snider's Pixel 2"}}
09/11 13:15:28 Info: [raatserver] [Default Output] connecting (attempt 1)
09/11 13:15:28 Trace: [Default Output] [raatclient] Initializing RAAT session
09/11 13:15:28 Trace: [Default Output] [raatclient] Loading script raat.dat:base.lua as module base [1088 chars]
09/11 13:15:28 Trace: [Default Output] [raatclient] Loading script raat.dat:dkjson.lua as module dkjson [22416 chars]
09/11 13:15:28 Trace: [Default Output] [raatclient] Loading script raat.dat:protocol.lua as module protocol [2045 chars]
09/11 13:15:28 Trace: [Default Output] [raatclient] Loading script raat.dat:roon_tcp.lua [42279 chars]
09/11 13:15:28 Trace: [rnet/RnetJsonClient] GOT NONFINAL {"status": "Success"}
09/11 13:15:28 Trace: [Default Output] [raatclient] RAAT Session initialized in 225ms
09/11 13:15:28 Trace: [Default Output] [raatclient] SENT [2]{"request":"info"}
09/11 13:15:28 Trace: [Default Output] [raatclient] SENT [3]{"request":"set_client_type","client_type":"Roon"}
09/11 13:15:28 Trace: [Default Output] [raatclient] GOT [2] {"flags":{"has_write_chmap":true},"platform":{"os":"android","uname":{"machine":"armv8l","version":"#1 SMP PREEMPT Thu Aug 2 01:00:42 UTC 2018","release":"4.4.116-g6d15b70","nodename":"localhost","sysname":"Linux"}},"volume":{"is_supported":true,"info":{}},"status":"Success","output":{"info":{},"supported_formats":"44100/16/1|2,88200/16/1|2,48000/16/1|2,0/0/0|0|0|0|0|0|0|0,96000/16/1|2"},"transport":{"is_supported":false,"info":[]},"info":{"unique_id":"a2161a95-db97-6649-6ba8-b505cf2b5c40"},"source_selection":{"is_supported":false,"info":[]}}
09/11 13:15:28 Trace: [raatserver] [Default Output] connected
09/11 13:15:28 Info: [transport] creating endpoint for raat device a2161a95-db97-6649-6ba8-b505cf2b5c40
09/11 13:15:28 Trace: [Default Output] [raatclient] SENT [4]{"request":"subscribe_transport"}
09/11 13:15:28 Trace: [Default Output] [raatclient] SENT [5]{"request":"subscribe_controls","controller_id":"81698cfc-aae6-4bd1-9a3a-bce9b856024a"}
09/11 13:15:28 Trace: [dspengine] created new dsp config {"version":3,"items":[{"type":"bs2b","enabled":false},{"type":"parametric_equalizer","enabled":false},{"type":"audeze_presets","enabled":false}]}
09/11 13:15:28 Trace: [transport/audeze] picking preset lowlatency 
09/11 13:15:28 Trace: [transport/audeze] picked null preset!
09/11 13:15:28 Trace: [zone Pixel 2] Loading
09/11 13:15:28 Trace: [zone Pixel 2] Suspend
09/11 13:15:28 Trace: [Pixel 2] [zoneplayer/raat] Endpoint Default Output Initial State: Idle
09/11 13:15:28 Info: [transport] created zone Pixel 2
09/11 13:15:28 Info: [transport]     with endpoint Default Output (23:1:a2161a95-db97-6649-6ba8-b505cf2b5c40) [IsAvailable=True]
09/11 13:15:28 Trace: [Pixel 2] [Inactive] [STOPPED @ 0:00] 
09/11 13:15:28 Trace: [zone Pixel 2] Loaded Queue=13 Tracks Swim=Inactive AutoSwim=True Loop=Disabled Shuffle=False
09/11 13:15:28 Trace: [Pixel 2] [Inactive] [PAUSED @ 0:08/16:17] Salisbury - Uriah Heep
09/11 13:15:28 Trace: [Default Output] [raatclient] GOT [3] {"status":"Success"}
09/11 13:15:28 Trace: [Default Output] [raatclient] GOT [5] {"controls":{"volume":{"type":"number","step":1.0,"info":{},"max":100.0,"value":100,"min":0.0,"mute":false}},"action":"Changed","status":"Success"}
09/11 13:15:35 Info: [stats] 1336mb Virtual, 206mb Physical, 59mb Managed, 0 Handles, 64 Threads
09/11 13:15:35 Trace: Successful POST response from https://push.roonlabs.com/push/1/connect
09/11 13:15:35 Trace: [push] connecting to 104.248.55.243:9200
09/11 13:15:35 Trace: [push] connected
09/11 13:15:50 Info: [stats] 1336mb Virtual, 206mb Physical, 59mb Managed, 0 Handles, 64 Threads
09/11 13:16:05 Info: [stats] 1336mb Virtual, 206mb Physical, 60mb Managed, 0 Handles, 61 Threads
09/11 13:16:20 Info: [stats] 1336mb Virtual, 206mb Physical, 61mb Managed, 0 Handles, 61 Threads
09/11 13:16:35 Info: [stats] 1336mb Virtual, 206mb Physical, 62mb Managed, 0 Handles, 60 Threads
09/11 13:16:50 Info: [stats] 1336mb Virtual, 206mb Physical, 63mb Managed, 0 Handles, 60 Threads
09/11 13:17:05 Info: [stats] 1336mb Virtual, 206mb Physical, 64mb Managed, 0 Handles, 60 Threads
09/11 13:17:20 Info: [stats] 1336mb Virtual, 206mb Physical, 65mb Managed, 0 Handles, 60 Threads
09/11 13:17:35 Info: [stats] 1336mb Virtual, 206mb Physical, 65mb Managed, 0 Handles, 60 Threads
09/11 13:17:38 Trace: [rnet/RnetJsonClient] no data received for >10000ms. Killing connection.
09/11 13:17:38 Trace: [push] restarting connection (Unable to read data from the transport connection: interrupted.)
09/11 13:17:38 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] lost client connection. Retrying
09/11 13:17:38 Trace: [raatserver] [RaatServer Pixel 2 @ 172.27.232.15:42098] connecting (attempt 1)
09/11 13:17:38 Trace: [push] retrying connection in 55566ms
09/11 13:17:38 Info: [transport] destroyed zone Pixel 2 was playing? False
09/11 13:17:38 Trace: [zone Pixel 2] Suspend
09/11 13:17:41 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:17:41 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] client connection failed. Retrying in 500ms
09/11 13:17:42 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] connecting (attempt 2)
09/11 13:17:43 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:17:43 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] client connection failed. Retrying in 750ms
09/11 13:17:44 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] connecting (attempt 3)
09/11 13:17:45 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:17:45 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] client connection failed. Retrying in 1125ms
09/11 13:17:46 Trace: [raatserver] [RaatServer Pixel 2 @ 172.27.232.15:42098] connecting (attempt 4)
09/11 13:17:46 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:17:46 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] client connection failed. Retrying in 1687ms
09/11 13:17:48 Trace: [raatserver] [RaatServer Pixel 2 @ 172.27.232.15:42098] connecting (attempt 5)
09/11 13:17:48 Warn: [rnet/RnetJsonClient] failed to connect Connection refused
09/11 13:17:48 Trace: [raatserver] [RaatServer  Pixel 2 @ 172.27.232.15:42098] client connection failed. Giving up
09/11 13:17:48 Trace: [raat] [sood] Refreshing device list

many have been here before you … search VPN here

Nothing but banter. And “support” moves this to “tinkering”.

Its not supported…so you are on your own - some have it working and others give up. Thats why its in tinkering :smiley:

Two tings:
Look at multicast and find a VPN solution that handles multicast 100% correctly
Make sure VPN clients are terminated in the same LAN as your local Roon core

disclaimer: I do not use remote streaming myself, but from a networking perspective this is probably the most important.

1 Like

In very simple terms, I run both Logitech Media Server and MiniDLNA on the same linux box and through the same VPN and have no problem connecting to them. From what I can tell, Roon has a funky way at looking for the Core’s local IP address.

Again, I’m sure I can put the work in to figure it out, but as much as I enjoy Roon, this is something that a well-funded robust music server should have already supported.

I fully agree with you.
I think it is Roon’s use of multicast that creates trouble here. To my knowledge LMS and DLNA in general do not use multicast and will work over VPN.
If Roon start using standard TCP/UDP for discovery - or a fallback to TCP/UDP when multicast fails - a lot of problems would disappear.

1 Like

AFAIK Roon uses SSDP - these days that is about as standard as it gets. I know Logitech use more basic broadcast UDP on some of their devices, but that doesn’t fair any better when it comes to transitioning subnet boundaries without some help.

It is more like IGMP. SSDP contains UPnP discovery too, but without UPnP devices on the LAN only the IGMP part seems to be used.

SSDP is the discovery part of UPnP.
IGMP is used to manage/query multi-cast group membership.

SSDP search messages are directed at a multi-cast group (239.255.255.250), so to be discovered you need to join the multicast group (a local socket option) and respond to SSDP search request messages.