[SOLVED] Problems with fresh install on Ubuntu 24
Moderator: Forum Moderators
[SOLVED] Problems with fresh install on Ubuntu 24
After giving up on the system crashed by the Ubuntu upgrade, I did a fresh install of Ubuntu, then installed MythTV from the package, installed XMLTV following the method outlined in the wiki, and installed the HDHomerun config utility which seems to find the tuner okay.
1.) Now the backend complains that "Backend cannot start normally because Database Schema Update failed" ("Database schema version is 1379")
2.) On the backend dashboard it shows: Backends
Backend: DellT3500 is a Slave on IP 192.168.1.27
Backend: {{ Name }} is a Master on IP 192.168.1.27
I have no idea if this is normal or not or whether something needs to be done with this, and if so, what?...
3.) I can't add a capture card because of "ERROR: Backend Network Failure". Restarting the backend with sudo systemctl restart mythtv-backend.service has no effect.
1.) Now the backend complains that "Backend cannot start normally because Database Schema Update failed" ("Database schema version is 1379")
2.) On the backend dashboard it shows: Backends
Backend: DellT3500 is a Slave on IP 192.168.1.27
Backend: {{ Name }} is a Master on IP 192.168.1.27
I have no idea if this is normal or not or whether something needs to be done with this, and if so, what?...
3.) I can't add a capture card because of "ERROR: Backend Network Failure". Restarting the backend with sudo systemctl restart mythtv-backend.service has no effect.
Last edited by mbliss on Wed Sep 25, 2024 3:34 pm, edited 1 time in total.
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Problems with fresh install on Ubuntu 24
You'll probably want to post:
Code: Select all
mysql> SELECT * FROM settings WHERE value IN ('BackendServerIP', 'BackendServerIP6', 'BackendServerAddr', 'MasterServerIP', 'MasterServerName') ORDER BY hostname,value;
Re: Problems with fresh install on Ubuntu 24
If I'm reading it correctly, you have two backends running on the same host?
Re: Problems with fresh install on Ubuntu 24
That would appear to be the case, why I have no idea.If I'm reading it correctly, you have two backends running on the same host?
Code: Select all
mysql> SELECT * FROM settings WHERE value IN ('BackendServerIP', 'BackendServerIP6', 'BackendServerAddr', 'MasterServerIP', 'MasterServerName') ORDER BY hostname,value;
and if I removed the () I got no result. Once upon a time I was a whizz at SQL queries, but I seem to have forgotten it all.bash: syntax error near unexpected token `('
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Problems with fresh install on Ubuntu 24
"mysql> " is the mysql prompt. You need to log in to mysql as mythtv connected to mythconverg to run that.
or, from bash:
or, from bash:
Code: Select all
$ mysql -h localhost -u mythtv -p mythconverg -e "SELECT * FROM settings WHERE value IN ('BackendServerIP', 'BackendServerIP6', BackendServerAddr', 'MasterServerIP', 'MasterServerName') ORDER BY hostname,value;"
Re: Problems with fresh install on Ubuntu 24
Sorry, I thought it strange that I could run it from bash, but bash didn't complain about it. But nice that I could run it from bash. Unfortunately, the result, after fixing some quote issues, was: ERROR 1054 (42S22) at line 1: Unknown column 'BackendServerIP' in 'where clause'
That doesn't sound promising.
That doesn't sound promising.
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Problems with fresh install on Ubuntu 24
That's not right. Those aren't columns, they are values. It should show what it can match even if some don't exist. Pretty sure BackendServerIP isn't used anymore, but it's never been a column AFAIK, and that command shouldn't be looking for one. Sounds like you did something like "SELECT * FROM settings WHERE BackendServerIP in ..."
This is mine for a single backend. You can ignore anything that doesn't say "mythbackend" or "172.30.219.113". "NULL" in hostname just means that this value applies to all hosts.
This is mine for a single backend. You can ignore anything that doesn't say "mythbackend" or "172.30.219.113". "NULL" in hostname just means that this value applies to all hosts.
Code: Select all
MariaDB [mythconverg]> describe settings;
+----------+----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+----------------+------+-----+---------+-------+
| value | varchar(128) | NO | MUL | | |
| data | varchar(16000) | NO | | | |
| hostname | varchar(64) | YES | | NULL | |
+----------+----------------+------+-----+---------+-------+
3 rows in set (0.002 sec)
MariaDB [mythconverg]> SELECT * FROM settings WHERE value IN ('BackendServerIP', 'BackendServerIP6', 'BackendServerAddr', 'MasterServerIP', 'MasterServerName') ORDER BY hostname,value;
+-------------------+----------------+-------------+
| value | data | hostname |
+-------------------+----------------+-------------+
| MasterServerIP | 172.30.219.113 | NULL |
| MasterServerName | mythbackend | NULL |
| BackendServerAddr | 172.30.219.103 | hawkeye |
| BackendServerIP | 172.30.219.103 | hawkeye |
| BackendServerIP6 | | hawkeye |
| BackendServerAddr | mythbackend | mythbackend |
| BackendServerAddr | 127.0.0.1 | wolverine |
| BackendServerIP | 127.0.0.1 | wolverine |
| BackendServerIP6 | ::1 | wolverine |
+-------------------+----------------+-------------+
9 rows in set (0.002 sec)
Re: Problems with fresh install on Ubuntu 24
Okay, running the query from within MySQL gave this
Curiously, I was able to enter MySQL with
but not with
Code: Select all
+-------------------+--------------+-----------+
| value | data | hostname |
+-------------------+--------------+-----------+
| MasterServerName | DellT3500 | NULL |
| BackendServerAddr | 192.168.1.27 | DellT3500 |
| BackendServerIP | | DellT3500 |
| BackendServerIP6 | | DellT3500 |
+-------------------+--------------+-----------+
Code: Select all
mysql --user=mythtv --host=localhost mythconverg -p
Code: Select all
mysql --user=mythtv --host=192.168.1.27 mythconverg -p
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Problems with fresh install on Ubuntu 24
Sounds like the same issue you saw before. Did you check those files to see if mythtv.cnf is in the right directory, has the right info, etc?
mysql by default only listens on 127.0.0.1, so you need to tell it to listen on 192.168.1.27 (or all).
Not sure what you should have in that table, but someone here will probably want to see it.
Are you going to have any other backends/frontends? If not, using 127.0.0.1 instead of 192.168.1.27 will probably be easier for you.
Fresh u24.04/myth34 install here. I can connect to mysql from anywhere:
mysql by default only listens on 127.0.0.1, so you need to tell it to listen on 192.168.1.27 (or all).
Not sure what you should have in that table, but someone here will probably want to see it.
Are you going to have any other backends/frontends? If not, using 127.0.0.1 instead of 192.168.1.27 will probably be easier for you.
Fresh u24.04/myth34 install here. I can connect to mysql from anywhere:
Code: Select all
root@u2404:/var/log/mythtv# grep -r bind /etc/mysql
/etc/mysql/mysql.conf.d/mysqld.cnf:bind-address = 127.0.0.1
/etc/mysql/mysql.conf.d/mysqld.cnf:mysqlx-bind-address = 127.0.0.1
/etc/mysql/conf.d/mythtv.cnf:bind-address=*
root@u2404:/var/log/mythtv# ls -l /etc/mysql/mysql.conf.d/
total 8
-rw-r--r-- 1 root root 132 Jan 19 2024 mysql.cnf
-rw-r--r-- 1 root root 2220 Sep 17 16:19 mysqld.cnf
lrwxrwxrwx 1 root root 28 Sep 17 15:31 mythtv.cnf -> /etc/mysql/conf.d/mythtv.cnf
root@u2404:/var/log/mythtv# cat /etc/mysql/conf.d/mythtv.cnf
[mysqld]
bind-address=*
max_connections=100
Re: Problems with fresh install on Ubuntu 24
Bingo! What I thought was a "fresh install" (two, actually) turned out to be nothing of the sort. I tried a third time, but only after deleting all partitions on the hard drive with gparted. Now after installing MythTV and going through the setup screens, all is well! Well, sort of well, the frontend launches now, but there's no content available from the menu and I have to configure the remote. And I still need to install XMLTV to get program listings.Sounds like the same issue you saw before.
Hoping for the best. Will provide an update tomorrow....
Re: Problems with fresh install on Ubuntu 24
Continuing with the setup, I seem to have reached an impasse setting up XMLTV using Schedules Direct. Following the configuration in the backend setup, it says to use
which gives me
Alternatively, if I follow the MythTV XMLTV page and try to run
or
I get
where it hangs, and the .xmltv directory is empty. I'm guessing this has something to do with the warning earlier in the wiki
So now I'm stumped again....
Code: Select all
sudo -u mythtv tv_grab_zz_sdjson --configure --config-file "null/VidSource.xmltv"
Code: Select all
Failed to write to null/VidSource.xmltv.TMP at /usr/local/share/perl/5.38.2/XMLTV/Configure.pm line 187.
Code: Select all
tv_grab_zz_sdjson --configure --config-file $HOME/.mythtv/VidSource.xmltv
Code: Select all
tv_grab_zz_sdjson --configure --config-file ~/.mythtv/VidSource.xmltv
Code: Select all
Cache file for lineups, schedules and programs.
Cache file: [/home/dad/.xmltv/tv_grab_zz_sdjson.cache]
but I can't su to mythtv, none of the obvious guesses for passwords work, and if I do "sudo -i -u mythtv" I get "mythtv is not in the sudoers file." when I try to run the configure command. AlsoWarning: It seems users are missing the step that says run the setup as the user that will run mythfilldatabase (which is frequently user mythtv.)
Code: Select all
sudo -i -u mythtv
$ ls
$ pwd
/home/mythtv
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Problems with fresh install on Ubuntu 24
Code: Select all
sudo -u mythtv tv_grab_zz_sdjson --configure --config-file "null/VidSource.xmltv"
Code: Select all
tv_grab_zz_sdjson --configure --config-file ~/.mythtv/VidSource.xmltv
Code: Select all
sudo -u mythtv tv_grab_zz_sdjson --configure --config-file ~mythtv/mythtv/VidSource.xmltv
Note: at this point, you can do the above, or do what's below. Pick one.
Looks like you're probably on as mythtv at this point. You could run 'id' to be sure. If so, it's time to go back and do this...Code: Select all
sudo -i -u mythtv $ ls $ pwd /home/mythtv
Code: Select all
tv_grab_zz_sdjson --configure --config-file ~mythtv/.mythtv/VidSource.xmltv
Okay, at this point if you're logged in as mythtv (and it sounds like you are since it said "mythtv is not in the sudoers file." you don't use sudo in the configure command. That "sudo -u mythtv" was supposed to make the command run as mythtv. Now that you are mythtv there's no reason for it (and since mythtv can't use sudo, it not worky). If you're logged in as mythtv, your configure command isbut I can't su to mythtv, none of the obvious guesses for passwords work, and if I do "sudo -i -u mythtv" I get "mythtv is not in the sudoers file." when I try to run the configure command.
Code: Select all
tv_grab_zz_sdjson --configure --config-file ~mythtv/.mythtv/VidSource.xmltv
Re: Problems with fresh install on Ubuntu 24
Okay, I think we're getting close. The config command under my login gave the same file error, but doing
got me to the same point as before when I thought the program was hung, but little did I know it was just waiting for my input, so upon hitting Enter, it continued on and retrieved my info from Schedules Direct. After continuing with the setupwizard, I now have channels listed in the frontend. Running mythfilldatabase under my login failed, but worked when run as mythtv. And initially, I couldn't watch or record TV, but then I realized that there were no storage groups configured. The wiki implies that a Default storage group would be configured, but apparently not in my case. With that configured, I can now watch and record.
Remaining issue is in the program guide and other areas of the frontend, I get double imaging that makes it hard to read. I can't find any way to address that, something with Ubuntu settings? Watching TV or recordings appears fine, it's just things like the program guide where the screen is garbled.
Code: Select all
sudo -i -u mythtv
tv_grab_zz_sdjson --configure --config-file ~mythtv/.mythtv/VidSource.xmltv
Remaining issue is in the program guide and other areas of the frontend, I get double imaging that makes it hard to read. I can't find any way to address that, something with Ubuntu settings? Watching TV or recordings appears fine, it's just things like the program guide where the screen is garbled.
Last edited by mbliss on Mon Sep 23, 2024 9:51 pm, edited 1 time in total.
Re: Problems with fresh install on Ubuntu 24
You ran the setup part as user mythtv (the same user the backend runs as), that's good.
But you ran mythfilldatabase as user dad. I always run mythfilldatabase as user mythtv. That
way there's only one configuration, though some folks create symbolic links. But that's
just another thing to maintain and/or go wrong.
Here's an example of the only new files in play for XMLTV:
viewtopic.php?p=19508#p19508 As it says at the bottom of that
post, there shouldn't be similar files under you own user.
My personal solution is to add the following line to my .bashrc file: and then I just type: mfdbrun to start mythfilldatabase. Of course you have to re-read
the .bashrc file like this: . ~/.bashrc (you only need to do this once, the alias will always be
there after future logins.
But you ran mythfilldatabase as user dad. I always run mythfilldatabase as user mythtv. That
way there's only one configuration, though some folks create symbolic links. But that's
just another thing to maintain and/or go wrong.
Here's an example of the only new files in play for XMLTV:
viewtopic.php?p=19508#p19508 As it says at the bottom of that
post, there shouldn't be similar files under you own user.
My personal solution is to add the following line to my .bashrc file:
Code: Select all
alias mfdbrun='sudo --set-home --user=mythtv mythfilldatabase --verbose=system,xmltv'
the .bashrc file like this: . ~/.bashrc (you only need to do this once, the alias will always be
there after future logins.
Re: Problems with fresh install on Ubuntu 24
Sorry, I was editing my post and deleting that part while you were respondingBut you ran mythfilldatabase as user dad.

And one last update, selecting "Ubuntu on X.org" at login solved the double imaging problem.
Much gratitude to those who lent a hand, would never have been able to do all of this on my own. And I suppose this thread should be marked as "Solved" if possible ....