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

Mailing List Archive: MythTV: Users

mythbackend does not have access to mysql.txt after .22 upgrade to .23

 

 

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


mythtv at heathsworld

May 8, 2010, 8:11 AM

Post #1 of 11 (753 views)
Permalink
mythbackend does not have access to mysql.txt after .22 upgrade to .23

I just upgraded to JYA .23 and now when I start mythfront is tells me it
cannot connect to the database. What I found is the backend is showing the
error below (BE and FE on same machine). As it turns out, when the system
tries to start the back end it gets permission denied when trying to access
the database. Yet if i start it as a user or root using "mythbackend"
command it connects just fine. Did the configuration file location get
changed or something? Obviously /.myth doesn't exist and show below.

Would you like to configure the database connection now? [no]
[console is not interactive, using default 'no']
2010-05-08 10:04:39.354 Deleting UPnP client...
2010-05-08 10:04:39.942 Failed to init MythContext, exiting.
2010-05-08 10:04:40.032 mythbackend version: branches/release-0-23-fixes
[24473] www.mythtv.org
2010-05-08 10:04:40.032 Using runtime prefix = /usr
2010-05-08 10:04:40.032 Using configuration directory = /.mythtv
2010-05-08 10:04:40.033 Unable to read configuration file mysql.txt
2010-05-08 10:04:40.033 Empty LocalHostName.
2010-05-08 10:04:40.033 Using localhost value of myth
2010-05-08 10:04:40.037 New DB connection, total: 1
2010-05-08 10:04:40.042 Unable to connect to database!
2010-05-08 10:04:40.043 Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

To summarize, only using the upscript to start the backend fails. Any
starting with the mythbackend command from the terminal and it works fine.


mythtv at heathsworld

May 8, 2010, 10:03 AM

Post #2 of 11 (733 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On Sat, May 8, 2010 at 10:11 AM, Andrew <mythtv [at] heathsworld> wrote:

> I just upgraded to JYA .23 and now when I start mythfront is tells me it
> cannot connect to the database. What I found is the backend is showing the
> error below (BE and FE on same machine). As it turns out, when the system
> tries to start the back end it gets permission denied when trying to access
> the database. Yet if i start it as a user or root using "mythbackend"
> command it connects just fine. Did the configuration file location get
> changed or something? Obviously /.myth doesn't exist and show below.
>
> Would you like to configure the database connection now? [no]
> [console is not interactive, using default 'no']
> 2010-05-08 10:04:39.354 Deleting UPnP client...
> 2010-05-08 10:04:39.942 Failed to init MythContext, exiting.
> 2010-05-08 10:04:40.032 mythbackend version: branches/release-0-23-fixes
> [24473] www.mythtv.org
> 2010-05-08 10:04:40.032 Using runtime prefix = /usr
> 2010-05-08 10:04:40.032 Using configuration directory = /.mythtv
> 2010-05-08 10:04:40.033 Unable to read configuration file mysql.txt
> 2010-05-08 10:04:40.033 Empty LocalHostName.
> 2010-05-08 10:04:40.033 Using localhost value of myth
> 2010-05-08 10:04:40.037 New DB connection, total: 1
> 2010-05-08 10:04:40.042 Unable to connect to database!
> 2010-05-08 10:04:40.043 Driver error was [1/1045]:
> QMYSQL: Unable to connect
> Database error was:
> Access denied for user 'mythtv'@'localhost' (using password: YES)
>
> To summarize, only using the upscript to start the backend fails. Any
> starting with the mythbackend command from the terminal and it works fine.
>
>
Oddly enough, ps -aux shows the upscript running as root.

root 18020 0.5 0.6 287324 39032 ? D 11:45 0:00
/usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log

but it cannot access the database. Why would running it directly from a
root terminal work, but the upstart script running as root not work? What
happened with .23 that may have changed this and what did it change?


knowledgejunkie at gmail

May 8, 2010, 10:14 AM

Post #3 of 11 (738 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On 8 May 2010 18:03, Andrew <mythtv [at] heathsworld> wrote:
> On Sat, May 8, 2010 at 10:11 AM, Andrew <mythtv [at] heathsworld> wrote:
>>
>> I just upgraded to JYA .23 and now when I start mythfront is tells me it
>> cannot connect to the database.  What I found is the backend is showing the
>> error below (BE and FE on same machine).  As it turns out, when the system
>> tries to start the back end it gets permission denied when trying to access
>> the database.  Yet if i start it as a user or root using "mythbackend"
>> command it connects just fine.  Did the configuration file location get
>> changed or something?  Obviously /.myth doesn't exist and show below.
>>
>> Would you like to configure the database connection now? [no]
>> [console is not interactive, using default 'no']
>> 2010-05-08 10:04:39.354 Deleting UPnP client...
>> 2010-05-08 10:04:39.942 Failed to init MythContext, exiting.
>> 2010-05-08 10:04:40.032 mythbackend version: branches/release-0-23-fixes
>> [24473] www.mythtv.org
>> 2010-05-08 10:04:40.032 Using runtime prefix = /usr
>> 2010-05-08 10:04:40.032 Using configuration directory = /.mythtv
>> 2010-05-08 10:04:40.033 Unable to read configuration file mysql.txt
>> 2010-05-08 10:04:40.033 Empty LocalHostName.
>> 2010-05-08 10:04:40.033 Using localhost value of myth
>> 2010-05-08 10:04:40.037 New DB connection, total: 1
>> 2010-05-08 10:04:40.042 Unable to connect to database!
>> 2010-05-08 10:04:40.043 Driver error was [1/1045]:
>> QMYSQL: Unable to connect
>> Database error was:
>> Access denied for user 'mythtv'@'localhost' (using password: YES)
>>
>> To summarize, only using the upscript to start the backend fails.  Any
>> starting with the mythbackend command from the terminal and it works fine.
>>
>
> Oddly enough, ps -aux shows the upscript running as root.
>
> root     18020  0.5  0.6 287324 39032 ?        D    11:45   0:00
> /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log
>
> but it cannot access the database.  Why would running it directly from a
> root terminal work, but the upstart script running as root not work?  What
> happened with .23 that may have changed this and what did it change?

It's likely that $HOME is not defined in the upstart script, so it is
looking in /.mythtv/ instead of /root/.mythtv/ (or wherever your
config is stored). This issue has similarly reared its head frequently
when using the older init scripts.

Nick

--
Nick Morrott

MythTV Official wiki: http://mythtv.org/wiki/
MythTV users list archive: http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv at heathsworld

May 8, 2010, 10:38 AM

Post #4 of 11 (786 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On Sat, May 8, 2010 at 12:14 PM, Nick Morrott <knowledgejunkie [at] gmail>wrote:

> On 8 May 2010 18:03, Andrew <mythtv [at] heathsworld> wrote:
> > On Sat, May 8, 2010 at 10:11 AM, Andrew <mythtv [at] heathsworld> wrote:
> >>
> >> I just upgraded to JYA .23 and now when I start mythfront is tells me it
> >> cannot connect to the database. What I found is the backend is showing
> the
> >> error below (BE and FE on same machine). As it turns out, when the
> system
> >> tries to start the back end it gets permission denied when trying to
> access
> >> the database. Yet if i start it as a user or root using "mythbackend"
> >> command it connects just fine. Did the configuration file location get
> >> changed or something? Obviously /.myth doesn't exist and show below.
> >>
> >> Would you like to configure the database connection now? [no]
> >> [console is not interactive, using default 'no']
> >> 2010-05-08 10:04:39.354 Deleting UPnP client...
> >> 2010-05-08 10:04:39.942 Failed to init MythContext, exiting.
> >> 2010-05-08 10:04:40.032 mythbackend version: branches/release-0-23-fixes
> >> [24473] www.mythtv.org
> >> 2010-05-08 10:04:40.032 Using runtime prefix = /usr
> >> 2010-05-08 10:04:40.032 Using configuration directory = /.mythtv
> >> 2010-05-08 10:04:40.033 Unable to read configuration file mysql.txt
> >> 2010-05-08 10:04:40.033 Empty LocalHostName.
> >> 2010-05-08 10:04:40.033 Using localhost value of myth
> >> 2010-05-08 10:04:40.037 New DB connection, total: 1
> >> 2010-05-08 10:04:40.042 Unable to connect to database!
> >> 2010-05-08 10:04:40.043 Driver error was [1/1045]:
> >> QMYSQL: Unable to connect
> >> Database error was:
> >> Access denied for user 'mythtv'@'localhost' (using password: YES)
> >>
> >> To summarize, only using the upscript to start the backend fails. Any
> >> starting with the mythbackend command from the terminal and it works
> fine.
> >>
> >
> > Oddly enough, ps -aux shows the upscript running as root.
> >
> > root 18020 0.5 0.6 287324 39032 ? D 11:45 0:00
> > /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log
> >
> > but it cannot access the database. Why would running it directly from a
> > root terminal work, but the upstart script running as root not work?
> What
> > happened with .23 that may have changed this and what did it change?
>
> It's likely that $HOME is not defined in the upstart script, so it is
> looking in /.mythtv/ instead of /root/.mythtv/ (or wherever your
> config is stored). This issue has similarly reared its head frequently
> when using the older init scripts.
>
> Nick
>
> --
> Nick Morrott
>

Looks like ubuntu has committed to upstart and it's now broken with mythtv.
Using the new upstart method breaks. I can't seem to find a fix yet.

$ start mythtv-backend
start: Rejected send message, 1 matched rules; type="method_call",
sender=":1.93" (uid=1000 pid=21758 comm="start)
interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)"
requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1
comm="/sbin/init"))


sijones2010 at googlemail

May 8, 2010, 10:48 AM

Post #5 of 11 (767 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

Remove the myth script in /etc/default, there is a upstart script in
/etc/init that works fine, it just will fail while the script is in
/etc/default.


On Sat, May 8, 2010 at 6:38 PM, Andrew <mythtv [at] heathsworld> wrote:

> On Sat, May 8, 2010 at 12:14 PM, Nick Morrott <knowledgejunkie [at] gmail>wrote:
>
>> On 8 May 2010 18:03, Andrew <mythtv [at] heathsworld> wrote:
>> > On Sat, May 8, 2010 at 10:11 AM, Andrew <mythtv [at] heathsworld> wrote:
>> >>
>> >> I just upgraded to JYA .23 and now when I start mythfront is tells me
>> it
>> >> cannot connect to the database. What I found is the backend is showing
>> the
>> >> error below (BE and FE on same machine). As it turns out, when the
>> system
>> >> tries to start the back end it gets permission denied when trying to
>> access
>> >> the database. Yet if i start it as a user or root using "mythbackend"
>> >> command it connects just fine. Did the configuration file location get
>> >> changed or something? Obviously /.myth doesn't exist and show below.
>> >>
>> >> Would you like to configure the database connection now? [no]
>> >> [console is not interactive, using default 'no']
>> >> 2010-05-08 10:04:39.354 Deleting UPnP client...
>> >> 2010-05-08 10:04:39.942 Failed to init MythContext, exiting.
>> >> 2010-05-08 10:04:40.032 mythbackend version:
>> branches/release-0-23-fixes
>> >> [24473] www.mythtv.org
>> >> 2010-05-08 10:04:40.032 Using runtime prefix = /usr
>> >> 2010-05-08 10:04:40.032 Using configuration directory = /.mythtv
>> >> 2010-05-08 10:04:40.033 Unable to read configuration file mysql.txt
>> >> 2010-05-08 10:04:40.033 Empty LocalHostName.
>> >> 2010-05-08 10:04:40.033 Using localhost value of myth
>> >> 2010-05-08 10:04:40.037 New DB connection, total: 1
>> >> 2010-05-08 10:04:40.042 Unable to connect to database!
>> >> 2010-05-08 10:04:40.043 Driver error was [1/1045]:
>> >> QMYSQL: Unable to connect
>> >> Database error was:
>> >> Access denied for user 'mythtv'@'localhost' (using password: YES)
>> >>
>> >> To summarize, only using the upscript to start the backend fails. Any
>> >> starting with the mythbackend command from the terminal and it works
>> fine.
>> >>
>> >
>> > Oddly enough, ps -aux shows the upscript running as root.
>> >
>> > root 18020 0.5 0.6 287324 39032 ? D 11:45 0:00
>> > /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log
>> >
>> > but it cannot access the database. Why would running it directly from a
>> > root terminal work, but the upstart script running as root not work?
>> What
>> > happened with .23 that may have changed this and what did it change?
>>
>> It's likely that $HOME is not defined in the upstart script, so it is
>> looking in /.mythtv/ instead of /root/.mythtv/ (or wherever your
>> config is stored). This issue has similarly reared its head frequently
>> when using the older init scripts.
>>
>> Nick
>>
>> --
>> Nick Morrott
>>
>
> Looks like ubuntu has committed to upstart and it's now broken with
> mythtv. Using the new upstart method breaks. I can't seem to find a fix
> yet.
>
> $ start mythtv-backend
> start: Rejected send message, 1 matched rules; type="method_call",
> sender=":1.93" (uid=1000 pid=21758 comm="start)
> interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)"
> requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1
> comm="/sbin/init"))
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>


mythtv at heathsworld

May 8, 2010, 2:28 PM

Post #6 of 11 (741 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

That did the trick! Thanks.

If that is put there by the myth package, maybe it should be held back until
upstart works. Or fix the script. I would if I knew how.


aaron at rb303

May 17, 2010, 8:54 AM

Post #7 of 11 (680 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On Sat, May 8, 2010 at 1:48 PM, Si Jones <sijones2010 [at] googlemail> wrote:
> Remove the myth script in /etc/default, there is a upstart script in
> /etc/init that works fine, it just will fail while the script is in
> /etc/default.
>
>

I am having the exact same problem, but moving the "mythtv-backend"
script from default did not fix my problem. I still can not start the
back end.

What else should i be looking for?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


sijones2010 at googlemail

May 17, 2010, 2:10 PM

Post #8 of 11 (670 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On Mon, May 17, 2010 at 4:54 PM, Aaron <aaron [at] rb303> wrote:

> On Sat, May 8, 2010 at 1:48 PM, Si Jones <sijones2010 [at] googlemail>
> wrote:
> > Remove the myth script in /etc/default, there is a upstart script in
> > /etc/init that works fine, it just will fail while the script is in
> > /etc/default.
> >
> >
>
> I am having the exact same problem, but moving the "mythtv-backend"
> script from default did not fix my problem. I still can not start the
> back end.
>
> What else should i be looking for?
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


Do you have a myth script in /etc/init?

Should look like this

# MythTV Backend service

description "MythTV Backend"
author "Mario Limonciello <superm1 [at] ubuntu>"

start on (local-filesystems and net-device-up IFACE=lo)
stop on starting shutdown

#expect fork
respawn

script
USER=mythtv
ARGS="--logfile /var/log/mythtv/mythbackend.log --user $USER"
test -f /etc/default/mythtv-backend && . /etc/default/mythtv-backend
|| true
/usr/bin/mythbackend $ARGS
end script


and named mythtv-backend.conf


aaron at rb303

May 17, 2010, 5:58 PM

Post #9 of 11 (662 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On Mon, May 17, 2010 at 5:10 PM, Si Jones <sijones2010 [at] googlemail> wrote:
> On Mon, May 17, 2010 at 4:54 PM, Aaron <aaron [at] rb303> wrote:
>>
>> On Sat, May 8, 2010 at 1:48 PM, Si Jones <sijones2010 [at] googlemail>
>> wrote:
>> > Remove the myth script in /etc/default, there is a upstart script in
>> > /etc/init that works fine, it just will fail while the script is in
>> > /etc/default.
>> >
>> >
>>
>> I am having the exact same problem, but moving the "mythtv-backend"
>> script from default did not fix my problem. I still can not start the
>> back end.
>>
>> What else should i be looking for?
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users [at] mythtv
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
> Do you have a myth script in /etc/init?
>
> Should look like this
> # MythTV Backend service
> description     "MythTV Backend"
> author          "Mario Limonciello <superm1 [at] ubuntu>"
> start on (local-filesystems and net-device-up IFACE=lo)
> stop on starting shutdown
> #expect fork
> respawn
> script
>         USER=mythtv
>         ARGS="--logfile /var/log/mythtv/mythbackend.log --user $USER"
>         test -f /etc/default/mythtv-backend && . /etc/default/mythtv-backend
> || true
>         /usr/bin/mythbackend $ARGS
> end script
>
> and named mythtv-backend.conf
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>

Yeah, I made two mistakes, first i was looking in "init.d"
second was after i moved the file out of /etc/default it still
wouldn't start, but in rebooting ubuntu it did work.

I think i'm good now.

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


jyavenard at gmail

May 17, 2010, 9:52 PM

Post #10 of 11 (662 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

Hi

On 18 May 2010 07:10, Si Jones <sijones2010 [at] googlemail> wrote:
> Should look like this
> # MythTV Backend service
> description     "MythTV Backend"
> author          "Mario Limonciello <superm1 [at] ubuntu>"
> start on (local-filesystems and net-device-up IFACE=lo)
> stop on starting shutdown
> #expect fork
> respawn
> script
>         USER=mythtv
>         ARGS="--logfile /var/log/mythtv/mythbackend.log --user $USER"
>         test -f /etc/default/mythtv-backend && . /etc/default/mythtv-backend
> || true
>         /usr/bin/mythbackend $ARGS
> end script
>

I changed
/usr/bin/mythbackend $ARGS
with
HOME=/home/mythtv /usr/bin/mythbackend $ARGS

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


mtdean at thirdcontact

May 18, 2010, 7:04 AM

Post #11 of 11 (644 views)
Permalink
Re: mythbackend does not have access to mysql.txt after .22 upgrade to .23 [In reply to]

On 05/18/2010 12:52 AM, Jean-Yves Avenard wrote:
> On 18 May 2010 07:10, Si Jones wrote:
>
>> Should look like this
>> # MythTV Backend service
>> description "MythTV Backend"
>> author "Mario Limonciello"
>> start on (local-filesystems and net-device-up IFACE=lo)
>> stop on starting shutdown
>> #expect fork
>> respawn
>> script
>> USER=mythtv
>> ARGS="--logfile /var/log/mythtv/mythbackend.log --user $USER"
>> test -f /etc/default/mythtv-backend&& . /etc/default/mythtv-backend
>> || true
>> /usr/bin/mythbackend $ARGS
>> end script
>>
> I changed
> /usr/bin/mythbackend $ARGS
> with
> HOME=/home/mythtv /usr/bin/mythbackend $ARGS
>
> problem solved
>

And note that once you all update to r24669 or higher (trunk or
0.23-fixes), you'll actually get a useful error message that explains
you haven't set a HOME directory.

Qt4 made a change to some functionality, but the documentation still
insists it provides the same-as-Qt3 functionality. This prevented our
"no HOME" detection from working properly. We've updated MythTV to now
work with the changed Qt code.

Mike
_______________________________________________
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.