[mythtv-users] Brand new install - Mythbackend doesn't start

Ashu Desai ashu.desai at gmail.com
Wed Aug 2 20:23:28 UTC 2017


On Wed, Aug 2, 2017 at 2:25 AM, Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:

> On Wed, 2 Aug 2017 01:03:17 -0500, you wrote:
>
> >On Tue, Aug 1, 2017 at 11:10 PM, Mark Perkins <perkins1724 at hotmail.com>
> >wrote:
> >
> >> On 2 August 2017 1:17:13 pm Ashu Desai <ashu.desai at gmail.com> wrote:
> >>
> >> > On Tue, Aug 1, 2017 at 8:45 PM, Hika van den Hoven <hikavdh at gmail.com
> >
> >> > wrote:
> >> >
> >> >> Did you check on mysql/mariadb responding to the external ip (check
> >> >> the wiki on how to do this.
> >> >>
> >> >> The frontend/backend are on the same box - and there isn't any
> external
> >> > IP. i am testing everything all from home network.
> >> > Here's what I did find though:
> >> >
> >> > ---------------
> >> > Aug  1 22:27:32 mythmaster systemd: Started MythTV backend service.
> >> > Aug  1 22:27:32 mythmaster systemd: Starting MythTV backend service...
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824647 C
> >> >  mythbackend version: fixes/0.28 [v28.0-35-g812ec08] www.mythtv.org
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824669 C
> Qt
> >> > version: compile: 5.6.1, runtime: 5.6.1
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824671 N
> >> >  Enabled verbose msgs:  general
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824938 N
> >> >  Setting Log Level to LOG_INFO
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.837289 I
> >> Added
> >> > logging to the console
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838125 I
> >> Setup
> >> > Interrupt handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838131 I
> >> Setup
> >> > Terminated handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838136 I
> >> Setup
> >> > Segmentation fault handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838138 I
> >> Setup
> >> > Aborted handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838142 I
> >> Setup
> >> > Bus error handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838150 I
> >> Setup
> >> > Floating point exception handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838152 I
> >> Setup
> >> > Illegal instruction handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838160 I
> >> Setup
> >> > Real-time signal 0 handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838165 I
> >> Setup
> >> > Hangup handler
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838198 N
> >> Read
> >> > conf dir = /etc/mythtv
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838229 N
> >> Using
> >> > runtime prefix = /usr
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838231 N
> >> Using
> >> > configuration directory = /etc/mythtv
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838288 I
> >> >  Assumed character encoding: en_US.UTF-8
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838604 E
> >> Error
> >> > parsing: /etc/mythtv/config.xml at line: 1  column: 1
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838607 E
> >> Error
> >> > Msg: unexpected end of file
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838666 E
> >> >  DBHostName is not set in config.xml
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838674 E
> >> >  DBHostName is not set in config.xml
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838687 N
> >> Empty
> >> > LocalHostName.
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838693 I
> >> Using
> >> > localhost value of mythmaster.localdomain
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.848276 N
> >> >  Setting QT default locale to en_US
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.848287 I
> >> >  Current locale en_US
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.848497 N
> >> >  Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.852404 I
> >> >  Loading en_us translation for module mythfrontend
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.858057 I
> >> >  Current MythTV Schema Version (DBSchemaVer): 1344
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.858296 I
> >> >  Loading en_us translation for module mythfrontend
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.860040 N
> >> >  MythBackend: Starting up as the master server.
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.860795 W
> >> >  MythBackend: No valid capture cards are defined in the database.
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.861100 E
> >> >  Scheduler: No capture cards are defined in the database.
> >> > Aug  1 22:27:32 mythmaster mythbackend: Perhaps you should re-read the
> >> > installation instructions?
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.861186 E
> >> Error
> >> > parsing: /etc/mythtv/config.xml at line: 1  column: 1
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.861188 E
> >> Error
> >> > Msg: unexpected end of file
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.940295 I
> >> Added
> >> > logging to /var/log/mythtv/mythbackend.20170802032732.23638.log
> >> > Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.945104 I
> >> >  Removed logging to /var/log/mythtv/mythbackend.
> 20170802032732.23638.log
> >> > Aug  1 22:27:32 mythmaster systemd: mythbackend.service: main process
> >> > exited, code=exited, status=1/FAILURE
> >> > Aug  1 22:27:32 mythmaster systemd: Unit mythbackend.service entered
> >> failed
> >> > state.
> >> > Aug  1 22:27:32 mythmaster systemd: mythbackend.service failed.
> >> >
> >> > --------------
> >> >
> >> > I am running this as root - so i thought the dir should show
> >> /root/.mythtv/
> >> > Looking at the dir, there is no "config.xml" under /etc/mythtv
> >> >
> >> > Maybe because I never ran this as anything but root?
> >> >
> >> >
> >> > [root at mythmaster ~]# ls -ahl /etc/mythtv/
> >> > total 32K
> >> > drwxr-xr-x.   6 mythtv mythtv 4.0K Aug  1 22:27 .
> >> > drwxr-xr-x. 140 root   root    12K Aug  1 22:23 ..
> >> > drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 3rdParty
> >> > drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 channels
> >> > -rw-r--r--.   1 mythtv mythtv    0 Aug  1 22:27 config.xml
> >> > drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 themes
> >> > drwxr-xr-x.   3 mythtv mythtv 4.0K Aug  1 20:00 tmp
> >> >
> >> > I looked into the config file - it was empty. So i created a link (ln
> -s)
> >> > from /root/.mythtv/config.xml to /etc/mythtv
> >> >
> >> > That didn't work either.
> >> >
> >> >
> >> >> Also, try to bottom post, this to keep the thread readable for future
> >> >> readers. Check the etiquettes.
> >> >>
> >> >>
> >> > Apologies.
> >> >
> >> >> _______________________________________________
> >> >> mythtv-users mailing list
> >> >> mythtv-users at mythtv.org
> >> >> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> >> >> http://wiki.mythtv.org/Mailing_List_etiquette
> >> >> MythTV Forums: https://forum.mythtv.org
> >> >>
> >> >
> >> >
> >> >
> >> > ----------
> >> > _______________________________________________
> >> > mythtv-users mailing list
> >> > mythtv-users at mythtv.org
> >> > http://lists.mythtv.org/mailman/listinfo/mythtv-users
> >> > http://wiki.mythtv.org/Mailing_List_etiquette
> >> > MythTV Forums: https://forum.mythtv.org
> >> >
> >>
> >> Are you sure the BE is running as root? Are you using systemd? What is
> in
> >> your service file?
> >>
> >
> >Sorry - sent email to Mark by accident:
> >
> >Systemd? Yes
> >
> >[root at mythmaster ~]# pstree -p | grep system
> >systemd(1)-+-ModemManager(578)-+-{ModemManager}(604)
> >           |-systemd-journal(366)
> >           |-systemd-logind(584)
> >           |-systemd-udevd(397)
> >
> >
> >Not sure how to find out if BE is running as root. If you mean under the
> >mythbackend.service file - ( vi /usr/lib/systemd/system/
> mythbackend.service)
> >-- then I tried both here:
> ># systemd changes execution from the calling user (possibly root) to this
> >user
> ># if you have permissions problems or obscure errors try logging in as
> >mythtv
> >User=mythtv
> >#User=root
> >
> >I had commented out "user=mythtv" and put root instead - but that didn't
> >change anything.
> >
> >What's in it - what was default i believe:
> >
> >[Unit]
> >Description=MythTV backend service
> >After=network-online.target mariadb.service mysqld.service
> time-sync.target
> ># Uncomment the following line if you will be using the mythweb plugin on
> >the
> ># same system as mythbackend.
> >#Wants=httpd.service
> >
> >[Service]
> ># Type=simple is recommended. If using Type=forking you will need to
> >specify a
> ># pidfile so systemd knows how to find the forked process PID, otherwise
> it
> ># presumes that the process being started will be the remaining process.
> >#Type=forking
> >Type=simple
> >Environment=MYTHCONFDIR=/etc/mythtv
> >
> ># systemd changes execution from the calling user (possibly root) to this
> >user
> ># if you have permissions problems or obscure errors try logging in as
> >mythtv
> >User=mythtv
> >#User=root
> ># Uncomment one of the following...
> ># Use sysloging rather than separate logging:
> >#ExecStart=/usr/bin/mythbackend --syslog local7
> ># If Type=forking is set you must specify the --daemon and --pidfile
> >options:
> >#ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv
> >--loglevel crit --pidfile /run/mythbackend.pid
> ># Default setting for Type=simple.
> >ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv
> >
> >[Install]
> >WantedBy=multi-user.target
> >
> >--------------------------------
> >
> >Also noticed that since the path is /etc/mythtv (not /root/.mythtv)
> >the permissions are:
> >[root at mythmaster ~]# ls -ahl /etc/mythtv
> >total 36K
> >drwxr-xr-x.   6 mythtv mythtv 4.0K Aug  1 22:44 .
> >drwxr-xr-x. 140 root   root    12K Aug  1 22:23 ..
> >drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 3rdParty
> >drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 channels
> >-rw-r--r--.   1 mythtv mythtv  513 Aug  1 22:44 config.xml
> >-rw-r--r--.   1 root   root      0 Aug  1 22:43 config.xml.old
> >drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 themes
> >drwxr-xr-x.   3 mythtv mythtv 4.0K Aug  1 20:00 tmp
> >
> >
> >Wondering if there is a need to change either the path or permissions?
>
> The normal way to run mythbackend is to have it run as the mythtv
> user.  I have never run it as root, but it may not be intended to run
> that way and it could cause complications.  You do have to have a
> mythtv user on the system for that to work, but it does not have to be
> a login enabled user.  The default is to also have a mythtv group (to
> which the mythtv user and any user that runs mythfrontend must
> belong).  Then you put all the things that mythbackend needs in the
> /home/mythtv/.mythtv directory, such as config.xml and the channels
> directory with all the channel icon files.  If you want to have just
> one config.xml file, then you can put that in /etc/mythtv and ln -s to
> it from all the /home/<username>/.mythtv directories.
>

Created another VM - same issue even when doing mythtv as the user and
running as mythtv.

Works if backend IP is 127.0.0.1 but not otherwise.



>
> This is what a good config.xml file looks like (copied from my test PC
> which was installed as a 0.28 system a few months ago):
>
> <Configuration>
>   <Database>
>     <PingHost>1</PingHost>
>     <Host>10.0.2.12</Host>
>     <UserName>mythtv</UserName>
>     <Password>********</Password>
>     <DatabaseName>mythconverg</DatabaseName>
>     <Port>3306</Port>
>   </Database>
>   <WakeOnLAN>
>     <Enabled>0</Enabled>
>     <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
>     <SQLConnectRetry>5</SQLConnectRetry>
>     <Command>echo 'WOLsqlServerCommand not set'</Command>
>   </WakeOnLAN>
> </Configuration>
>
>


> There are some other things that can be added to the config.xml file
> by mythfrontend, but those settings are what is wanted by mythbackend.
> Fill in the correct names, addresses and password for your system. You
> may or may not need the pinghost option set on - I have it on because
> I am connecting via the external IP address for the PC, not localhost,
> so I do not want mythbackend to try to connect until that address is
> pingable.
>
> There are different older formats for config.xml that also seem to
> still work, but I believe the above is the current format.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>



-- 
http://about.me/adesai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20170802/2a8381ae/attachment.html>


More information about the mythtv-users mailing list