ubuntu 16.04 myth backend 0.28.1 fresh install issues

For discussion of topics specific to MythTV on linux

ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby Manhole » Sun Apr 02, 2017 5:36 am

I have an asus chromebox that I've been running mythbuntu (14.04 myth backend 0.28) for several months. It took a while to get it set up, but it was somewhat "straightforward" with googling a few topics here and there.

The other day I got tired of reading the updates available messages so I tried to update/upgrade. It did not go well. At all. Mysql was borked (missing socket error) and everything I tried made it worse. In the end I got to the point where a major software update to 16.04 completely failed midway through and the machine wouldn't boot anymore. So... I decided today to do a fresh install.

Having read that mythbuntu is being retired I looked at the new instructions. I installed ubuntu 16.04 LTS with no issues, updated the ppa, got myth backend 28.1 with no issues. I had the issue where myth-setup would fail to connect and continually restart which was the issue where I was only prompted ever for one (root) password for mysql setup, and then a random string is generated (silently) for user mythtv. After resetting that p/w to 'mythtv' and changing all the config.xmls to have the right user name, password, and changing local host to my machine ip address, I got past that issue.

After basically spending all day setting up all the channels, dealing with bind-addresses, and various configs I was in a state where the backend worked, front ends could connect and record etc. Then I tried to get mythweb working and I just could not get it working no matter what I tried. Bind addresses, mysql cnfs, mythweb.cnf, apache stuff, config.xml etc, all changed to use the proper user name, password and ip address. Nothing would get mythweb to accept the connection. I set the sql_mode to NO_SUBSTITUTIONS, as well.

So I decided for some reason to try installing mythbuntu-control-centre to see if by some random chance it would help, because I remember there was something in there about mythweb (turns out it was not useful), and in the process of installing it asked me to run a command before the install would work. 'sudo dpkg --configure -a'

This would turn out to be a mistake... It borked mysql again. Missing socket errors. after googling and trying to reinstall mysql-server, uninstall/reinstall it, stop/start services, etc etc etc... it's just broken beyond my abilities.

I'm taking a break tonight, but I'm considering starting from scratch again tomorrow and maybe going back to ubuntu 14.x or something. I'm pretty demoralized.
United States of AmericaManhole
Newcomer
 
Posts: 6
Joined: Sun Mar 26, 2017 2:01 am

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby paulh » Sun Apr 02, 2017 9:46 am

Sorry you are having so much trouble. I've installed many Mythbuntu installs and the only problem I can remember is the mythtv-setup restarting over and over again problem you mention.

I would discourage you rolling back to 14.x since there are many bug fixes in later versions. I would also encourage you to install mythbuntu-control-center so you can enable the repo to get the latest 0.28-fixes version of MythTV.
User avatar
Great Britainpaulh
Developer
 
Posts: 292
Joined: Thu Feb 06, 2014 6:09 pm

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby perkins1724 » Tue Apr 04, 2017 12:02 pm

We should be able to help resolve the mysql issue but would need more info like what exact error message are you getting from where. But a few things to check:

Mysql is running (Ubuntu 16.04 is systemd iirc):
systemctl status mysql


If it is not running note this:
https://bugs.launchpad.net/mythbuntu/+bug/1575864

But basically let us know what the error message is.

Then check able to login from terminal:
mysql -umythtv -p
Australiaperkins1724
Junior
 
Posts: 30
Joined: Tue Nov 18, 2014 7:44 am

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby AndyInNYC » Thu Apr 20, 2017 9:52 pm

I spent the better part of a week doing install after install (I made a Clonezilla backup of the base Ubuntu 16.04 server prior to starting and the machine boots off an SSD - so not a major task to start from square 1).

I found that the install went poorly each time. Finally, I did an install *WITHOUT* setting up the ppa.

After this point, the install, while not smooth, at least completed.

Issues I had (from memory) and resolution:

1. setup couldn't connect to database / mythtv not a member
added main user, root and mythtv to group mythtv
sudo usermod -a -G mythtv USERNAME

mysql -u root mysql
SET PASSWORD FOR mythtv = PASSWORD('new_password_here');
flush privileges;
quit

I found that the direction below (also from googling) doesn't work:

UPDATE user SET Password=PASSWORD('<password>') WHERE user='root';
FLUSH PRIVILEGES;
quit
So don't use this!

2. capture cards came back with unknown error
chmod 666 /dev/dvb/frontend0/*
chmod 666 /dev/dvb/frontend1/* (I have two cards in my master system)

3. Couldn't access the directory on the RAID array that my recordings were supposed to go to
changed the read/write permissions - not sure what the correct command ended up being

4. Mythweb bombed out
mysql.txt needs to be edited for password 'mythtv' - this might be to solve an earlier problem - can't remember
in /etc/mysql/conf.d/mythtv.cnf add the line (if it isn't there)
sql_mode=NO_ENGINE_SUBSTITUTION
I think I also had to fix some apache2 file with my password - can't remember


I 'think' I'm running mythtv as root - could be wrong and that's not a good thing, but if someone can get through my firewalls, that vulnerability wouldn't stop them even if I fixed it.

I'm actually kind of annoyed/puzzled that a clean/fresh install of 16.04 and a new install of mythtv would have so many errors and shortcomings; I'm glad it works and amazed by the talent that created it, but the fact that it has so many failures on a generic install is really puzzling.

Hope my notes help you on your install.
United States of AmericaAndyInNYC
Junior
 
Posts: 25
Joined: Mon Mar 21, 2016 3:37 pm

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby perkins1724 » Sun Apr 23, 2017 10:18 pm

I would be interested to see what the following command returns - you may find without the addition of the ppa that you are on quite an old version and wont be able to get fixes:
Code: Select all
apt-cache policy mythtv

Most of your notes seem to indicate permission issues. I will try and add some notes to hopefully help others that find this thread.
1. setup couldn't connect to database / mythtv not a member

I think the issue here is that the ppa will generate a random password but it doesn't link it back to a config.xml file immediately accessible by desktop users. I'm not a *buntu user so I'm not sure how the packaging is supposed to work but I think the most straightforward fix is to run the following as the users who are running mythtv-setup / mythfrontend (ie replace user as appropriate):
Code: Select all
ln -s /etc/mythtv/config.xml /home/user/.mythtv/config.xml

The other common option is to change the password everywhere (potentially multiple config.xml files depending on how you run mythtv-setup / mythbackend / mythfrontend, mysql, apache2) to 'mythtv' instead of the random string but obviously a less secure approach.
2. capture cards came back with unknown error

Try the following to find the permissions of your cards
Code: Select all
ls -al /dev/dvb/adapter0

Mine returns root:video so I add my mythtv-setup / mythbackend users to the video group (replace user with your user):
Code: Select all
usermod -a -G video user

If your card permissions are root:root you may need a udev rule or something similar to change the card permissions at boot time. A quick note - I am not sure but changing the card permissions to 666 using chmod may not survive a reboot.
3. Couldn't access the directory on the RAID array that my recordings were supposed to go to

It would depend on the specifics of how you created the permissions on your RAID array directory but either increasing the permissions of your users or changing the permissions on the recording directory would be ok. Assuming your backend is run by user mythtv I think most change their recording directories to something like mythtv:mythtv and then add your mythfrontend user to the mythtv group.
4. Mythweb bombed out

I think there have been a couple of issues with mythweb config in recent times. One is apparently caused by an incompatibility between mysql 5.7 and databases from earlier versions and can be worked around by adding 'sql_mode=NO_ENGINE_SUBSTITUTION' to /etc/mysql/conf.d/mythtv.cnf pending proper fix.

Another that comes to mind is a deprecated setting name in '/etc/mysql/conf.d/mythtv-tweaks.cnf' where 'table_cache=128' should be changed to 'table_open_cache=128'.

Possibly the reason you needed to change the apache2 file is because you changed the password at your step 1 and it will therefore need to be changed everywhere it is used.
I 'think' I'm running mythtv as root

I would strongly recommend trying to get this fixed up. Best case is it will propagate permission errors and obviously worst case it is a security issue. Hopefully some of the above notes will help.
Australiaperkins1724
Junior
 
Posts: 30
Joined: Tue Nov 18, 2014 7:44 am

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby kd6ybr » Wed Apr 26, 2017 6:54 pm

Manhole wrote:
I'm taking a break tonight, but I'm considering starting from scratch again tomorrow and maybe going back to ubuntu 14.x or something. I'm pretty demoralized.


I have given up on trying to run myth 0.28.1 on 16.04. A few days ago I did a fresh install of mythbuntu 14.04.5 and myth 0.27 and so far everything is working great. 16.04 and 0.28, in my opinion, has some serious problems and isn't suitable for beginners/casual users.

Greg
Gigabyte Brix GB-BXBT-2807 4gb 120gb ssd
Sony PlayTV DVB-T USB tuner
Mythbuntu 14.04 0.27 FE&BE
Great Britainkd6ybr
Junior
 
Posts: 15
Joined: Sun Jan 17, 2016 9:10 pm

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby AndyInNYC » Wed Apr 26, 2017 7:53 pm

I ran: apt-cache policy mythtv


Code: Select all
mythtv:
  Installed: 2:0.28.0+fixes.20160413.15cf421-0ubuntu2
  Candidate: 2:0.28.1+fixes.20170419.e26a33c-0ubuntu0mythbuntu3
  Version table:
     2:0.28.1+fixes.20170419.e26a33c-0ubuntu0mythbuntu3 500
        500 http://ppa.launchpad.net/mythbuntu/0.28/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/mythbuntu/0.28/ubuntu xenial/main i386 Packages
 *** 2:0.28.0+fixes.20160413.15cf421-0ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages
        100 /var/lib/dpkg/status



Andrew
United States of AmericaAndyInNYC
Junior
 
Posts: 25
Joined: Mon Mar 21, 2016 3:37 pm

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby perkins1724 » Wed Apr 26, 2017 11:37 pm

I ran: apt-cache policy mythtv
mythtv:
Installed: 2:0.28.0+fixes.20160413.15cf421-0ubuntu2

Yeah that installed version is about a year old and as I understand it won't pull in fixes.

I have given up on trying to run myth 0.28.1 on 16.04. A few days ago I did a fresh install of mythbuntu 14.04.5 and myth 0.27 and so far everything is working great. 16.04 and 0.28, in my opinion, has some serious problems and isn't suitable for beginners/casual users.

Greg

Greg, if your happy to post some specific details I can try and help get it working. I installed 16.04 + 0.28 on a virtual machine a few weeks ago, the main issue was the randomised password and no config.xml file for the desktop user but otherwise I had no problems. Try (replace user with your user that is trying to run mythfrontend) to get past the random password problem:
Code: Select all
ln -s /etc/mythtv/config.xml /home/user/.mythtv/config.xml

I did a quick walkthrough at the bottom of this post if it helps at all - viewtopic.php?f=36&t=67&p=10256#p10256
Australiaperkins1724
Junior
 
Posts: 30
Joined: Tue Nov 18, 2014 7:44 am

Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues

Postby kd6ybr » Sun Apr 30, 2017 9:41 am

perkins1724 wrote:Greg, if your happy to post some specific details I can try and help get it working.


Thanks for the offer but to be honest 14.04+0.27 suits my requirements fine and it has now been up for a week. I struggled to get 16.04+0.28 to go 48 hours without a reboot.
Gigabyte Brix GB-BXBT-2807 4gb 120gb ssd
Sony PlayTV DVB-T USB tuner
Mythbuntu 14.04 0.27 FE&BE
Great Britainkd6ybr
Junior
 
Posts: 15
Joined: Sun Jan 17, 2016 9:10 pm


Return to Linux



Who is online

Users browsing this forum: No registered users and 2 guests

cron