You are not logged in.

#1 2010-12-21 18:49:11

wilberfan
Member
From: So. Cal
Registered: 2010-12-18
Posts: 264

MythTV: mythbackend won't start as daemon

I just installed the latest MythTV and adding mythbackend to the DAEMONS= to /etc/rc.conf doesn't seem to work.   I also tried adding HOME="/root" to rc.conf as suggested in the Wiki.

I can start mythbackend from a command line after logging in... 

Any suggestions would be appreciated!


Hey, be nice...I'm new at this!

Offline

#2 2010-12-21 19:31:29

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,929
Website

Re: MythTV: mythbackend won't start as daemon

What have you got in /etc/rc.d? and in daemons [rc.conf]

MrG


Mr Green

Offline

#3 2010-12-21 19:48:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: MythTV: mythbackend won't start as daemon

Post the output of

$ mythbackend

I'm thinking something isn't setup properly and that your backend starts, but dies.  If you run it manually as I show above, it should stay running indefinitely.  If however it stops and you're back at the shell prompt, you haven't setup something properly.  Also, I trust that you haven't run any of the myth scripts as root, right?

Last edited by graysky (2010-12-21 19:49:08)

Offline

#4 2010-12-21 20:46:57

wilberfan
Member
From: So. Cal
Registered: 2010-12-18
Posts: 264

Re: MythTV: mythbackend won't start as daemon

graysky wrote:

Post the output of

$ mythbackend

I'm thinking something isn't setup properly and that your backend starts, but dies.  If you run it manually as I show above, it should stay running indefinitely.  If however it stops and you're back at the shell prompt, you haven't setup something properly.  Also, I trust that you haven't run any of the myth scripts as root, right?

Dude, I'm new at this!  Running mythscripts as root is ENTIRELY possible...  [embarassed]

Running $ mythbackend from a terminal window will run indefinitely, yes...  Here is some output:

 $ mythbackend
2010-12-21 12:38:50.122 mythbackend version: exported [0.24] www.mythtv.org
2010-12-21 12:38:50.122 Using runtime prefix = /usr
2010-12-21 12:38:50.123 Using configuration directory = /home/wilberfan/.mythtv
2010-12-21 12:38:50.123 Using localhost value of MYCOOLMYTHTVHOST
2010-12-21 12:38:50.128 New DB connection, total: 1
2010-12-21 12:38:50.131 Connected to database 'mythconverg' at host: 127.0.0.1
2010-12-21 12:38:50.134 Closing DB connection named 'DBManager0'
2010-12-21 12:38:50.134 Connected to database 'mythconverg' at host: 127.0.0.1
2010-12-21 12:38:50.135 Current locale en_US
2010-12-21 12:38:50.135 Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2010-12-21 12:38:50.140 Current MythTV Schema Version (DBSchemaVer): 1264
2010-12-21 12:38:50.143 ThreadPool:HTTP: Initial 1, Max 25, Timeout 60000
2010-12-21 12:38:50.145 MediaServer:: Loopback address specified - 127.0.0.1. Disabling UPnP
2010-12-21 12:38:50.146 MythBackend: Starting up as the master server.
2010-12-21 12:38:50.147 New DB connection, total: 2
2010-12-21 12:38:50.148 Connected to database 'mythconverg' at host: 127.0.0.1
2010-12-21 12:38:50.149 New DB connection, total: 3
2010-12-21 12:38:50.149 Connected to database 'mythconverg' at host: 127.0.0.1
2010-12-21 12:38:50.183 New DB scheduler connection
2010-12-21 12:38:50.183 Connected to database 'mythconverg' at host: 127.0.0.1
2010-12-21 12:38:50.183 Scheduler, Warning: Listings source '' is defined, but is not attached to a card input.
2010-12-21 12:38:50.184 Main::Registering HttpStatus Extension
2010-12-21 12:38:50.184 Enabled verbose msgs:  important general
2010-12-21 12:38:50.189 AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min
2010-12-21 12:38:53.185 Reschedule requested for id -1.
2010-12-21 12:38:53.239 Scheduled 0 items in 0.1 = 0.00 match + 0.05 place
2010-12-21 12:38:53.241 Seem to be woken up by USER 

Here is the contents of my /etc/rc.d:

 -rwxr-xr-x 1 root root  559 Apr 18  2010 adsl
-rwxr-xr-x 1 root root 1252 Nov 15 08:56 alsa
-rwxr-xr-x 1 root root 1824 Nov 18 16:55 avahi-daemon
-rwxr-xr-x 1 root root 1763 Nov 18 16:55 avahi-dnsconfd
-rwxr-xr-x 1 root root  787 Feb 23  2010 crond
-rwxr-xr-x 1 root root 1324 Sep 13 03:48 dbus
-rwxr-xr-x 1 root root  637 Oct 11 17:53 fancontrol
-rw-r--r-- 1 root root 6666 Nov 20 03:27 functions
drwxr-xr-x 2 root root 4096 Nov 20 03:27 functions.d
-rwxr-xr-x 1 root root 1189 Dec 18 12:04 git-daemon
-rwxr-xr-x 1 root root  737 Nov 20 00:16 gpm
-rwxr-xr-x 1 root root 1160 Nov 28 15:13 hal
-rwxr-xr-x 1 root root  894 Oct 11 17:53 healthd
-rwxr-xr-x 1 root root  770 Dec  3 01:54 heimdal-kdc
-rwxr-xr-x 1 root root 1121 Oct 21 02:08 httpd
-rwxr-xr-x 1 root root  654 Nov 28 21:12 irexecd
-rwxr-xr-x 1 root root  781 Dec  3 01:54 kadmind
-rwxr-xr-x 1 root root  775 Dec  3 01:54 kpasswd
-rwxr-xr-x 1 root root 2236 Nov  4 03:45 lighttpd
-rwxr-xr-x 1 root root 1163 Nov 28 21:12 lircd
-rwxr-xr-x 1 root root  605 Nov 28 21:12 lircmd
-rwxr-xr-x 1 root root  674 Aug 31 23:48 mdadm
-rwxr-xr-x 1 root root  647 Nov 10 18:00 mtd
-rwxr-xr-x 1 root root 1594 Oct  7 02:14 mysqld
-rwxr-xr-x 1 root root 2010 Nov 10 17:49 mythbackend
-rwxr-xr-x 1 root root  829 Nov 20 03:27 netfs
-rwxr-xr-x 1 root root 5389 Nov 20 03:27 network
-rwxr-xr-x 1 root root  774 Oct 25 09:07 nscd
-rwxr-xr-x 1 root root  587 Jan 31  2010 ppp
-rwxr-xr-x 1 root root  726 Aug  2 00:48 rpcbind
-rwxr-xr-x 1 root root  638 Oct 11 17:53 sensord
-rwxr-xr-x 1 root root 2801 Oct 11 17:53 sensors
-rwxr-xr-x 1 root root  783 Dec  3 05:17 syslog-ng 

Here's the DAEMONS line from my rc.conf:

 DAEMONS=(syslog-ng dbus hal network netfs crond alsa mysqld lircd mythbackend) 

Hey, be nice...I'm new at this!

Offline

#5 2010-12-21 21:44:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: MythTV: mythbackend won't start as daemon

From the output, looks like there are no problems.... does the mythbackend stay running or does it quit after say 30 seconds?  If it doesn't quit (stays running), do this (as root)

# /etc/rc.d/mythbackend stop
# /etc/rc.d/mythbackend start

Now wait 30 sec, then post the /var/log/mythbackend.log

Last edited by graysky (2010-12-21 21:49:34)

Offline

#6 2010-12-21 23:21:59

wilberfan
Member
From: So. Cal
Registered: 2010-12-18
Posts: 264

Re: MythTV: mythbackend won't start as daemon

It looks like it quits right away (unless run from a command-line): 

Here's my /var/log/mythbackend.log

 2010-12-21 15:19:08.427 mythbackend version: exported [0.24] www.mythtv.org
2010-12-21 15:19:08.464 Using runtime prefix = /usr
2010-12-21 15:19:08.505 Using configuration directory = /root/.mythtv
2010-12-21 15:19:08.539 Unable to read configuration file mysql.txt
2010-12-21 15:19:08.572 Empty LocalHostName.
2010-12-21 15:19:08.605 Using localhost value of intel-arch
2010-12-21 15:19:08.644 New DB connection, total: 1
2010-12-21 15:19:08.683 Connected to database 'mythconverg' at host: localhost
2010-12-21 15:19:08.717 Closing DB connection named 'DBManager0'
2010-12-21 15:19:08.748 Connected to database 'mythconverg' at host: localhost
2010-12-21 15:19:08.773 Current locale en_US
2010-12-21 15:19:08.797 Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2010-12-21 15:19:08.827 Current MythTV Schema Version (DBSchemaVer): 1264
2010-12-21 15:19:08.857 MediaServer:: No BackendServerIP Address defined
No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings. 

Hey, be nice...I'm new at this!

Offline

#7 2010-12-21 23:38:37

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: MythTV: mythbackend won't start as daemon

The difference is that when you start it as a daemon, the root user is owning it.

"Using configuration directory = /root/.mythtv"

Do this as root:

# rm -rf /root/.mythtv
# cp -a /home/wilberfan/.mythtv /root
# chown root:root -R /root/.mythtv

Last edited by graysky (2010-12-21 23:41:08)

Offline

#8 2010-12-21 23:41:02

wilberfan
Member
From: So. Cal
Registered: 2010-12-18
Posts: 264

Re: MythTV: mythbackend won't start as daemon

graysky wrote:

The difference is that when you start it as a daemon, the root user is owning it.

"Using configuration directory = /root/.mythtv"

Do this as root:

# rm -rf /root/.mythtv
# cp -a /home/mythtv/.mythtv /root
# chown root:root -R /root/.mythtv

# cp -a /home/mythtv/.mythtv /root
cp: cannot stat `/home/mythtv/.mythtv': No such file or directory

[Edit]  (See previous edited response)

Last edited by wilberfan (2010-12-21 23:51:06)


Hey, be nice...I'm new at this!

Offline

#9 2010-12-21 23:41:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: MythTV: mythbackend won't start as daemon

Yeah sorry, typeo - I just edited my post tongue

You're just copying your .mythtv to the root user.

Last edited by graysky (2010-12-21 23:41:54)

Offline

#10 2010-12-21 23:52:27

wilberfan
Member
From: So. Cal
Registered: 2010-12-18
Posts: 264

Re: MythTV: mythbackend won't start as daemon

I wondered about the correctness of the original post!

The good news is -- IT WORKS NOW!  smile

Thanks so much for your help...


Hey, be nice...I'm new at this!

Offline

#11 2010-12-22 18:35:31

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: MythTV: mythbackend won't start as daemon

"No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings."

You just needed to run mythtv-setup and set the local IP. (mythtv-setup is a GUI and wants mythbackend stopped before it will run.)

Offline

Board footer

Powered by FluxBB