[mythtv-users] Backend connections fail - stumped
Craig Huff
huffcslists at gmail.com
Wed Nov 15 00:15:17 UTC 2023
On Mon, Nov 13, 2023 at 10:16 PM jam <jam at tigger.ws> wrote:
>
>
> > On 14 Nov 2023, at 11:44 am, Stephen Worthington <
> stephen_agent at jsw.gen.nz> wrote:
> >
> > 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?
>
> Steven gives you nice step-1’s
> How about step-0
> On backend machine is backend running ?
>
> $ ps -ef |grep myth
>
> How do you start the backend? eg for systemd
>
> $ systemctl status mythbackend
>
> What is the last thing logged? in normal backend logs.
>
> James
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
Thank you for your responses. It seems there's always something
important/useful that I fail to mention. This is the combined
frontend/backend server with mythbackend and mysql services and the
frontend I use for administering the recording scheduling. I have several
other computers that I use as frontend-only systems, however they're
off-line for various reasons -- even if the current problem hadn't cropped
up.
I have stopped/started/restarted the mythtv-backend service multiple times,
as well as rebooted the system with impunity, since it's not working as far
as I can tell. I tried stopping the backend, then starting it and promptly
started a mythwelcome instance to see what kind of messages I could find in
/var/log/mythtv/mythwelcome.log, mythbackend.log, and mythfrontend.log by
having multiple xterms open with "tail -f mythxxx" running for each log,
but nothing enlightening came of that, hence the shout out for help.
I tried the netstat command as advised by Stephen, and got no response at
all. It just came immediately back to the command prompt. Since the
system had been working for a long time (years), and I haven't done
anything on the system in quite some time besides review upcoming shows and
delete some old recordings, I have no idea why the backend isn't listening
on the port or what to do to fix it. I would appreciate any guidance on
what to do next. I don't recall any config file that affected the
mythbackend settings, but it's been a long time since I set it up. On the
off-chance that would involve /root/.mythtv/config.xml, here are the
contents (which are the same for the ~mythtv home-path and the general user
home-path):
<Configuration>
<Database>
<PingHost>1</PingHost>
<Host>192.168.1.149</Host>
<UserName>mythtv</UserName>
<Password>********</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
</Database>
<WakeOnLAN>
<Enabled>0</Enabled>
<SQLReconnectWaitTime>0</SQLReconnectWaitTime>
<SQLConnectRetry>5</SQLConnectRetry>
<Command>echo 'WOLsqlServerCommand not set'</Command>
</WakeOnLAN>
<UPnP>
<UDN>
<MediaRenderer>f9e82f4e-fb8c-433e-8bc7-258c8d74c95c</MediaRenderer>
</UDN>
</UPnP>
<LocalHostName>penguin</LocalHostName>
</Configuration>
Thanks again for any help you can provide.
--
Craig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20231114/4e61b293/attachment.htm>
More information about the mythtv-users
mailing list