ubuntu 16.04 myth backend 0.28.1 fresh install issues
ubuntu 16.04 myth backend 0.28.1 fresh install issues
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.
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.
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
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.
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.
-
- Junior
- Posts: 33
- Joined: Tue Nov 18, 2014 7:44 am
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
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
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
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
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.
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.
-
- Junior
- Posts: 33
- Joined: Tue Nov 18, 2014 7:44 am
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
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:
Most of your notes seem to indicate permission issues. I will try and add some notes to hopefully help others that find this thread.
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.
Mine returns root:video so I add my mythtv-setup / mythbackend users to the video group (replace user with your 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.
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.
Code: Select all
apt-cache policy mythtv
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):1. setup couldn't connect to database / mythtv not a member
Code: Select all
ln -s /etc/mythtv/config.xml /home/user/.mythtv/config.xml
Try the following to find the permissions of your cards2. capture cards came back with unknown error
Code: Select all
ls -al /dev/dvb/adapter0
Code: Select all
usermod -a -G video user
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.3. Couldn't access the directory on the RAID array that my recordings were supposed to go to
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.4. Mythweb bombed out
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 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.I 'think' I'm running mythtv as root
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
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.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.
Greg
Gigabyte Brix GB-BXBT-2807 4gb 120gb ssd
Sony PlayTV DVB-T USB tuner
Mythbuntu 14.04 0.27 FE&BE
Sony PlayTV DVB-T USB tuner
Mythbuntu 14.04 0.27 FE&BE
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
I ran: apt-cache policy mythtv
Andrew
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
-
- Junior
- Posts: 33
- Joined: Tue Nov 18, 2014 7:44 am
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
Yeah that installed version is about a year old and as I understand it won't pull in fixes.I ran: apt-cache policy mythtv
mythtv:
Installed: 2:0.28.0+fixes.20160413.15cf421-0ubuntu2
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: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
Code: Select all
ln -s /etc/mythtv/config.xml /home/user/.mythtv/config.xml
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
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.perkins1724 wrote: Greg, if your happy to post some specific details I can try and help get it working.
Gigabyte Brix GB-BXBT-2807 4gb 120gb ssd
Sony PlayTV DVB-T USB tuner
Mythbuntu 14.04 0.27 FE&BE
Sony PlayTV DVB-T USB tuner
Mythbuntu 14.04 0.27 FE&BE
-
- Junior
- Posts: 32
- Joined: Fri Sep 01, 2017 2:58 am
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
I'm getting to the point of frustration like kd6ybr. The fact that a new install does not work out of the box or with minimal configuration is a major turn off. I recently decided to delete my VM and rebuild from scratch using 16.04.3 desktop. I have the backend configured, but I can not get the mythweb to work properly using the notes below. Here's what I get on the page.
Code: Select all
Fatal error: Uncaught Error: Call to undefined function t() in /usr/share/mythtv/mythweb/modules/database/init.php:10 Stack trace: #0 /usr/share/mythtv/mythweb/classes/Modules.php(30): require_once() #1 /usr/share/mythtv/mythweb/classes/Modules.php(50): Modules::load() #2 /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php(135): Modules::getModule('tv') #3 /usr/share/mythtv/mythweb/modules/_shared/tmpl/_errors/error.php(19): include('/usr/share/myth...') #4 /usr/share/mythtv/mythweb/includes/errordisplay.php(198): require_once('/usr/share/myth...') #5 /usr/share/mythtv/bindings/php/MythBackend.php(76): custom_error('Unable to conne...') #6 /usr/share/mythtv/bindings/php/MythBackend.php(137): MythBackend->connect(false) #7 /usr/share/mythtv/mythweb/includes/utils.php(56): MythBackend->sendCommand(Array) #8 /usr/share/mythtv/mythweb/includes/db_update.php(57): setting('recommend_enabl...', NULL, false) #9 /usr/share/mythtv/mythweb/includes/init.php(46): require_once('/usr/share/myth...') #10 /usr/share/mythtv/ in /usr/share/mythtv/mythweb/modules/database/init.php on line 10
Re: ubuntu 16.04 myth backend 0.28.1 fresh install issues
I have been trying to set up mythtv for a number of times without success. It seems a bit odd that I am having the same mysql problems as the user on this post .
I am a fairly knowledgeable UNIX user and can't imagine what a non-techie would think about the first step in mythv.not working. I have set up NextPVR and it was a breeze.
I hope the mythtv problem is solved ASAP so as to not discourage new users.
Jerry
I am a fairly knowledgeable UNIX user and can't imagine what a non-techie would think about the first step in mythv.not working. I have set up NextPVR and it was a breeze.
I hope the mythtv problem is solved ASAP so as to not discourage new users.
Jerry