[mythtvnz] Problems with backend and mythweb after upgrading to Ubuntu 15.04
Mark
markk at kc.net.nz
Thu Oct 29 07:48:04 GMT 2015
On Mon, 2015-10-26 at 17:56 +1300, Mark wrote:
> On Mon, 2015-10-26 at 11:01 +1300, Stephen Worthington wrote:
> > On Mon, 26 Oct 2015 07:41:07 +1300, you wrote:
> >
> > >I upgraded my Mythbuntu install from 14.04 to 15.04 yesterday and have
> > >run into a couple of problems that might interest people.
> > >
> > >1) Due to the change to systemd Mythtv doesn't auto start after boot.
> > > I'm currently manually starting it using sudo systemctl start
> > >mythtv-backend
> > >
> > >2) Mythweb failed with an unhelpful error in the log 'PHP Fatal error:
> > >Call to a member function query_col' which is usually related to having
> > >an incorrect password configured. In this case though it seems to be
> > >caused by too low a php memory_limit set
> > >in /etc/apache2/sites-enabled/mythweb.conf
> > >
> > >I changed the old default from 32M to the new default of 64M and it now
> > >works. The configuration line now reads as
> > >
> > > php_value memory_limit 64M
> > >
> > >Regards
> > >Mark
> >
> > I just checked my php_value memory_limit and it was already set to
> > 64M. But the timestamp on the mythweb.conf file was today at the
> > right time for when I did an apt-get update, so I think the 14.04
> > 0.27-fixes repo already has this fix. Maybe the 15.04 0.27-fixes repo
> > will also have a fix for your systemd problem.
>
> I'm already using (and was on 14.04)
> http://www.ubuntuupdates.org/ppa/mythtv_0.27 so unless there's a
> different fixes PPA it never updated my configuration value.
>
> Another problem I've discovered was that external mythtv front ends couldn't connect.
> This was due to two problems.
> 3) UFW firewall is now active on Ubuntu 15.04 and it blocks mysql, for now
> I'm disabling the firewall as there's a few other things on my machine that
> are probably blocked that shouldn't be.
> sudo ufw disable
> 4) A different mysql configuration is being used and I had to comment out the bind
> address line in it to expose mysql databases.
> vi /etc/mysql/mysql.conf.d/mysqld.cnf
> #bind-address = 127.0.0.1
I've got mythbackend auto starting after reboot now. There were a few
owner ship changes required (eg sudo chown -R mythtv /var/log/mythtv
among others) and several main problems with setup that have been a pain
to work around as systemd seems geared up towards detecting jobs have
been asked to start and not so much functionality around whether they
are now usable. The changes I've made seem a little bit hacky but at
least it's working for me now (just got to sort out mythweb access,
currently I have mythweb internally or externally available, not both at
the same time though!)
1) Getting it to wait for mysql
Before ExecStart I've added the following
to /etc/systemd/system/mythtv-backend.service (base file copied from
mythtv website)
ExecStartPre=/usr/share/mysql/mysql-systemd-start post
From what I've read this isn't desirable as it looks like long
running ExecStartPre jobs can be killed. I've also set
After=network.target mysql.service NetworkManager-wait-online.service
user_hdhomerun.service sys-subsystem-net-devices-dvb0.frontend0.device
sys-subsystem-net-devices-dvb1.frontend0.device
2) Created /etc/udev/rules.d/99-mythbackend.rules (this probably doesn't
come into play as HD Homerun takes a lot longer to start)
#Create systemd device units for capture devices
#
SUBSYSTEM=="video4linux", TAG+="systemd"
SUBSYSTEM=="dvb", TAG+="systemd",
ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$kernel"
#SUBSYSTEM=="dvb", TAG+="systemd"
SUBSYSTEM=="firewire", TAG+="systemd"
3) Created /etc/systemd/system/user_hdhomerun.service
[Unit]
Description=Check if HDHomeRun device is available
After=network.target sys-subsystem-net-devices-eth1.device
[Service]
#oneshot will cause any dependencies to wait
Type=oneshot
#RemainAfterExit=yes
ExecStart=/usr/bin/waitForHDHomeRun.sh
#Restart=always
#RestartSec=10
[Install]
WantedBy=multi-user.target
4) Created /usr/bin/waitForHDHomeRun.sh (and done chmod
+x /usr/bin/waitForHDHomeRun.sh)
#!/bin/bash
echo "Waiting for HD Homerun"
/usr/bin/hdhomerun_config discover
while [ $? -ne 0 ]; do
sleep 10s
/usr/bin/hdhomerun_config discover
done
echo "Found HD Homerun"
That'll teach me for doing an update!!!
More information about the mythtvnz
mailing list