<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 2, 2017 at 5:48 AM, Mike Perkins <span dir="ltr"><<a href="mailto:mikep@randomtraveller.org.uk" target="_blank">mikep@randomtraveller.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 02/08/17 08:25, Stephen Worthington wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 2 Aug 2017 01:03:17 -0500, you wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Aug 1, 2017 at 11:10 PM, Mark Perkins <<a href="mailto:perkins1724@hotmail.com" target="_blank">perkins1724@hotmail.com</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2 August 2017 1:17:13 pm Ashu Desai <<a href="mailto:ashu.desai@gmail.com" target="_blank">ashu.desai@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Aug 1, 2017 at 8:45 PM, Hika van den Hoven <<a href="mailto:hikavdh@gmail.com" target="_blank">hikavdh@gmail.com</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Did you check on mysql/mariadb responding to the external ip (check<br>
the wiki on how to do this.<br>
<br>
The frontend/backend are on the same box - and there isn't any external<br>
</blockquote>
IP. i am testing everything all from home network.<br>
Here's what I did find though:<br>
<br>
---------------<br>
Aug  1 22:27:32 mythmaster systemd: Started MythTV backend service.<br>
Aug  1 22:27:32 mythmaster systemd: Starting MythTV backend service...<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824647 C<br>
 mythbackend version: fixes/0.28 [v28.0-35-g812ec08] <a href="http://www.mythtv.org" rel="noreferrer" target="_blank">www.mythtv.org</a><br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824669 C  Qt<br>
version: compile: 5.6.1, runtime: 5.6.1<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824671 N<br>
 Enabled verbose msgs:  general<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.824938 N<br>
 Setting Log Level to LOG_INFO<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.837289 I<br>
</blockquote>
Added<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
logging to the console<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838125 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Interrupt handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838131 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Terminated handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838136 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Segmentation fault handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838138 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Aborted handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838142 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Bus error handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838150 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Floating point exception handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838152 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Illegal instruction handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838160 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Real-time signal 0 handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838165 I<br>
</blockquote>
Setup<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hangup handler<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838198 N<br>
</blockquote>
Read<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
conf dir = /etc/mythtv<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838229 N<br>
</blockquote>
Using<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
runtime prefix = /usr<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838231 N<br>
</blockquote>
Using<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
configuration directory = /etc/mythtv<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838288 I<br>
 Assumed character encoding: en_US.UTF-8<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838604 E<br>
</blockquote>
Error<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
parsing: /etc/mythtv/config.xml at line: 1  column: 1<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838607 E<br>
</blockquote>
Error<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Msg: unexpected end of file<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838666 E<br>
 DBHostName is not set in config.xml<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838674 E<br>
 DBHostName is not set in config.xml<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838687 N<br>
</blockquote>
Empty<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
LocalHostName.<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.838693 I<br>
</blockquote>
Using<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
localhost value of mythmaster.localdomain<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.848276 N<br>
 Setting QT default locale to en_US<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.848287 I<br>
 Current locale en_US<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.848497 N<br>
 Reading locale defaults from /usr/share/mythtv//locales/en_<wbr>us.xml<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.852404 I<br>
 Loading en_us translation for module mythfrontend<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.858057 I<br>
 Current MythTV Schema Version (DBSchemaVer): 1344<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.858296 I<br>
 Loading en_us translation for module mythfrontend<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.860040 N<br>
 MythBackend: Starting up as the master server.<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.860795 W<br>
 MythBackend: No valid capture cards are defined in the database.<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.861100 E<br>
 Scheduler: No capture cards are defined in the database.<br>
Aug  1 22:27:32 mythmaster mythbackend: Perhaps you should re-read the<br>
installation instructions?<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.861186 E<br>
</blockquote>
Error<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
parsing: /etc/mythtv/config.xml at line: 1  column: 1<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.861188 E<br>
</blockquote>
Error<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Msg: unexpected end of file<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.940295 I<br>
</blockquote>
Added<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
logging to /var/log/mythtv/mythbackend.20<wbr>170802032732.23638.log<br>
Aug  1 22:27:32 mythmaster mythbackend: 2017-08-01 22:27:32.945104 I<br>
 Removed logging to /var/log/mythtv/mythbackend.20<wbr>170802032732.23638.log<br>
Aug  1 22:27:32 mythmaster systemd: mythbackend.service: main process<br>
exited, code=exited, status=1/FAILURE<br>
Aug  1 22:27:32 mythmaster systemd: Unit mythbackend.service entered<br>
</blockquote>
failed<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
state.<br>
Aug  1 22:27:32 mythmaster systemd: mythbackend.service failed.<br>
<br>
--------------<br>
<br>
I am running this as root - so i thought the dir should show<br>
</blockquote>
/root/.mythtv/<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Looking at the dir, there is no "config.xml" under /etc/mythtv<br>
<br>
Maybe because I never ran this as anything but root?<br>
<br>
<br>
[root@mythmaster ~]# ls -ahl /etc/mythtv/<br>
total 32K<br>
drwxr-xr-x.   6 mythtv mythtv 4.0K Aug  1 22:27 .<br>
drwxr-xr-x. 140 root   root    12K Aug  1 22:23 ..<br>
drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 3rdParty<br>
drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 channels<br>
-rw-r--r--.   1 mythtv mythtv    0 Aug  1 22:27 config.xml<br>
drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 themes<br>
drwxr-xr-x.   3 mythtv mythtv 4.0K Aug  1 20:00 tmp<br>
<br>
I looked into the config file - it was empty. So i created a link (ln -s)<br>
from /root/.mythtv/config.xml to /etc/mythtv<br>
<br>
That didn't work either.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, try to bottom post, this to keep the thread readable for future<br>
readers. Check the etiquettes.<br>
<br>
<br>
</blockquote>
Apologies.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<wbr>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailma<wbr>n/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing<wbr>_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
<br>
</blockquote>
<br>
<br>
<br>
----------<br>
______________________________<wbr>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailma<wbr>n/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing<wbr>_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
<br>
</blockquote>
<br>
Are you sure the BE is running as root? Are you using systemd? What is in<br>
your service file?<br>
<br>
</blockquote>
<br>
Sorry - sent email to Mark by accident:<br>
<br>
Systemd? Yes<br>
<br>
[root@mythmaster ~]# pstree -p | grep system<br>
systemd(1)-+-ModemManager(578)<wbr>-+-{ModemManager}(604)<br>
          |-systemd-journal(366)<br>
          |-systemd-logind(584)<br>
          |-systemd-udevd(397)<br>
<br>
<br>
Not sure how to find out if BE is running as root. If you mean under the<br>
mythbackend.service file - ( vi /usr/lib/systemd/system/mythba<wbr>ckend.service)<br>
-- then I tried both here:<br>
# systemd changes execution from the calling user (possibly root) to this<br>
user<br>
# if you have permissions problems or obscure errors try logging in as<br>
mythtv<br>
User=mythtv<br>
#User=root<br>
<br>
I had commented out "user=mythtv" and put root instead - but that didn't<br>
change anything.<br>
<br>
What's in it - what was default i believe:<br>
<br>
[Unit]<br>
Description=MythTV backend service<br>
After=network-online.target mariadb.service mysqld.service time-sync.target<br>
# Uncomment the following line if you will be using the mythweb plugin on<br>
the<br>
# same system as mythbackend.<br>
#Wants=httpd.service<br>
<br>
[Service]<br>
# Type=simple is recommended. If using Type=forking you will need to<br>
specify a<br>
# pidfile so systemd knows how to find the forked process PID, otherwise it<br>
# presumes that the process being started will be the remaining process.<br>
#Type=forking<br>
Type=simple<br>
Environment=MYTHCONFDIR=/etc/m<wbr>ythtv<br>
<br>
# systemd changes execution from the calling user (possibly root) to this<br>
user<br>
# if you have permissions problems or obscure errors try logging in as<br>
mythtv<br>
User=mythtv<br>
#User=root<br>
# Uncomment one of the following...<br>
# Use sysloging rather than separate logging:<br>
#ExecStart=/usr/bin/mythbacken<wbr>d --syslog local7<br>
# If Type=forking is set you must specify the --daemon and --pidfile<br>
options:<br>
#ExecStart=/usr/bin/mythbacken<wbr>d --daemon --logpath /var/log/mythtv<br>
--loglevel crit --pidfile /run/mythbackend.pid<br>
# Default setting for Type=simple.<br>
ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
------------------------------<wbr>--<br>
<br>
Also noticed that since the path is /etc/mythtv (not /root/.mythtv)<br>
the permissions are:<br>
[root@mythmaster ~]# ls -ahl /etc/mythtv<br>
total 36K<br>
drwxr-xr-x.   6 mythtv mythtv 4.0K Aug  1 22:44 .<br>
drwxr-xr-x. 140 root   root    12K Aug  1 22:23 ..<br>
drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 3rdParty<br>
drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 channels<br>
-rw-r--r--.   1 mythtv mythtv  513 Aug  1 22:44 config.xml<br>
-rw-r--r--.   1 root   root      0 Aug  1 22:43 config.xml.old<br>
drwxr-xr-x.   2 mythtv mythtv 4.0K Aug  1 20:00 themes<br>
drwxr-xr-x.   3 mythtv mythtv 4.0K Aug  1 20:00 tmp<br>
<br>
<br>
Wondering if there is a need to change either the path or permissions?<br>
</blockquote>
<br>
The normal way to run mythbackend is to have it run as the mythtv<br>
user.  I have never run it as root, but it may not be intended to run<br>
that way and it could cause complications.  You do have to have a<br>
mythtv user on the system for that to work, but it does not have to be<br>
a login enabled user.  The default is to also have a mythtv group (to<br>
which the mythtv user and any user that runs mythfrontend must<br>
belong).  Then you put all the things that mythbackend needs in the<br>
/home/mythtv/.mythtv directory, such as config.xml and the channels<br>
directory with all the channel icon files.  If you want to have just<br>
one config.xml file, then you can put that in /etc/mythtv and ln -s to<br>
it from all the /home/<username>/.mythtv directories.<br>
<br>
This is what a good config.xml file looks like (copied from my test PC<br>
which was installed as a 0.28 system a few months ago):<br>
<br>
<Configuration><br>
  <Database><br>
    <PingHost>1</PingHost><br>
    <Host>10.0.2.12</Host><br>
    <UserName>mythtv</UserName><br>
    <Password>********</Password><br>
    <DatabaseName>mythconverg</Dat<wbr>abaseName><br>
    <Port>3306</Port><br>
  </Database><br>
  <WakeOnLAN><br>
    <Enabled>0</Enabled><br>
    <SQLReconnectWaitTime>0</SQLRe<wbr>connectWaitTime><br>
    <SQLConnectRetry>5</SQLConnect<wbr>Retry><br>
    <Command>echo 'WOLsqlServerCommand not set'</Command><br>
  </WakeOnLAN><br>
</Configuration><br>
<br>
There are some other things that can be added to the config.xml file<br>
by mythfrontend, but those settings are what is wanted by mythbackend.<br>
Fill in the correct names, addresses and password for your system. You<br>
may or may not need the pinghost option set on - I have it on because<br>
I am connecting via the external IP address for the PC, not localhost,<br>
so I do not want mythbackend to try to connect until that address is<br>
pingable.<br>
<br>
There are different older formats for config.xml that also seem to<br>
still work, but I believe the above is the current format.<br>
<br>
</blockquote></div></div>
I beg to differ. This is mine:<br>
<br>
mythtv@jade:/home/mythtv# cat /etc/mythtv/config.xml<br>
<Configuration><br>
  <LocalHostName><a href="http://jade.example.com" rel="noreferrer" target="_blank">jade.example.co<wbr>m</a></LocalHostName><br>
  <Database><br>
    <PingHost>1</PingHost><br>
    <Host>192.168.NNN.NNN</Host><br>
    <UserName>mythtv</UserName><br>
    <Password>XXXXXXXXXX</Password<wbr>><span class=""><br>
    <DatabaseName>mythconverg</Dat<wbr>abaseName><br>
    <Port>3306</Port><br>
  </Database><br>
  <WakeOnLAN><br>
    <Enabled>0</Enabled><br>
    <SQLReconnectWaitTime>0</SQLRe<wbr>connectWaitTime><br>
    <SQLConnectRetry>5</SQLConnect<wbr>Retry><br>
    <Command>echo 'WOLsqlServerCommand not set'</Command><br>
  </WakeOnLAN><br>
</Configuration><br>
<br></span>
mythtv@jade:/home/mythtv#<br>
<br>
That LocalHostName entry is important. /Some/ of the checking that reads the file uses the hostname (jade) for the 'Hostname' entries in the database and /some/ of the checking uses the fully qualified domain name [FQDN] (<a href="http://jade.example.com" rel="noreferrer" target="_blank">jade.example.com</a>).<br>
<br>
(I forgot during a recent upgrade and ended up with the backend using one and the frontend using the other. Hilarity ensued? Er, no.)<br>
<br>
It is best to make certain that the system knows what the host is called by specifying a LocalHostName entry. It doesn't matter what it is; you can use the hostname, the FQDN or anything else that is unique on your system.<br></blockquote><div><br></div><div>Is there a way to do this? I know we can do this if i log in to mythconverg db and use the database but wondering if there is a file I need to modify otherwise to set this? </div><div><br></div><div>I have the host name defined under /etc/hosts </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Oh, and in mythtv-setup, make certain that the backend has the *same* IP address for backend and master backend entries. Putting hostnames or FQDNs there can cause other problems.<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>I have the actual IP under both. </div><div><br></div><div>This only works if backend IP is set to 127.0.0.1 otherwise it keeps failing.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
-- <br>
<br>
Mike Perkins</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailma<wbr>n/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing<wbr>_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>
</div></div>