[mythtv-users] Backend connections fail - stumped
Stephen Worthington
stephen_agent at jsw.gen.nz
Tue Nov 14 03:44:06 UTC 2023
On Mon, 13 Nov 2023 16:01:17 -0600, you wrote:
>My long running backend daemon has recently stopped accepting connections
>on port 6543. Even simply invoking "mythbackend --printsched" gets the
>cold shoulder. I've tried invoking the daemon with "-v all" and
>"--loglevel debug", but either I'm looking in the wrong log(s) or nothing
>is logged during these connection attempts.
>
>In short, the backend logs don't show anything at all when mythbackend,
>mythwelcome, and/or mythfrontend try to connect and the connecting
>applications' logs simply report that the connection, both by lan IP
>(192.168.x.x:6543) and local IP (127.0.0.1:6543) fail with messages like:
>
>2023-11-13 14:21:17.436230 I MythCoreContext: Connecting to backend
>server: 192.168.x.x:6543 (try 1 of 5)
>2023-11-13 14:21:17.436780 E MythSocket(abde80:-1): Failed to connect to (
>127.0.0.1:6543) Connection refused
>2023-11-13 14:22:17.523316 I MythCoreContext: Connecting to backend
>server: 192.168.x.x:6543 (try 2 of 5)
>2023-11-13 14:22:17.523815 E MythSocket(abde80:-1): Failed to connect to (
>127.0.0.1:6543) Connection refused
>I would greatly appreciate any help in figuring this out.
I presume that this is a frontend trying to connect to a separate
backend box.
The localhost connection attempt will always fail because there is no
mythbackend running on the frontend box.
The mythbackend log not showing any connection attempts suggests that
the traffic from the frontend box is not getting to mythbackend at
all. The frontend logs saying "Connection refused" suggests that port
6543 on the backend box is closed, but that the backend box is sending
a NAK packet when it receives a SYN packet to start a TCP connection
on that port - it is saying that the port is closed, rather than just
ignoring the SYN packet.
Does the backend box have a screen? Does mythfrontend work there? Is
port 6543 open on the backend box's IP address? Try running this on
the backend box:
sudo netstat -anp | grep 6543
Do you see a LISTEN line with 0.0.0.0, ::, or the specific IP address
of the box? If not, then you need to fix the mythbackend settings so
that it is listening for external connections.
From the frontend box, try manually connecting to the backend:
telnet <backend IP> 6543
This is the sort of thing you should see if it does connect:
root at crw-pvr:~# telnet mypvr.4.jsw.gen.nz 6543
Trying 10.0.2.4...
Connected to mypvr.4.jsw.gen.nz.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
If it does not connect, but there is a LISTEN port open in the netstat
output, then there is likely a firewall on the backend machine (or
possibly the frontend machine) that is stopping the traffic, or there
is a routing problem in your network. Are you able to ping the
backend box from the frontend box?
More information about the mythtv-users
mailing list