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

Mailing List Archive: MythTV: Users

Backend constantly restarting

 

 

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


mike at rochestervball

Nov 21, 2009, 8:30 PM

Post #1 of 10 (1086 views)
Permalink
Backend constantly restarting

New upgrade to 0.22 and my backend is constantly restarting every minute.

I have tried removing my capture card and deleting all video sources as some
Googling suggested with no luck

mythbackend.log | grep Starting
2009-11-21 23:15:13.828 MythBackend: Starting up as the master server.
2009-11-21 23:16:13.841 MythBackend: Starting up as the master server.
2009-11-21 23:17:13.861 MythBackend: Starting up as the master server.
2009-11-21 23:18:13.875 MythBackend: Starting up as the master server.

There are no errors, just Closing DB connection named 'DBManager0' before it starts again.

2009-11-21 23:15:13.817 Closing DB connection named 'DBManager0'
2009-11-21 23:16:13.831 Closing DB connection named 'DBManager0'
2009-11-21 23:17:13.848 Closing DB connection named 'DBManager0'
2009-11-21 23:18:13.865 Closing DB connection named 'DBManager0'

In my syslog I get

Nov 21 23:15:13 mythtv-server init: mythtv-backend main process (4863) terminated with status 255
Nov 21 23:16:13 mythtv-server init: mythtv-backend main process (4906) terminated with status 255
Nov 21 23:17:13 mythtv-server init: mythtv-backend main process (4942) terminated with status 255
Nov 21 23:18:13 mythtv-server init: mythtv-backend main process (4993) terminated with status 255

So I guess I need to find out why the backend process is being terminated.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mike at rochestervball

Nov 21, 2009, 9:30 PM

Post #2 of 10 (1057 views)
Permalink
Re: Backend constantly restarting [In reply to]

On Saturday 21 November 2009 11:30:42 pm Michael Harnden wrote:
> New upgrade to 0.22 and my backend is constantly restarting every minute.
>
snip
>
> So I guess I need to find out why the backend process is being terminated.
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
Well I uninstalled monit and nagios and the restarting problem went away. I will investigate
tomorrow to see which was the guilty party.
Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 21, 2009, 9:53 PM

Post #3 of 10 (1054 views)
Permalink
Re: Backend constantly restarting [In reply to]

On 11/22/2009 12:30 AM, Michael Harnden wrote:
> On Saturday 21 November 2009 11:30:42 pm Michael Harnden wrote:
>
>> New upgrade to 0.22 and my backend is constantly restarting every minute.
>>
> snip
>

(adding back one line that was snipped)
>> 2009-11-21 23:15:13.817 Closing DB connection named 'DBManager0'

We've had several users who noticed issues with the DB disappearing out
from under Myth, but we haven't been able to reproduce the issue or
track down its cause. The closest we've gotten to it is
http://svn.mythtv.org/trac/ticket/6544 , but unfortunately the Qt debug
symbols weren't available/loaded when the backtrace was made, so it's
hard to tell what was happening.

>> So I guess I need to find out why the backend process is being terminated.
> Well I uninstalled monit and nagios and the restarting problem went away. I will investigate
> tomorrow to see which was the guilty party.

/Very/ interesting. If you can figure out which caused it, please let
us know exactly how it was monitoring mythbackend (polling the status
port or using the bindings to send a "ping" to the backend or ...).

I don't know if Stuart was/is using nagios or monit when he saw the
database failure, but I'll ask. (TTBOMK, he only saw the one.)

Thanks,
Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


udovdh at xs4all

Nov 22, 2009, 1:34 AM

Post #4 of 10 (1042 views)
Permalink
Re: Backend constantly restarting [In reply to]

On 2009-11-22 06:30, Michael Harnden wrote:
> Well I uninstalled monit and nagios and the restarting problem went away. I will investigate
> tomorrow to see which was the guilty party.

Use monit to check the pid for mythbackend only, that works for me on an
EN12000.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cgdennis at btinternet

Nov 23, 2009, 4:20 PM

Post #5 of 10 (993 views)
Permalink
Re: Backend constantly restarting [In reply to]

Michael Harnden wrote:
> On Saturday 21 November 2009 11:30:42 pm Michael Harnden wrote:
>> New upgrade to 0.22 and my backend is constantly restarting every minute.
>>
> snip
>> So I guess I need to find out why the backend process is being terminated.
>>
>> Mike
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users [at] mythtv
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
> Well I uninstalled monit and nagios and the restarting problem went away. I will investigate
> tomorrow to see which was the guilty party.
> Mike

I had a similar problem -- cured by uninstalling monit.

It didn't happen initially when I upgraded to 0.22 (which I did very
messily by upgrading Ubuntu 8.10 to 9.10 in one go, and it all went a
bit strange for a while). While sorting out that mess, monit got
uninstalled, and mythtv has been fine.

I reinstalled monit this evening, and suddenly mythtv kept restarting --
I didn't notice until I found this thread that the restart was happening
exactly every minute. For now, I'll live without monit.

cheers

Chris
--
Chris Dennis cgdennis [at] btinternet
Fordingbridge, Hampshire, UK
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 24, 2009, 9:56 AM

Post #6 of 10 (981 views)
Permalink
Re: Backend constantly restarting [In reply to]

On 11/23/2009 07:20 PM, Chris Dennis wrote:
> Michael Harnden wrote:
>> On Saturday 21 November 2009 11:30:42 pm Michael Harnden wrote:
>>> New upgrade to 0.22 and my backend is constantly restarting every
>>> minute.
>>>
>> snip
>>> So I guess I need to find out why the backend process is being
>>> terminated.
>> Well I uninstalled monit and nagios and the restarting problem went
>> away. I will investigate
>> tomorrow to see which was the guilty party.
> I had a similar problem -- cured by uninstalling monit.
>
> It didn't happen initially when I upgraded to 0.22 (which I did very
> messily by upgrading Ubuntu 8.10 to 9.10 in one go, and it all went a
> bit strange for a while). While sorting out that mess, monit got
> uninstalled, and mythtv has been fine.
>
> I reinstalled monit this evening, and suddenly mythtv kept restarting
> -- I didn't notice until I found this thread that the restart was
> happening exactly every minute. For now, I'll live without monit.

How was monit set to monitor the backend's status? I need to know so I
can try to figure out why monit is killing Myth.

(different) Mike

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mike at rochestervball

Nov 27, 2009, 11:13 AM

Post #7 of 10 (952 views)
Permalink
Re: Backend constantly restarting [In reply to]

On Tuesday 24 November 2009 12:56:03 pm Michael T. Dean wrote:
> On 11/23/2009 07:20 PM, Chris Dennis wrote:
> > Michael Harnden wrote:
> >> On Saturday 21 November 2009 11:30:42 pm Michael Harnden wrote:
> >>> New upgrade to 0.22 and my backend is constantly restarting every
> >>> minute.
> >>
> >> snip
> >>
> >>> So I guess I need to find out why the backend process is being
> >>> terminated.
> >>
> >> Well I uninstalled monit and nagios and the restarting problem went
> >> away. I will investigate
> >> tomorrow to see which was the guilty party.
> >
> > I had a similar problem -- cured by uninstalling monit.
> >
> > It didn't happen initially when I upgraded to 0.22 (which I did very
> > messily by upgrading Ubuntu 8.10 to 9.10 in one go, and it all went a
> > bit strange for a while). While sorting out that mess, monit got
> > uninstalled, and mythtv has been fine.
> >
> > I reinstalled monit this evening, and suddenly mythtv kept restarting
> > -- I didn't notice until I found this thread that the restart was
> > happening exactly every minute. For now, I'll live without monit.
>
> How was monit set to monitor the backend's status? I need to know so I
> can try to figure out why monit is killing Myth.
>
> (different) Mike
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
Mike,
I haven't had the time to reinstall (family is hooked on Mythtv and isn't fond of down time), but
here is the config file I was using. When I have time I will reinstall and report back.

# Monit control file
#
# Comments begin with a '#' and extend through the end of the line.
# Blank lines between program entries are ignored. Keywords are case
# insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'
#

set daemon 30
set logfile /var/log/monit.log
set mail-format
{ from: mike [at] XXXX}
set alert mike [at] XXXX # Send alert to system admin on any event
set httpd port 2812 and
allow XXXX.site
allow 192.168.1.0/255.255.255.0
allow 127.0.0.1
allow admin:monit # user 'admin' with password 'monit'


check process mythbackend with pidfile /var/run/mythtv/mythbackend.pid
#group mythtv
start program = "/etc/init.d/mythtv-backend restart"
stop program = "/etc/init.d/mythtv-backend stop"
# if failed port 6544 proto http then restart
depends on mysql

check process mysql with pidfile /var/run/mysqld/mysqld.pid
#group mythtv
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed port 3306 then restart
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 27, 2009, 9:21 PM

Post #8 of 10 (935 views)
Permalink
Re: Backend constantly restarting [In reply to]

On 11/27/2009 02:13 PM, Michael Harnden wrote:
> On Tuesday 24 November 2009 12:56:03 pm Michael T. Dean wrote:
>
>> On 11/23/2009 07:20 PM, Chris Dennis wrote:
>>
>>> I reinstalled monit this evening, and suddenly mythtv kept restarting
>>> -- I didn't notice until I found this thread that the restart was
>>> happening exactly every minute. For now, I'll live without monit.
>>>
>> How was monit set to monitor the backend's status? I need to know so I
>> can try to figure out why monit is killing Myth.
> I haven't had the time to reinstall (family is hooked on Mythtv and isn't fond of down time), but
> here is the config file I was using.

Thanks.

> When I have time I will reinstall and report back.
>

Chris's confirmation is good enough for me, if it's good enough for you.

> # Monit control file
> #
> # Comments begin with a '#' and extend through the end of the line.
> # Blank lines between program entries are ignored. Keywords are case
> # insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'
> #
>
> set daemon 30
> set logfile /var/log/monit.log
> set mail-format
> { from: mike [at] XXXX}
> set alert mike [at] XXXX # Send alert to system admin on any event
> set httpd port 2812 and
> allow XXXX.site
> allow 192.168.1.0/255.255.255.0
> allow 127.0.0.1
> allow admin:monit # user 'admin' with password 'monit'
>
>
> check process mythbackend with pidfile /var/run/mythtv/mythbackend.pid
> #group mythtv
> start program = "/etc/init.d/mythtv-backend restart"
> stop program = "/etc/init.d/mythtv-backend stop"
> # if failed port 6544 proto http then restart
>

Does this mean the mythbackend check is commented/doing nothing?

> depends on mysql
>
> check process mysql with pidfile /var/run/mysqld/mysqld.pid
> #group mythtv
> start program = "/etc/init.d/mysql start"
> stop program = "/etc/init.d/mysql stop"
> if failed port 3306 then restart

If so, would that mean that monit is restarting mysql over and over?
(Ripping the MySQL server out from under Myth would cause problems.)

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Nov 30, 2009, 4:04 PM

Post #9 of 10 (862 views)
Permalink
Re: Backend constantly restarting [In reply to]

On 11/30/2009 06:36 PM, Matthias Thyroff wrote:

> On 11/28/2009 12:21 AM, Michael T. Dean wrote:
>> On 11/27/2009 02:13 PM, Michael Harnden wrote:
>>> On Tuesday 24 November 2009 12:56:03 pm Michael T. Dean wrote:
>>>> How was monit set to monitor the backend's status? I need to know so
>>>> I can try to figure out why monit is killing Myth.
>>> # Monit control file
>>> #
>>> # Comments begin with a '#' and extend through the end of the line.
>>> # Blank lines between program entries are ignored. Keywords are case
>>> # insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'
>>> #
>>>
>>> set daemon 30
>>> set logfile /var/log/monit.log
>>> set mail-format
>>> { from: mike [at] XXXX}
>>> set alert mike [at] XXXX # Send alert to system admin on any event
>>> set httpd port 2812 and
>>> allow XXXX.site
>>> allow 192.168.1.0/255.255.255.0
>>> allow 127.0.0.1
>>> allow admin:monit # user 'admin' with password 'monit'
>>>
>>>
>>> check process mythbackend with pidfile /var/run/mythtv/mythbackend.pid
>>> #group mythtv
>>> start program = "/etc/init.d/mythtv-backend restart"
>>> stop program = "/etc/init.d/mythtv-backend stop"
>>> # if failed port 6544 proto http then restart
>>>
>> Does this mean the mythbackend check is commented/doing nothing?
>>> depends on mysql
>>>
>>> check process mysql with pidfile /var/run/mysqld/mysqld.pid
>>> #group mythtv
>>> start program = "/etc/init.d/mysql start"
>>> stop program = "/etc/init.d/mysql stop"
>>> if failed port 3306 then restart
>> If so, would that mean that monit is restarting mysql over and over?
>> (Ripping the MySQL server out from under Myth would cause problems.)
> I also just found out that it is monit who is restarting my backend every
> 2 minutes - that was a long way of way too much suffering.
>
> It seems that myth backend 0.22 does not write the
> /var/run/myththv/mythbackend.pid file anymore - and monit used that file
> for checking for the process. Fails, of course and restarts the service.
>
> From short investigation it seems there is no pid file at all anymore.
>
> This is where I stop today.
>
> Have a good day, thanks for the greatest tv software ever (well don't know
> any other, don't need to, either, because myth does what I need and much
> more)

Sounds like a problem with the *buntu mythbackend start scripts--perhaps
introduced in the switch to upstart. I don't know whether it means that
the monit config needs changing or whether the upstart script needs
changing.

Thanks for the info.

Mike


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Larry.Finger at lwfinger

Nov 30, 2009, 4:38 PM

Post #10 of 10 (867 views)
Permalink
Re: Backend constantly restarting [In reply to]

On 11/30/2009 06:04 PM, Michael T. Dean wrote:
> On 11/30/2009 06:36 PM, Matthias Thyroff wrote:
>
>> On 11/28/2009 12:21 AM, Michael T. Dean wrote:
>>> On 11/27/2009 02:13 PM, Michael Harnden wrote:
>>>> On Tuesday 24 November 2009 12:56:03 pm Michael T. Dean wrote:
>>>>> How was monit set to monitor the backend's status? I need to know so
>>>>> I can try to figure out why monit is killing Myth.
>>>> # Monit control file
>>>> #
>>>> # Comments begin with a '#' and extend through the end of the line.
>>>> # Blank lines between program entries are ignored. Keywords are case
>>>> # insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'
>>>> #
>>>>
>>>> set daemon 30
>>>> set logfile /var/log/monit.log
>>>> set mail-format
>>>> { from: mike [at] XXXX}
>>>> set alert mike [at] XXXX # Send alert to system admin on any event
>>>> set httpd port 2812 and
>>>> allow XXXX.site
>>>> allow 192.168.1.0/255.255.255.0
>>>> allow 127.0.0.1
>>>> allow admin:monit # user 'admin' with password 'monit'
>>>>
>>>>
>>>> check process mythbackend with pidfile /var/run/mythtv/mythbackend.pid
>>>> #group mythtv
>>>> start program = "/etc/init.d/mythtv-backend restart"
>>>> stop program = "/etc/init.d/mythtv-backend stop"
>>>> # if failed port 6544 proto http then restart
>>>>
>>> Does this mean the mythbackend check is commented/doing nothing?
>>>> depends on mysql
>>>>
>>>> check process mysql with pidfile /var/run/mysqld/mysqld.pid
>>>> #group mythtv
>>>> start program = "/etc/init.d/mysql start"
>>>> stop program = "/etc/init.d/mysql stop"
>>>> if failed port 3306 then restart
>>> If so, would that mean that monit is restarting mysql over and over?
>>> (Ripping the MySQL server out from under Myth would cause problems.)
>> I also just found out that it is monit who is restarting my backend every
>> 2 minutes - that was a long way of way too much suffering.
>>
>> It seems that myth backend 0.22 does not write the
>> /var/run/myththv/mythbackend.pid file anymore - and monit used that file
>> for checking for the process. Fails, of course and restarts the service.
>>
>> From short investigation it seems there is no pid file at all anymore.
>>
>> This is where I stop today.
>>
>> Have a good day, thanks for the greatest tv software ever (well don't
>> know
>> any other, don't need to, either, because myth does what I need and much
>> more)
>
> Sounds like a problem with the *buntu mythbackend start scripts--perhaps
> introduced in the switch to upstart. I don't know whether it means that
> the monit config needs changing or whether the upstart script needs
> changing.

On openSUSE, the standard start script for mythbackend needed to be
modified. Initially it had the the -p switch as an argument to
startproc, but there was no pid file created. By moving it to _AFTER_
the starting of mythbackend ($MYTHBACKEND_BIN), then the pid file was
created. The resulting command is:

HOME=${MYTHBACKEND_HOME} /sbin/startproc \
-u ${MYTHBACKEND_USERID} -g ${MYTHBACKEND_GROUPID} \
$MYTHBACKEND_BIN --daemon -p /var/run/mythbackend.pid \
--logfile /var/log/mythtv/mythbackend.log \
$MYTHBACKEND_OPTIONS

Larry
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users 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.