or Connect
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › MythTV Frontend can't detect backend
New Posts  All Forums:Forum Nav:

MythTV Frontend can't detect backend

post #1 of 21
Thread Starter 
I had success for about one week with my MythTV setup on a Fedora 10 box. Now it seems that the frontend cannot find the backend after a few minutes of use. I can restart the backend and watch tv for a little bit, but it inevitably fails to find the backend after just a little bit of use. Can someone get me started on how to trace down the problem. I am relatively new to MythTV.
post #2 of 21
Sounds like the backend or database is crapping out. Check to see if it is listening with:
# lsof -i -n -P |more
... You should see something like:
Code:
...
mythbacke  6491      mythtv   14u  IPv4 1376347       TCP *:6544 (LISTEN)
mythbacke  6491      mythtv   25u  IPv4 1376355       TCP *:6543 (LISTEN)
mysqld     7541       mysql   10u  IPv4   38013       TCP 127.0.0.1:3306 (LISTEN
...
If one or more are not there, well you know.

BTW, the lsof command is very useful for many things, so I put in my /etc/profile, this:
Code:
alias listen='lsof -i -n -P |more'
post #3 of 21
Thread Starter 
I ran "lsof -i -n -P |more" and I had the three services running that you mention above. Note that I cannot use mplayer to play tv until I do "service mythbackend stop"... even though the frontend says the backend isn't running. I'm not saying it isn't, but I am not sure how my database is corrupt. I deleted it several times and reinstalled it, but it seems to behave the same way.
post #4 of 21
OK, so the daemons aren't dumping.

Aren't you the one who had the queer tables error? If so, I gotta say this is a database problem. I'd deinstall mysql server, delete the database (/var/lib/mysql), and start over.

Otherwise, please provide alot more info, like system, OS, versions, etc.
post #5 of 21
Quote:
Originally Posted by colonelpenguin View Post

I ran "lsof -i -n -P |more" and I had the three services running that you mention above. Note that I cannot use mplayer to play tv until I do "service mythbackend stop"... even though the frontend says the backend isn't running. I'm not saying it isn't, but I am not sure how my database is corrupt. I deleted it several times and reinstalled it, but it seems to behave the same way.

If you didn't set your tuner cards for on demand use when you configured them, then mythbackend locks them out from other uses. If you set them for on demand use, then you can use them in other apps while the backend is still running. That's assuming that myth isn't actually using it at the time.
post #6 of 21
Thread Starter 
Ok... perhaps this info will be helpful. I ran "mythfrontend -l logfilename" and it put out the following:

2009-01-01 19:48:35.020 New DB connection, total: 2
2009-01-01 19:48:35.038 Connected to database 'mythconverg' at host: localhost
2009-01-01 19:48:35.047 mythfrontend version: 0.21.20080304-1 www.mythtv.org
2009-01-01 19:48:35.047 Enabled verbose msgs: important general
2009-01-01 19:48:35.445 Unable to parse themeinfo.xml for glass-wide
2009-01-01 19:48:35.446 The theme (glass-wide) is missing a themeinfo.xml file
2009-01-01 19:48:36.107 Unable to parse themeinfo.xml for glass-wide
2009-01-01 19:48:36.110 The theme (glass-wide) is missing a themeinfo.xml file
2009-01-01 19:48:36.893 No theme dir: /home/name/.mythtv/themes/G.A.N.T
2009-01-01 19:48:36.905 Primary screen 0.
2009-01-01 19:48:36.909 Using screen 0, 1280x1024 at 0,0
2009-01-01 19:48:36.910 No theme dir: /home/name/.mythtv/themes/G.A.N.T
2009-01-01 19:48:36.914 Switching to square mode (G.A.N.T)
2009-01-01 19:48:37.021 Using the Qt painter
mythtv: could not connect to socket
mythtv: No such file or directory
2009-01-01 19:48:37.025 lirc_init failed for mythtv, see preceding messages
2009-01-01 19:48:37.037 JoystickMenuClient Error: Joystick disabled - Failed to read /home/name/.mythtv/joystickmenurc
2009-01-01 19:48:43.414 Loading from: /usr/share/mythtv/themes/G.A.N.T/base.xml
2009-01-01 19:48:44.065 Loading from: /usr/share/mythtv/themes/default/base.xml
2009-01-01 19:48:44.403 Registering Internal as a media playback plugin.
2009-01-01 19:48:44.878 MonitorRegisterExtensions(0x100, gif,jpg,png)
2009-01-01 19:48:45.290 MythMusic adding CD-Writer: 1,0,0 -- DVD-ROM DVD-117R
2009-01-01 19:48:45.291 MythMusic adding CD-Writer: 1,1,0 -- DVD-RAM GSA-H55N
2009-01-01 19:48:45.550 MonitorRegisterExtensions(0x40, ogg,mp3,aac,flac)
SIP listening on IP Address 192.168.2.2:5060 NAT address 192.168.2.2
SIP: Cannot register; proxy, username or password not set
2009-01-01 19:48:46.125 No theme dir: /home/name/.mythtv/themes/G.A.N.T
2009-01-01 19:48:54.471 Connecting to backend server: 127.0.0.1:6543 (try 1 of 5)
2009-01-01 19:48:54.476 Using protocol version 40
Destroying SipFsm object
2009-01-01 19:48:58.429 Deleting UPnP client...

I have not uninstalled mysql yet... but I have dropped the mythconverge table and set it up again. Please note that I also deleted the .mythtv folder in my user directory thinking it was just extraneous info that would be setup again when I went through mythtv-setup. Could this be part of my problem? Thanks for all of your feedback so far.
post #7 of 21
Yes it could be. It's having a real problem with themes.

Please see if that .mythtv is in your trash, and reinstall at least GANT and glass-wide. (My favorite is ProjectGrayham) You really need the home .mythtv .
post #8 of 21
Thread Starter 
Unfortunately, the original .mythtv folder is gone. I did notice that that mythtv-setup recreates this folder, but I was just wondering if it doesn't recreate everything.

What does this part of that logfile mean: "SIP: Cannot register; proxy, username or password not set"
post #9 of 21
Quote:
Originally Posted by colonelpenguin View Post

What does this part of that logfile mean: "SIP: Cannot register; proxy, username or password not set"

SIP is a telephony (VOIP) protocol, so if you aren't using mythphone, then you can disregard this.
post #10 of 21
Thread Starter 
Ok thanks... I am not using mythphone so that shouldn't be my problem. Does anything else look fishy in my previous post.
post #11 of 21
Is that the whole thing? The only problem I see is the theme stuff except that it looks like it's shutting down right after attempting to connect to the database, perhaps because it can't find a theme. Try reinstalling the themes if you haven't already.
post #12 of 21
Thread Starter 
Yeah, that was the whole thing... I didn't do very much but I did go through a few of the functions that aren't working properly to try to generate some meaningful errors. Here is a snippet from the mythbackend.log. Does this tell anything meaningful?

2009-01-02 14:29:44.352 RingBuffer::RingBuffer(): Failed to open remote file ()
2009-01-02 14:29:44.931 MainServer::HandleAnnounce Playback
2009-01-02 14:29:44.933 adding: name.dyndns.org as a client (events: 0)
2009-01-02 14:29:44.937 MainServer::HandleAnnounce FileTransfer
2009-01-02 14:29:44.944 adding: name.dyndns.org as a remote file transfer
2009-01-02 14:29:44.953 RemoteFile:penSocket(control socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:44.961 RemoteFile:penSocket(file data socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:44.969 RingBuffer::RingBuffer(): Failed to open remote file ()
2009-01-02 14:29:45.549 MainServer::HandleAnnounce Playback
2009-01-02 14:29:45.550 adding: name.dyndns.org as a client (events: 0)
2009-01-02 14:29:45.554 MainServer::HandleAnnounce FileTransfer
2009-01-02 14:29:45.560 adding: name.dyndns.org as a remote file transfer
2009-01-02 14:29:45.570 RemoteFile:penSocket(control socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:45.577 RemoteFile:penSocket(file data socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:45.585 RingBuffer::RingBuffer(): Failed to open remote file ()
2009-01-02 14:29:49.240 MainServer::HandleAnnounce Playback
2009-01-02 14:29:49.242 adding: name.dyndns.org as a client (events: 0)
2009-01-02 14:29:49.246 MainServer::HandleAnnounce FileTransfer
2009-01-02 14:29:49.249 adding: name.dyndns.org as a remote file transfer
2009-01-02 14:29:49.252 RemoteFile:penSocket(control socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:49.254 RemoteFile:penSocket(file data socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:49.256 RingBuffer::RingBuffer(): Failed to open remote file ()
2009-01-02 14:29:49.292 MainServer::HandleAnnounce Playback
2009-01-02 14:29:49.293 adding: name.dyndns.org as a client (events: 0)
2009-01-02 14:29:49.299 MainServer::HandleAnnounce FileTransfer
2009-01-02 14:29:49.306 adding: name.dyndns.org as a remote file transfer
2009-01-02 14:29:49.329 RemoteFile:penSocket(control socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:49.332 RemoteFile:penSocket(file data socket):
Could not connect to server "" @ port -1
2009-01-02 14:29:49.340 RingBuffer::RingBuffer(): Failed to open remote file ()
2009-01-02 14:30:01.196 MainServer::HandleAnnounce Monitor
2009-01-02 14:30:01.199 adding: name.dyndns.org as a client (events: 0)
2009-01-02 14:30:09.100 MainServer::HandleAnnounce Monitor
2009-01-02 14:30:09.102 adding: name.dyndns.org as a client (events: 0)
post #13 of 21
Yeah, you're not set up:
Code:
Could not connect to server "" @ port -1
Did you recover your .mythtv? Is there a symlink there pointing to /etc/mythtv/mysql.txt? Is there a config.xml there? Have you run mythtv-setup and set server IP and ports?
post #14 of 21
Thread Starter 
I did go through myth-setup. I didn't think I needed to modify the ip and port settings if I was running the backend on the same machine as the frontend. I did not create the symbolic link yet. I am going to create it now and test things out.
post #15 of 21
Thread Starter 
After creating the symbolic link, my program guide just says Unkown twice for each entry. Nothing is seems to be loading from mythfilldatabase.
post #16 of 21
Thread Starter 
I find it puzzeling that the symbolic link is my problem since it was working a few weeks ago without the link. Perhaps an update is what made this necessary. I did read something about this on the setup documentation that I was using at:

http://mythtv.org/wiki/index.php/Ins...thTV_on_Fedora

Near the bottom of the page it talks about setting up a symbolic link, but I am not sure the exact syntax I should use for my system.

I installed myth via the fedora 10 repos. Everything would be in the standard locations I assume. I usually try to start the myth frontend while working under my standard user profile. The .mythtv folder that I was referencing earlier is located at /home/name/.mythtv
post #17 of 21
Thread Starter 
When I run mythfilldatabase it isn't able to read mysql.txt. That does appear to be part of if not all of the problem. What is the syntax needed to fix this?

2009-01-02 20:01:26.863 Using runtime prefix = /usr
2009-01-02 20:01:26.865 Unable to read configuration file mysql.txt
2009-01-02 20:01:26.866 Empty LocalHostName.
2009-01-02 20:01:26.867 Using localhost value of name.dyndns.com
2009-01-02 20:01:26.965 New DB connection, total: 1
2009-01-02 20:01:27.004 Connected to database 'mythconverg' at host: localhost
2009-01-02 20:01:27.015 Closing DB connection named 'DBManager0'
2009-01-02 20:01:27.024 Connected to database 'mythconverg' at host: localhost
2009-01-02 20:01:27.042 New DB connection, total: 2
2009-01-02 20:01:27.059 Connected to database 'mythconverg' at host: localhost
2009-01-02 20:01:27.060 Source 1 configured to use only the broadcasted guide data. Skipping.
2009-01-02 20:01:27.065 Data fetching complete.
2009-01-02 20:01:27.066 Adjusting program database end times.
2009-01-02 20:01:27.067 0 replacements made
2009-01-02 20:01:27.067 Marking generic episodes.
2009-01-02 20:01:27.069 Found 0
2009-01-02 20:01:27.069 Marking repeats.
2009-01-02 20:01:27.073 Found 0
2009-01-02 20:01:27.073 Unmarking new episode rebroadcast repeats.
2009-01-02 20:01:27.074 Found 0
2009-01-02 20:01:27.075 Marking episode first showings.
2009-01-02 20:01:27.076 Found 0
2009-01-02 20:01:27.077 Marking episode last showings.
2009-01-02 20:01:27.080 Found 0
2009-01-02 20:01:27.084
============================================================ ===
| Attempting to contact the master backend for rescheduling. |
| If the master is not running, rescheduling will happen when |
| the master backend is restarted. |
============================================================ ===
2009-01-02 20:01:27.111 Connecting to backend server: 127.0.0.1:6543 (try 1 of 5)
2009-01-02 20:01:27.122 Using protocol version 40
2009-01-02 20:01:27.201 mythfilldatabase run complete.
2009-01-02 20:01:27.202 DataDirect: Deleting temporary files
post #18 of 21
Oh dear, I'm afraid I've steered you wrong. mysql.txt must be writable by your user, so create one in /home/name/.mythtv:
Code:
DBHostName=localhost

# By default, Myth tries to ping the DB host to see if it exists.
# If your DB host or network doesn't accept pings, set this to no:
#
#DBHostPing=no

DBPort=3306
DBUserName=mythtv
DBPassword=mythtv
DBName=mythconverg
DBType=QMYSQL3

# Set the following if you want to use something other than this
# machine's real hostname for identifying settings in the database.
# This is useful if your hostname changes often, as otherwise you
# will need to reconfigure mythtv (or futz with the DB) every time.
# TWO HOSTS MUST NOT USE THE SAME VALUE
#
#LocalHostName=my-unique-identifier-goes-here

# If you want your frontend to be able to wake your MySQL server
# using WakeOnLan, have a look at the following settings:
#
#
# The time the frontend waits (in seconds) between reconnect tries.
# This should be the rough time your MySQL server needs for startup
#
#WOLsqlReconnectWaitTime=0
#
#
# This is the number of retries to wake the MySQL server
# until the frontend gives up
#
#WOLsqlConnectRetry=5
#
#
# This is the command executed to wake your MySQL server.
#
#WOLsqlCommand=echo 'WOLsqlServerCommand not set'
Then edit /etc/mythtv/mysql.txt and comment everything out so there are no conflicts.

And create config.xml:
Code:

  
    
      f3ec5c96-a819-4086-bfa0-8af997da3d9c
    
    
      
        localhost
        mythtv
        mythtv
        mythconverg
        3306
      
    
  
Your MediaRenderer will be different, but I don't know what to tell you there.

Make sure both are set to your username:
# chmod name:name /home/name/.mythtv -R

Then run mythfilldatabase again.
post #19 of 21
Thread Starter 
Unfortunately I still don't have this working. I didn't have quite as much time to spend on it over the weekend. I had the symbolic link working to where mythfilldatabase didn't generate any errors. It didn't seem to be finding any data either. Is this even supposed to be used for EIT? My frontend to backend connection still seems very flaky. I tried the following:

yum remove mythtv-frontend mythtv-backend mythtv-themes mythtv-base-themes

and dropped the mythconverge database

And I removed all of the mythtv and .mythtv folders on my system that it left behind. However, when I did yum install mythtv it did not recreate /etc/mythtv/? I am not sure what in the rpm installation process creates this directory or weather I really need it for regular OTA tv watching with EIT EPG. All I know is that it still isn't working. My system had mysql pre-installed... and that seems to be working fine. Like I said before... my system was working fine for about 1 week. Then I feel some update broke it. I have nightly yum -y update enabled. What do you think the likelihood is the that freshrpms has a bad rpm? Everytime I reinstall it appears to behave the same way.
post #20 of 21
Well, I was in the process of writing up an opus of steps for you to check things, but Konqueror crashed blowing it all away. I'm too pissed off to start over, but you need to start at the beginning and build on that. Make sure everything's installed, set right, and permissions are right.
post #21 of 21
Thread Starter 
Thanks quantumstate. I'm sorry about your luck with konqueror...

Anyway, I was able to get all of my folders back. I just needed to reinstall a few more necessary packages like myth-common and libmyth. Everything seems to be back the way it was before... I mean before I uninstalled . My symptoms again are as follows:

After installing, running myth-setup, and enabeling the mythbackend service, I am able to start up the frontend under my normal user profile and watch tv for almost 10 minutes before it locks up. I am unable to watch tv again until I restart mythbackend. If I restart the backend and walk away for more than 10 minutes, I am unable to watch tv at all until I restart again. Furthermore, the EIT data is never being loaded. I am able to view TV in mplayer fine as long as the backend isn't running. The backend ties up the tuner card indefinitely since I do not have the on-demand option enabled.

One question I have concerning the error logs I posted above is with the way it shows mulitple DB connections... why is this?

Quote:


2009-01-02 20:01:26.965 New DB connection, total: 1
2009-01-02 20:01:27.004 Connected to database 'mythconverg' at host: localhost
2009-01-02 20:01:27.015 Closing DB connection named 'DBManager0'
2009-01-02 20:01:27.024 Connected to database 'mythconverg' at host: localhost
2009-01-02 20:01:27.042 New DB connection, total: 2
2009-01-02 20:01:27.059 Connected to database 'mythconverg' at host: localhost
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: HTPC - Linux Chat
AVS › AVS Forum › Video Components › Home Theater Computers › HTPC - Linux Chat › MythTV Frontend can't detect backend