Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Mythtvnz

Backend failed ...

 

 

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded


jim at inode

Nov 12, 2009, 7:45 PM

Post #1 of 11 (1885 views)
Permalink
Backend failed ...

I've just noticed that my myth backend has failed ... and won't restart.

This is a Mythbuntu 8.10 machine, and I've not attempted to do any
upgrading on it ...

/etc/init.d/mythtv-backend start gives the following in
/var/log/mythtv/mythbackend.log
2009-11-13 16:37:33.985 Connected to database 'mythconverg' at host: localhost
2009-11-13 16:37:33.989 The schema version of your existing database
is newer than this version of MythTV understands. Please ensure that
you have selected the proper database server or upgrade this and all
other frontends and backends to the same MythTV version and revision.

However mythfilldatabase seems to work normally, connecting to the DB
and doing some work.

I have had a disk crash recently, but it should have been hidden from
mysql by the raid setup.

Anyone have any hints for me? I'm going to be out of the house for the
weekend, but I'll have connectivity to keep poking at the machine
remotely ...

-jim

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


jfp at clearfield

Nov 12, 2009, 9:42 PM

Post #2 of 11 (1796 views)
Permalink
Re: Backend failed ... [In reply to]

> Anyone have any hints for me? I'm going to be out of the house for the
> weekend, but I'll have connectivity to keep poking at the machine
> remotely ...

1st tthing I would do is check that the database is not damaged.

mysqlcheck -r -c -A -f -p --auto-repair

--
------------------------------------------------------------------------
Jean-Francois Pirus <jfp [at] clearfield> Technical Manager
Phone (+64-9) 358 2081 Clearfield Software Ltd
Fax (+64-9) 358 2083 1st Floor 8-10 Whitaker Place
Mob (+64-21) 640 779 P O Box 3901 Auckland, New Zealand
------------------------------------------------------------------------


_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


jim at inode

Nov 13, 2009, 1:14 AM

Post #3 of 11 (1798 views)
Permalink
Re: Backend failed ... [In reply to]

On Fri, Nov 13, 2009 at 6:42 PM, Jean-Francois Pirus <jfp [at] clearfield> wrote:
> mysqlcheck -r -c -A -f -p --auto-repair

A good idea; however all tables report OK and mythbackend still fails :-(

The only web hits for the message I get are related to people
upgrading myth; however I've not done that -- it's still at 0.21, as
per mythbuntu 8.10.

-jim

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


paul at kcbbs

Nov 13, 2009, 1:19 AM

Post #4 of 11 (1794 views)
Permalink
Re: Backend failed ... [In reply to]

> On Fri, Nov 13, 2009 at 6:42 PM, Jean-Francois Pirus <jfp [at] clearfield>
wrote:
> > mysqlcheck -r -c -A -f -p --auto-repair
>
> A good idea; however all tables report OK and mythbackend still fails :-(
>
> The only web hits for the message I get are related to people
> upgrading myth; however I've not done that -- it's still at 0.21, as
> per mythbuntu 8.10.
>
Any chance that a newer frontend connected to the database and upgraded it?

You might have to go back to your backups and restore them. Look in the
settings table in the SQL backup file for the version number.

> -jim

Paul

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


nick.rout at gmail

Nov 13, 2009, 12:00 PM

Post #5 of 11 (1778 views)
Permalink
Re: Backend failed ... [In reply to]

On Fri, Nov 13, 2009 at 10:19 PM, Paul Kendall <paul [at] kcbbs> wrote:
>> On Fri, Nov 13, 2009 at 6:42 PM, Jean-Francois Pirus <jfp [at] clearfield>
> wrote:
>> > mysqlcheck -r -c -A -f -p --auto-repair
>>
>> A good idea; however all tables report OK and mythbackend still fails :-(
>>
>> The only web hits for the message I get are related to people
>> upgrading myth; however I've not done that -- it's still at 0.21, as
>> per mythbuntu 8.10.
>>
> Any chance that a newer frontend connected to the database and upgraded it?
>
> You might have to go back to your backups and restore them. Look in the
> settings table in the SQL backup file for the version number.
>

Did you perhaps point a newer frontend at it and trigger a database conversion?

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


jim at inode

Nov 13, 2009, 1:40 PM

Post #6 of 11 (1776 views)
Permalink
Re: Backend failed ... [In reply to]

On Fri, Nov 13, 2009 at 10:19 PM, Paul Kendall <paul [at] kcbbs> wrote:
> Any chance that a newer frontend connected to the database and upgraded it?

... Yes, there are a couple of Ubuntu 9.10 machines in the house and a
client from there may well have connected. Surely that wouldn't change
the db??

> You might have to go back to your backups and restore them. Look in the
> settings table in the SQL backup file for the version number.

Backups?

*cough*

The only version thing I can see in the settings table at the moment
is MythMovies.DatabaseVersion = 4
Can I drop the DB and recreate? I don't mind losing recording
schedules, and I have the old programmes on non-myth backup storage
...

-jim

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


hoiho.nz at gmail

Nov 13, 2009, 5:00 PM

Post #7 of 11 (1770 views)
Permalink
Re: Backend failed ... [In reply to]

On Sat, 14 Nov 2009 10:40, Jim Cheetham wrote:

> > Any chance that a newer frontend connected to the database and upgraded
> > it?
>
> ... Yes, there are a couple of Ubuntu 9.10 machines in the house and a
> client from there may well have connected. Surely that wouldn't change
> the db??

That is the implication behind Paul and Nick's posts.  I don't know - I have
never been there and would like to know for sure.  It would seem like very
poor application design if it is right.  Surely a Frontend can be thought of
as a client and the Backend as a server.  If the client can tell the server
to reconfigure it is like the tail wagging the dog and opens up all sorts of
Denial of Service questions
>
> Backups?
>
> *cough*
>

Must remember to back up my database soon --- real soon!

> The only version thing I can see in the settings table at the moment
> is  MythMovies.DatabaseVersion = 4
This is what you are looking for

                Table = settings
                Value = DBSchemaVer

In my system Mythbuntu Jaunty + JYA fixes (0.21)
                Data = 1214

> Can I drop the DB and recreate? I don't mind losing recording
> schedules, and I have the old programmes on non-myth backup storage
> ...
To me, that sounds a bit drastic without more investigation, but pragmatically
may really depend upon WAF requirements for a working system????

In any event run some backups first in case you are able to recover at least
some of the data/info.

I would run the mysql utility (mysqlshow ?)to dump the schema to a text file
(essentially a bunch of SQL statements to recreate the database) then diff it
with a known working database to try and isolate what the differences and
assess whether your database can be repaired.

Tony

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


stevehodge at gmail

Nov 13, 2009, 5:17 PM

Post #8 of 11 (1774 views)
Permalink
Re: Backend failed ... [In reply to]

On Sat, Nov 14, 2009 at 2:00 PM, Tony Sauri <hoiho.nz [at] gmail> wrote:

> It would seem like very
> poor application design if it is right. Surely a Frontend can be thought
> of
> as a client and the Backend as a server. If the client can tell the server
> to reconfigure it is like the tail wagging the dog and opens up all sorts
> of
> Denial of Service questions
>

If you're allowing random machines to connect to your mythtv database then a
DOS due to a frontend upgrading the db is the least of your security
concerns. Someone or something could just as easily connect and delete the
entire db. If you want security on the database then it's your
responsibility to set it up so that it is secure.

I agree that having frontends do db schema upgrades seems like a bad idea.
The docs do say not to use different versions on the front and back ends
though.

Cheers,
Steve


hads at nice

Nov 13, 2009, 6:26 PM

Post #9 of 11 (1763 views)
Permalink
Re: Backend failed ... [In reply to]

On Sat, 2009-11-14 at 14:17 +1300, Steve Hodge wrote:
> I agree that having frontends do db schema upgrades seems like a bad
> idea. The docs do say not to use different versions on the front and
> back ends though.

I think these days you need to pass a flag to mythfrontend to allow it
to upgrade the schema. The backend and mythtv-setup will upgrade it
automatically.

--
http://nicegear.co.nz
New Zealand's Open Source Hardware Supplier


_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


jim at inode

Nov 13, 2009, 8:42 PM

Post #10 of 11 (1750 views)
Permalink
Re: Backend failed ... [In reply to]

On Sat, Nov 14, 2009 at 3:26 PM, Hadley Rich <hads [at] nice> wrote:
> On Sat, 2009-11-14 at 14:17 +1300, Steve Hodge wrote:
>> I agree that having frontends do db schema upgrades seems like a bad
>> idea. The docs do say not to use different versions on the front and
>> back ends though.
>
> I think these days you need to pass a flag to mythfrontend to allow it
> to upgrade the schema. The backend and mythtv-setup will upgrade it
> automatically.

I now suspect something like installing mythtv-frontend on my Ubuntu
9.10 desktop has done this, I removed it a few days ago and noticed
that it seemed to have installed -backend and mysql on here ..
although it was pointed at the server. Possibly a stupid default in
the Ubuntu packaging or a stupid user not reading the messages?

mysql> select * from settings where value='DBSchemaVer';
+-------------+------+----------+
| value | data | hostname |
+-------------+------+----------+
| DBSchemaVer | 1244 | NULL |
+-------------+------+----------+

Well, it sounds like I've broken things one way or another, and
there's no way back. I suspect my best way forward is to dist-upgrade
the machine a couple of times from 8.10 to 9.10 ... see what else
breaks on the way!

-jim

_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/


hads at nice

Nov 13, 2009, 9:00 PM

Post #11 of 11 (1757 views)
Permalink
Re: Backend failed ... [In reply to]

On Sat, 2009-11-14 at 17:42 +1300, Jim Cheetham wrote:
>
> Well, it sounds like I've broken things one way or another, and
> there's no way back. I suspect my best way forward is to dist-upgrade
> the machine a couple of times from 8.10 to 9.10 ... see what else
> breaks on the way!

There is a PPA which provides updated packages if you really don't want
to upgrade;

http://mythbuntu.org/auto-builds

hads

--
http://nicegear.co.nz
New Zealand's Open Source Hardware Supplier


_______________________________________________
mythtvnz mailing list
mythtvnz [at] lists
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/

MythTV mythtvnz RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.