Can't Stream or Record from HDHomeRun Tuner in Docker Container

Hi everyone,

I recently purchased an HDHomeRun Flex Duo. I deployed a Docker container and I was able to add the HDHR as a source no problem.

However, when I attempt to record (or just watch a live stream), I am unable to do so and get the following errors:

[ERR] Failed to start stream on channel 26.2 via : HDHomeRun: Could not tune to http://10.32.5.11:5004/auto/v26.2 after 30s
[DVR] Error running job 1633050000-ch26.2 Jericho of Scotland Yard: could not start stream on channels=[26.2]: HDHomeRun: Could not tune to http://10.32.5.11:5004/auto/v26.2 after 30s

Troubleshooting Attempts

The thing is though is that Channels DVR is successfully controlling the tuner. I see that tuner set to that channel and that URL does in fact display the video stream if I run it locally in VLC media player.

Additionally, I'm able to ping the HDHR from inside the Channel DVR container console and even traceroute it.

If I check the HDHR logs I see the connection being established back to the Docker host:

20211001-02:09:06 Tuner: tuner0 tuning 26.2
20211001-02:09:06 Tuner: tuner0 streaming http to 10.0.40.3:38106
20211001-02:09:36 Tuner: tuner0 http stream ended (remote closed)
20211001-02:09:37 Tuner: tuner0 tuning 26.2
20211001-02:09:37 Tuner: tuner0 streaming http to 10.0.40.3:38108

On top of that, if I check the router logs/states, I see an established tcp connection between the Docker host and the HDHR.

From the above HDHR log and the Channel DVR log, it appears that Channel DVR is the one initiating closing the connection.

Questions

  1. If I run the container network in host mode as opposed to my preferred bridge mode, everything works. This is not my ideal solution, however, since this Docker container is running on a core server and I don't want to give it that kind of access. Any idea why it would work when running in host mode and not bridge mode? I don't see why it should matter since it does appear we are establishing a connection even in bridge mode.

  2. Is there any way to get this working in bridge mode?

Thanks in advance!

I imagine you may need to tweak the routing tables.

Instead of host or bridge mode, why not a macvlan. That way you get the benefits of host networking, with the ability isolate the container's traffic.

1 Like

Yeah, it's driving me crazy on more of a fundamental/theoretical knowledge level.

I don't think it's the routing tables, though I checked those too, because if it were, I would expect that the Docker container wouldn't be able to receive a response to either pings, nor would the HDHR log and firewall rules show an established connection.

Heck, the logs from HDHR show that the Docker container is opening up ports on the Docker host server:

Tuner: tuner0 streaming http to 10.0.40.3:38106

It's a TCP connection. It's inherently a bidirectional connection. It's bizarre. Could Channels DVR be opening up additional listening ports that aren't being forwarded to the host? But that doesn't make sense either since the Channels DVR is the client (requestor) not the server that HDHR is...

I'm afraid I can't be of more help. Personally, I use Podman. I have a pod setup with a unique and static MAC address, using a macvlan network. Then I have all of my media-related containers added to that pod, so from the outside it looks like all of my media servers (Channels, Plex, Calibre, etc.) are running on the same distinct computer on my network. Other than having to setup an mDNS relay on my router (because of VLANs), I haven't experienced any issues networking-wise.

1 Like

The packets sent by the HDHR have a TTL=3 and might not be making it across all the hops required? It looks like you have a couple subnets involved?

2 Likes

Oh interesting...that's something to explore. It would be quite a few hops...the HDHR is on an isolated VLAN (I don't trust HDHR's security). traceroute from inside the container shows four hops and that would put us at three hops when run directly from the host...I like it!

I'll bring the container one hop closer, see where we're at, and get back to you!

1 Like