Troubleshooting:Mythbackend will not start after upgrade

From MythTV Official Wiki
Jump to: navigation, search

"No UPnP backends found" on Master Backend Server

[Note: this was found specifically in the 0.22 development path, but should apply to other versions prior to 0.26 (which no longer user mysql.txt.) More specifically, this problem was found when manually installing a 0.22 development build over a pre-existing 0.21 release build that was installed by a package manager (Mandriva's rpmdrake)]

The Symptom

After upgrading to a new version, all mythtv programs, including mythbackend, continually prompt to "configure the database connection." Even after configuration, the problem does not go away.

Here is an example session on a machine called "bottom_dweller":

   bottom_dweller% sudo mythbackend
   2008-05-14 13:59:56.918 Using runtime prefix = /usr, libdir = /usr/lib
   2008-05-14 13:59:56.920 Empty LocalHostName.
   2008-05-14 13:59:56.920 Using localhost value of bottom_dweller
   2008-05-14 13:59:57.767 Cannot find default UPnP backend
   ................................................................................
   2008-05-14 13:59:59.893 UPnPautoconf() - No UPnP backends found
   2008-05-14 13:59:59.893 No UPnP backends found
   No UPnP backends found
   Would you like to configure the database connection now? [yes]  
   Database host name: [bottom_dweller]  
   Should I test connectivity to this host using the ping command? [yes]  
   Database non-default port: [6543]  
   Database name: [mythconverg]  
   Database user name: [mythtv]  
   Database password: [mythtv]  
   Unique identifier for this machine (if empty, the local host name will be used):  
   Would you like to use Wake-On-LAN to retry database connections? [no]  
   2008-05-14 14:00:28.335 Cannot connect to port 6543 on database host bottom_dweller
   2008-05-14 14:00:28.335 Cannot connect to port 6543 on database host bottom_dweller
   Cannot connect to port 6543 on database host bottom_dweller
   Would you like to configure the database connection now? [yes]  no
   2008-05-14 14:00:36.003 Deleting UPnP client...
   2008-05-14 14:00:36.348 Failed to init MythContext, exiting.


The Solution

MythTV keeps the database connection information in a file called "mysql.txt". If there is more then one copy of this file, things will get very interesting. The solution is to locate all copies of the file, delete them, and then run myth-tv setup again.

   find / -name mysql.txt --exec rm '{}' \;

Alternatively, you can get more specific and only remove the ones you don't want. The locations I have heard for this file are:

   * ~/.mythtv/mysql.txt
   * /var/lib/mythtv/.mythtv/mysql.txt
   * /etc/mythtv/mysql.txt
   * /etc/.mythtv/mysql.txt

The location seems to be dependent in part on both the version and the distribution you are using. --Jwernerny 18:38, 14 May 2008 (UTC)