Very excited to get a new Rasberry Pi 4b 4G.
I'm trying to get a frontend working on it.
Because this is my first time, I used NOOBS, and got Raspian up and running quickly. I followed instructions to install https://www.mythtv.org/wiki/MythTV_Light. Everything installed fine. Copied ~/.mythtv/config.xml and attempted to connect with poor results.
Looks like it is having issues connecting to the backend. I have confirmed the firewall is down. and the database should allow connections:
mysql> select Host,User from user where User='mythtv';
+------+--------+
| Host | User |
+------+--------+
| % | mythtv |
+------+--------+
One troubling thing to me is that mysql does not seem to work on pi:
pi@raspberrypi:~ $ mysql
bash: mysql: command not found
the errors are as follows:
...
2020-01-18 09:04:22.167528 E LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'
eno: No such file or directory (2)
...
2020-01-18 09:04:34.201951 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 3, status beAwake, Delay: 2000
2020-01-18 09:04:39.285604 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 4, status beAwake, Delay: 2000
2020-01-18 09:04:44.371339 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 5, status beAwake, Delay: 2000
2020-01-18 09:04:49.466217 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 6, status beAwake, Delay: 2000
2020-01-18 09:04:54.549420 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 7, status beAwake, Delay: 2000
^C2020-01-18 09:04:56.583633 C Received Interrupt: Code 128, PID 0, UID 0, Value 0x00000000
2020-01-18 09:04:59.633423 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 8, status beAwake, Delay: 2000
2020-01-18 09:05:04.723374 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 9, status beAwake, Delay: 2000
2020-01-18 09:05:09.809580 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 10, status beAwake, Delay: 2000
2020-01-18 09:05:14.921348 I Start up failure. host buz-desktop, status beAwakeFail
2020-01-18 09:05:14.999937 I Start up testing connections. DB buz-desktop, BE , attempt 0, status dbAwake, Delay: 2000
2020-01-18 09:05:15.052219 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:15.055070 E MythSocket(ffffffffa5340fa8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:15.057104 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:15.151814 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:15.153023 E MythSocket(ffffffffa5d463e8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:15.153215 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:15.325105 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:15.326034 E MythSocket(ffffffffa5333000:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:15.326262 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:17.661170 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 1, status beAwake, Delay: 2000
2020-01-18 09:05:17.675884 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:17.677616 E MythSocket(ffffffffa5340fa8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:17.678126 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:22.975420 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 2, status beAwake, Delay: 2000
2020-01-18 09:05:24.016170 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:24.017915 E MythSocket(ffffffffa532b1d0:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:24.018343 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:27.990729 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:27.992388 E MythSocket(ffffffffa5340fa8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:27.992800 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:28.603769 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 3, status beAwake, Delay: 2000
2020-01-18 09:05:30.685452 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:30.687158 E MythSocket(ffffffffa5340fa8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:30.687593 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:32.795980 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:32.797721 E MythSocket(ffffffffa5340fa8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:32.798148 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:33.896585 I Start up testing connections. DB buz-desktop, BE 127.0.0.1, attempt 4, status beAwake, Delay: 2000
2020-01-18 09:05:35.991646 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:35.993339 E MythSocket(ffffffffa5340fa8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:35.993772 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:36.013284 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2020-01-18 09:05:36.016743 E MythSocket(ffffffffa5d463e8:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2020-01-18 09:05:36.017804 E Connection to master server timed out.
Either the server is down or the master server settings
in mythtv-settings does not contain the proper IP address
2020-01-18 09:05:36.188955 I Start up failure. host buz-desktop, status beAwakeFail
2020-01-18 09:05:36.188983 A Cannot connect to backend
2020-01-18 09:05:36.189061 E Failed to init MythContext, exiting.
2020-01-18 09:05:36.205797 I CECAdapter: unregistering client: libCEC version = 4.0.4, client version = 4.0.4, firmware version = 1, logical address(es) = Playback 1 (4) , physical address: 1.0.0.0, compiled on Linux-4.15.0-48-generic ... , features: P8_USB, DRM, P8_detect, randr, RPi, Exynos, AOCEC
2020-01-18 09:05:36.901707 I CECAdapter: Closing down CEC.
2020-01-18 09:05:36.998482 I RAOP Device: Cleaning up.
2020-01-18 09:05:36.998756 I AirPlay: Cleaning up.
2020-01-18 09:05:36.998817 I Waiting for threads to exit.
Pi Frontend Install hassles
Re: Pi Frontend Install hassles
From the log mythfrontend is trying to connect to mythbackend on the Pi4 using 127.0.0.1 (i.e.localhost)
In .mythtv/config.xml change the line <Host>localhost</Host> to the ip address of the remote mythbackend e.g. <Host>192.168.0.22</Host>
Your ip address will be different from 192.168.0.22
Also need to check on the remote mythbackend (assuming Ubuntu here) that remote access has been enabled in /etc/mysql/conf.d/mythtv.cnf, the bind address line should look like:
bind-address=::
mysql is not installed by mythtv-light as it is configured for a frontend only (mythbackend is present in mythtv-light but requires additional configuration to enable it).
Mike
In .mythtv/config.xml change the line <Host>localhost</Host> to the ip address of the remote mythbackend e.g. <Host>192.168.0.22</Host>
Your ip address will be different from 192.168.0.22
Also need to check on the remote mythbackend (assuming Ubuntu here) that remote access has been enabled in /etc/mysql/conf.d/mythtv.cnf, the bind address line should look like:
bind-address=::
mysql is not installed by mythtv-light as it is configured for a frontend only (mythbackend is present in mythtv-light but requires additional configuration to enable it).
Mike
Re: Pi Frontend Install hassles
Thank you so much for answering. Waiting patiently and my balloon has been deflated on PI.
I really could use some PI experts here. Where is it getting the 127.0.0.1 from?
There is no /etc/mythtv on PI, should there be?
I noticed that 127.0.0.1 was in there, but my config is right (as far as I can tell):
and the backend is ubuntu with the right binding:
This is mythtv-lite right out of the box. Just need a frontend. Including Pi configs just in case.
I really could use some PI experts here. Where is it getting the 127.0.0.1 from?
There is no /etc/mythtv on PI, should there be?
I noticed that 127.0.0.1 was in there, but my config is right (as far as I can tell):
Code: Select all
pi@raspberrypi:~ $ cat .mythtv/config.xml
<Configuration>
<Database>
<PingHost>1</PingHost>
<Host>192.168.7.148</Host>
<UserName>mythtv</UserName>
<Password>XXXXXXX</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
</Database>
<WakeOnLAN>
<Enabled>0</Enabled>
<SQLReconnectWaitTime>0</SQLReconnectWaitTime>
<SQLConnectRetry>5</SQLConnectRetry>
<Command>echo 'WOLsqlServerCommand not set'</Command>
</WakeOnLAN>
</Configuration>
Code: Select all
buz@buz-desktop:/etc/mysql/conf.d$ cat mythtv.cnf
[mysqld]
bind-address=::
max_connections=100
buz@buz-desktop:/etc/mysql/conf.d$ ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 70:85:c2:26:32:49 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.148/24 brd 192.168.7.255 scope global dynamic noprefixroute enp6s0
valid_lft 67570sec preferred_lft 67570sec
inet6 fe80::e0b6:c4ff:7413:5ffc/64 scope link noprefixroute
valid_lft forever preferred_lft forever
buz@buz-desktop:/etc/mysql/conf.d$
Code: Select all
pi@raspberrypi:/etc/mysql/conf.d $ cat mysql.cnf
[mysql]
pi@raspberrypi:/etc/mysql/conf.d $ cat mysqldump.cnf
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
Re: Pi Frontend Install hassles
OK, originally I used
it should have worked, because it resolved and pinged.
Now I am using the IP
And take a look at the output:
It's using the Host as the DB (database name?). and It's defaulting to 127.0.0.1 as the BE (backend hostname/ip?) which is not even in my config.
Have I discoverd a BUG?
Code: Select all
<Host>buz-desktop</Host>
Now I am using the IP
Code: Select all
<Host>192.168.7.148</Host>
Code: Select all
2020-01-19 07:26:09.480088 I Start up testing connections. DB 192.168.7.148, BE , attempt 0, status dbAwake, Delay: 2000
2020-01-19 07:26:11.030439 I Start up testing connections. DB 192.168.7.148, BE 127.0.0.1, attempt 1, status beAwake, Delay: 2000
2020-01-19 07:26:16.040692 I Start up testing connections. DB 192.168.7.148, BE 127.0.0.1, attempt 2, status beAwake, Delay: 2000
Have I discoverd a BUG?
Re: Pi Frontend Install hassles
Once ping works, my next favorite tool is: nmap --reason -p 3306 <yourBackendHostNameOrIP>
That decouples MythTV from the picture. Looking for:
If that works, then SQL GRANTs may be of interest.
That decouples MythTV from the picture. Looking for:
Code: Select all
PORT STATE SERVICE REASON
3306/tcp open mysql syn-ack
Re: Pi Frontend Install hassles
Check using mythtv-setup on the remote mythbackend that in 1. General>Host Address Backend Setup:
Security PIN (required) is set to 0000
Primary IP address /DNS name is set to the real ip address 192.168.7.148 and not 127.0.0.1, use the drop down to select the real ip address and then restart mythtv-backend.
I have just done a test on my Pi4 using NOOBS and mythtv-light (from deb http://dl.bintray.com/bennettpeter/deb/ buster myth30) to a test mythtv 30 backend and it all works.
Mike
Security PIN (required) is set to 0000
Primary IP address /DNS name is set to the real ip address 192.168.7.148 and not 127.0.0.1, use the drop down to select the real ip address and then restart mythtv-backend.
I have just done a test on my Pi4 using NOOBS and mythtv-light (from deb http://dl.bintray.com/bennettpeter/deb/ buster myth30) to a test mythtv 30 backend and it all works.
Mike
Solved: Pi Frontend Install hassles
Bingo!Check using mythtv-setup on the remote mythbackend that in 1. General>Host Address Backend Setup:
Security PIN (required) is set to 0000
Primary IP address /DNS name is set to the real ip address 192.168.7.148 and not 127.0.0.1, use the drop down to select the real ip address and then restart mythtv-backend.
Thx MikeB2013
Thx you to bill6502 for your imput.
I know I could count on you guys to get me thru.
Now I gotta work on sound problems...