<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 13, 2023 at 10:16 PM jam <<a href="mailto:jam@tigger.ws">jam@tigger.ws</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On 14 Nov 2023, at 11:44 am, Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz" target="_blank">stephen_agent@jsw.gen.nz</a>> wrote:<br>
> <br>
> On Mon, 13 Nov 2023 16:01:17 -0600, you wrote:<br>
> <br>
>> My long running backend daemon has recently stopped accepting connections<br>
>> on port 6543.  Even simply invoking "mythbackend --printsched" gets the<br>
>> cold shoulder.  I've tried invoking the daemon with "-v all" and<br>
>> "--loglevel debug", but either I'm looking in the wrong log(s) or nothing<br>
>> is logged during these connection attempts.<br>
>> <br>
>> In short, the backend logs don't show anything at all when mythbackend,<br>
>> mythwelcome, and/or mythfrontend try to connect and the connecting<br>
>> applications' logs simply report that the connection, both by lan IP<br>
>> (192.168.x.x:6543) and local IP (<a href="http://127.0.0.1:6543" rel="noreferrer" target="_blank">127.0.0.1:6543</a>) fail with messages like:<br>
>> <br>
>> 2023-11-13 14:21:17.436230 I  MythCoreContext: Connecting to backend<br>
>> server: 192.168.x.x:6543 (try 1 of 5)<br>
>> 2023-11-13 14:21:17.436780 E  MythSocket(abde80:-1): Failed to connect to (<br>
>> <a href="http://127.0.0.1:6543" rel="noreferrer" target="_blank">127.0.0.1:6543</a>) Connection refused<br>
>> 2023-11-13 14:22:17.523316 I  MythCoreContext: Connecting to backend<br>
>> server: 192.168.x.x:6543 (try 2 of 5)<br>
>> 2023-11-13 14:22:17.523815 E  MythSocket(abde80:-1): Failed to connect to (<br>
>> <a href="http://127.0.0.1:6543" rel="noreferrer" target="_blank">127.0.0.1:6543</a>) Connection refused<br>
> <br>
>> I would greatly appreciate any help in figuring this out.<br>
> <br>
> I presume that this is a frontend trying to connect to a separate<br>
> backend box.<br>
> <br>
> The localhost connection attempt will always fail because there is no<br>
> mythbackend running on the frontend box.<br>
> <br>
> The mythbackend log not showing any connection attempts suggests that<br>
> the traffic from the frontend box is not getting to mythbackend at<br>
> all.  The frontend logs saying "Connection refused" suggests that port<br>
> 6543 on the backend box is closed, but that the backend box is sending<br>
> a NAK packet when it receives a SYN packet to start a TCP connection<br>
> on that port - it is saying that the port is closed, rather than just<br>
> ignoring the SYN packet.<br>
> <br>
> Does the backend box have a screen?  Does mythfrontend work there?  Is<br>
> port 6543 open on the backend box's IP address?  Try running this on<br>
> the backend box:<br>
> <br>
> sudo netstat -anp | grep 6543<br>
> <br>
> Do you see a LISTEN line with 0.0.0.0, ::, or the specific IP address<br>
> of the box?  If not, then you need to fix the mythbackend settings so<br>
> that it is listening for external connections.<br>
> <br>
> From the frontend box, try manually connecting to the backend:<br>
> <br>
> telnet <backend IP> 6543<br>
> <br>
> This is the sort of thing you should see if it does connect:<br>
> <br>
> root@crw-pvr:~# telnet <a href="http://mypvr.4.jsw.gen.nz" rel="noreferrer" target="_blank">mypvr.4.jsw.gen.nz</a> 6543<br>
> Trying 10.0.2.4...<br>
> Connected to <a href="http://mypvr.4.jsw.gen.nz" rel="noreferrer" target="_blank">mypvr.4.jsw.gen.nz</a>.<br>
> Escape character is '^]'.<br>
> ^]<br>
> telnet> quit<br>
> Connection closed.<br>
> <br>
> If it does not connect, but there is a LISTEN port open in the netstat<br>
> output, then there is likely a firewall on the backend machine (or<br>
> possibly the frontend machine) that is stopping the traffic, or there<br>
> is a routing problem in your network.  Are you able to ping the<br>
> backend box from the frontend box?<br>
<br>
Steven gives you nice step-1’s<br>
How about step-0<br>
On backend machine is backend running ?<br>
<br>
$ ps -ef |grep myth<br>
<br>
How do you start the backend? eg for systemd<br>
<br>
$ systemctl status mythbackend<br>
<br>
What is the last thing logged? in normal backend logs.<br>
<br>
James<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a></blockquote><div><br></div><div>
<div>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.</div><div><br></div><div>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.<br></div><div><br></div><div>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):</div><div><br></div><div><Configuration><br>  <Database><br>    <PingHost>1</PingHost><br>    <Host>192.168.1.149</Host><br>    <UserName>mythtv</UserName><br>    <Password>********</Password><br>    <DatabaseName>mythconverg</DatabaseName><br>    <Port>3306</Port><br>  </Database><br>  <WakeOnLAN><br>    <Enabled>0</Enabled><br>    <SQLReconnectWaitTime>0</SQLReconnectWaitTime><br>    <SQLConnectRetry>5</SQLConnectRetry><br>    <Command>echo 'WOLsqlServerCommand not set'</Command><br>  </WakeOnLAN><br>  <UPnP><br>    <UDN><br>      <MediaRenderer>f9e82f4e-fb8c-433e-8bc7-258c8d74c95c</MediaRenderer><br>    </UDN><br>  </UPnP><br>  <LocalHostName>penguin</LocalHostName><br></Configuration></div>  </div><div>Thanks again for any help you can provide.</div><div><br></div><div>--</div><div>Craig.<br></div></div></div>