Installed both full frontend and leanfront onto my Fire Tv Stick 4k. Lean Front found everything with no problems, but the full frontend isn't connecting to my database.
My setup has been a combined FE/BE, working fine for many years. A recent version upgrade made my remote control lose functionality so I thought this was the time to put an app on my Fire Tv Stick 4k.
Since the lean-frontend "just worked" I assume the full frontend should also. Setup screen is able to find my backend, but error is "unable to login"
Any ideas?
[SOLVED] database connection fails on Fire Stick 4k Myth-Frontend
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
[SOLVED] database connection fails on Fire Stick 4k Myth-Frontend
Last edited by AnalogBill on Sat Aug 21, 2021 10:01 pm, edited 1 time in total.
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: database connection fails on Fire Stick 4k Myth-Frontend
If your previous system was a combo FE/BE, then maybe the remote capability is not turned on.
Make sure on your backend that you have in your /etc/mysql/mysql.conf.d/mythtv.conf
[mysqld]
bind-address=::
max_connections=100
The bind-address=:: is critical. Since I don't mess with mysql for anything else, I've never checked the other files but make sure there is not another bind-address that gets processed after this one and overrides it.
Also your backend setup in General -> Host backend setup -> Security Pin (Required) needs to be 0000.
Also make sure your backend IP addresses in backend setup are real, not 127.0.0.1.
After that and a reboot, you can use Firetv setup for apps and clear the cache data and all the other data for mythfrontend, then when it comes up, you can search and find the backend. At least that works for me.
Make sure on your backend that you have in your /etc/mysql/mysql.conf.d/mythtv.conf
[mysqld]
bind-address=::
max_connections=100
The bind-address=:: is critical. Since I don't mess with mysql for anything else, I've never checked the other files but make sure there is not another bind-address that gets processed after this one and overrides it.
Also your backend setup in General -> Host backend setup -> Security Pin (Required) needs to be 0000.
Also make sure your backend IP addresses in backend setup are real, not 127.0.0.1.
After that and a reboot, you can use Firetv setup for apps and clear the cache data and all the other data for mythfrontend, then when it comes up, you can search and find the backend. At least that works for me.
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: database connection fails on Fire Stick 4k Myth-Frontend
All settings correct except bind address was commented out. After fixing that, and a reboot, I did as you suggested clearing cache and data. A couple of things happened: Myth Frontend still isn't connecting, and the Lean Frontend is no longer connecting.
I suspect there is another mythtv.cnf file somewhere. Something to look for in the morning.
I suspect there is another mythtv.cnf file somewhere. Something to look for in the morning.
- jfabernathy
- Senior
- Posts: 577
- Joined: Wed Feb 18, 2015 2:37 pm
- Location: Raleigh, NC
Re: database connection fails on Fire Stick 4k Myth-Frontend
As far as I know, Leanfront only needs the IP address of the backend, it you haven't changed any port numbers. Don't see why there is any related effect on it.
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: database connection fails on Fire Stick 4k Myth-Frontend
Tried various changes today, broke my original FE/BE box, but now everything is working again. Interestingly, both LeanFront and Kodi had been setup and working fine using only my host name, not IP address. I changed both to use the IP, and they connected.
I'm wondering if I need to locate the /etc/mythtv/config.xml file on the remote FE. This is from my server, but shouldn't work on the remote FE:
<Database>
<PingHost>1</PingHost>
<Host>localhost</Host>
<UserName>mythtv</UserName>
<Password>mythtv</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>
FWIW, I changed <Host>localhost</Host> to <Host>ACTUAL HOSTNAME</Host> and also tried the real IP address. Both versions broke my box.
In searching for the bind-address locations I found that mine were not exactly in the same path as you suggested as I changed to the mariadb a couple of years ago. So
sudo grep --recursive bind.address /etc/mysql
got this
/etc/mysql/conf.d/mythtv.cnf:#bind-address=::
/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address = 127.0.0.1
Again I tried various combinations of real IPs and actual host name, but they all broke my box.
Maybe I'm missing something basic...Shouldn't a combo FE/BE box and a couple of Fire Stick 4K installations be able to co-exist ?
I'm wondering if I need to locate the /etc/mythtv/config.xml file on the remote FE. This is from my server, but shouldn't work on the remote FE:
<Database>
<PingHost>1</PingHost>
<Host>localhost</Host>
<UserName>mythtv</UserName>
<Password>mythtv</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>
FWIW, I changed <Host>localhost</Host> to <Host>ACTUAL HOSTNAME</Host> and also tried the real IP address. Both versions broke my box.
In searching for the bind-address locations I found that mine were not exactly in the same path as you suggested as I changed to the mariadb a couple of years ago. So
sudo grep --recursive bind.address /etc/mysql
got this
/etc/mysql/conf.d/mythtv.cnf:#bind-address=::
/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address = 127.0.0.1
Again I tried various combinations of real IPs and actual host name, but they all broke my box.
Maybe I'm missing something basic...Shouldn't a combo FE/BE box and a couple of Fire Stick 4K installations be able to co-exist ?
Re: database connection fails on Fire Stick 4k Myth-Frontend
Here are some things to check:
If a remote frontend is using upnp to connect to the backend, you need to have the actual ip address (not 127.0.0.1) in the config.xml on the backend.
In the fire stick setup you have to use actual ip addresses, not host names. (for both leanfront and mythfrontend)
If using mysql, the line "bind-address = 127.0.0.1" must be commented in the appropriate cnf file
If using mariadb, the line "bind-address = ::" must be set in the appropriate cnf file
If a remote frontend is using upnp to connect to the backend, you need to have the actual ip address (not 127.0.0.1) in the config.xml on the backend.
In the fire stick setup you have to use actual ip addresses, not host names. (for both leanfront and mythfrontend)
If using mysql, the line "bind-address = 127.0.0.1" must be commented in the appropriate cnf file
If using mariadb, the line "bind-address = ::" must be set in the appropriate cnf file
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: database connection fails on Fire Stick 4k Myth-Frontend
Thanks. The mariadb bind-address = :: was the fix. What is proper way to mark this as solved?