Resolved: mythbackend not working: failed listening on 127.0.0.1

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
Coolmike99
Newcomer
Posts: 7
Joined: Sun May 20, 2018 5:56 pm
Canada

Resolved: mythbackend not working: failed listening on 127.0.0.1

Post by Coolmike99 »

Hi,

I've been using myth for quite some time, but I run into snags any time I upgrade the OS or allow any changes. I'm afraid I'm just making things worse.

Here is my config.xml file that I think it's using:

Code: Select all

<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>localhost</Host>
    <UserName>mythtv</UserName>
    <Password>stoneman5</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>1</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
  <UPnP>
    <UDN>
      <MediaRenderer>d7482031-4c7e-4ad9-a452-f583211a21b7</MediaRenderer>
    </UDN>
  </UPnP>
</Configuration>
I have tested the mysql connection and I can connect to it with the above configuration. Upon running mythbackend I get errors along the lines of 'failed listening on TCP 127.0.0.1:6544 error 8 the bound address is already in use.

Please help - I'll try to answer any questions posed.
Thanks
Last edited by Coolmike99 on Tue May 22, 2018 4:04 am, edited 1 time in total.
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythbackend not working: failed listening on 127.0.0.1

Post by bill6502 »

The "bound address..." message says that there is already an instance of the
backend running, no need to start it again.

Be sure to mention your OS and version if additional help is needed.

No need to guess which config.xml is in use. just look at the backend log for a line
similar to: Using configuration directory = /home/mythtv/.mythtv. The file lives under
that directory. See: https://www.mythtv.org/wiki/Config.xml#Troubleshooting
Coolmike99
Newcomer
Posts: 7
Joined: Sun May 20, 2018 5:56 pm
Canada

Re: mythbackend not working: failed listening on 127.0.0.1

Post by Coolmike99 »

If you please - where can I find this backend log - I don't see it.

It tells me it cannot connect to the backend, so it doesn't seem as if it's running. OS is now Ubuntu 18.04.

Thanks
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythbackend not working: failed listening on 127.0.0.1

Post by bill6502 »

The log lives in /var/log/mythtv (usually.) If it's not there, see what: ls -ld /var/log/mythtv
says. The backend (run as user mythtv) need write permission on the directory.)
You can also use: journalctl. man journalctl will explain its options.

To see if the backend is running, the command is: systemctl status mythtv-backend
sudo systemctl stop (and start) mythtv-backend do the obvious.
Coolmike99
Newcomer
Posts: 7
Joined: Sun May 20, 2018 5:56 pm
Canada

Re: mythbackend not working: failed listening on 127.0.0.1

Post by Coolmike99 »

Thanks for the help thus far. If I stop it and try to restart, it tells me: Failed listening on TCP 127.0.0.1:3306 - Error 8 The bound address is already in use. What should I try now please?
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythbackend not working: failed listening on 127.0.0.1

Post by bill6502 »

3306 is the port used by mysql, not MythTV. Check the output of the status command above your
last post. When commands fail, it's good to include the command line too.

You didn't start the backend directly with: mythbackend ... rather than with systemctl did you?
If that's the case, ps ax|grep mythbackend will show if it's running and you have to kill it (pkill mythbackend.)
Coolmike99
Newcomer
Posts: 7
Joined: Sun May 20, 2018 5:56 pm
Canada

Re: mythbackend not working: failed listening on 127.0.0.1

Post by Coolmike99 »

I had killed the backend with sudo systemctl stop mythtv-backend. I then attempted to restart by mythbackend. I got the aforementioned response. Do I have a port setting wrong? Where would I change that?
Coolmike99
Newcomer
Posts: 7
Joined: Sun May 20, 2018 5:56 pm
Canada

Re: mythbackend not working: failed listening on 127.0.0.1

Post by Coolmike99 »

I think I got it! Thanks for the guidance!
User avatar
bill6502
Developer
Posts: 2323
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythbackend not working: failed listening on 127.0.0.1

Post by bill6502 »

Good to hear. When you've finished testing (and it's working), please edit your the 1st post in this thread
and prepend [Solved] to the Subject. Thanks.
Post Reply