Kodi Community Forum
Linux cmyth fails to connect to backend [SOLVED] - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: MythTV (https://forum.kodi.tv/forumdisplay.php?fid=170)
+---- Thread: Linux cmyth fails to connect to backend [SOLVED] (/showthread.php?tid=164893)



cmyth fails to connect to backend [SOLVED] - ajaxmike - 2013-05-14

BE running mythtv .26 on Ubuntu Server. FE works OK on backend as localhost

FE running openelc 3.0.2 (xbmc frodo V.12). Using same database settings as BE. Tried backend hostname=homeserver and 192.168.1.10. Neither worked.
Log attached. I see that there is is audio driver error which I can work out after the database is connected and live tv is enabled

http://xbmclogs.com/show.php?id=18965


RE: cmyth fails to connect to backend - teeedubb - 2013-05-14

Paste your mythtvbackend log file too.


RE: cmyth fails to connect to backend - nickr - 2013-05-15

Sounds like your backend is set up to only work on localhost. Try fixing that.


RE: cmyth fails to connect to backend - ajaxmike - 2013-05-15

(2013-05-14, 23:38)teeedubb Wrote: Paste your mythtvbackend log file too.

http://pastebin.com/CLFhJ435


RE: cmyth fails to connect to backend - ajaxmike - 2013-05-15

(2013-05-15, 03:53)nickr Wrote: Sounds like your backend is set up to only work on localhost. Try fixing that.

In /etc/mysql/my.cnf I set the bind address tothe IP of the BE server:

Code:
[client]
port        = 3306
socket        = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir        = /usr
datadir = /var/lib/mysql
tmpdir        = /tmp
lc-messages-dir    = /usr/share/mysql
skip-external-locking

bind-address = 192.168.1.10

key_buffer        = 16M
max_allowed_packet = 16M
thread_stack        = 192K
thread_cache_size       = 8

myisam-recover         = BACKUP

query_cache_limit    = 1M
query_cache_size = 16M

log_error = /var/log/mysql/error.log

expire_logs_days    = 10
max_binlog_size         = 100M

[mysqldump]
quick
quote-names
max_allowed_packet    = 16M

[mysql]

[isamchk]
key_buffer        = 16M

!includedir /etc/mysql/conf.d/

I also confirmed that user mythtv is granted all permissions on mythconverge from host openelec, which is the name of the remote FE.


RE: cmyth fails to connect to backend - teeedubb - 2013-05-15

Looks like xbmc isnt event connecting to the backend, let alone the database

15:51:26 T:140037542901504 ERROR: AddOnLog: MythTV cmyth PVR Client: Failed to connect to MythTV backend on homeserver:6543

in xbmc mythtv addon settings have you tried using the actual ip address and not the host name?


RE: cmyth fails to connect to backend - nickr - 2013-05-15

Yeah but there are two aspects, mysql has to listen on the non localhost IP address and so does mythbackend. This is configured in mythtv-setup.


RE: cmyth fails to connect to backend - ajaxmike - 2013-05-15

(2013-05-15, 11:24)teeedubb Wrote: Looks like xbmc isnt event connecting to the backend, let alone the database

15:51:26 T:140037542901504 ERROR: AddOnLog: MythTV cmyth PVR Client: Failed to connect to MythTV backend on homeserver:6543

in xbmc mythtv addon settings have you tried using the actual ip address and not the host name?

I tried it both ways -- no joy. I just tried again now and left it on the ip setting


RE: cmyth fails to connect to backend - ajaxmike - 2013-05-15

(2013-05-15, 11:31)nickr Wrote: Yeah but there are two aspects, mysql has to listen on the non localhost IP address and so does mythbackend. This is configured in mythtv-setup.

mysql is listening on 192.168.1.10
mythbackend is set to 192.168.1.10


RE: cmyth fails to connect to backend - fnc1 - 2013-05-15

if all your setting are right... you may have to 'purge' your mythtv sql server if that ip address tried connecting to many times...


RE: cmyth fails to connect to backend - ajaxmike - 2013-05-16

I changed the permissions for user=mythtv to hosts=any instead of openelec (the name of the remote FE machine) and it worked. All of this was done in webmin.

Thanks to all for your help.


RE: cmyth fails to connect to backend [SOLVED] - DeweyOxberger - 2013-05-19

A minor note. Your mysql config has:

!includedir /etc/mysql/conf.d/

If I'm thinking correctly that means they wanted you to put your bind address line in the file in that directory (I think it's called mythtv.cnf). Not in the main my.cnf file. The main file might be overwritten in an upgrade (I think).

Settings in conf.d take precedence.


RE: cmyth fails to connect to backend - bigwoof - 2013-06-05

(2013-05-16, 11:18)ajaxmike Wrote: I changed the permissions for user=mythtv to hosts=any instead of openelec (the name of the remote FE machine) and it worked. All of this was done in webmin.

Thanks to all for your help.

I am having trouble connecting to my backend via cmyth and I want to give this a shot (before starting a new thread) but am unfamiliar with webmin would it be possible to give more of an explanation on how to implement this change in mysql.

I assume there this can be done either by webmin or by the command line.

Some details on my setup:
dedicated backend machine - mythbuntu 12.04 - Mythtv 0.26
frontend machine HTPC - mythbuntu 12.04 - Mythtv 0.26
XBMC instance on laptop - v12 -frodo

Cheers

Phil


RE: cmyth fails to connect to backend [SOLVED] - bigwoof - 2013-06-08

For anybody who wants to follow up on my question I have solved the problem:

I managed to install Webmin following these instructions:

http://www.ubuntugeek.com/how-to-install-webmin-on-ubuntu-12-04-precise-server.html

Then I logged in to the backend at:

https://192.168.?.?/10000 (where ?.? is the IP for your backend)

using root user credentials

then I administered mysql via:

servers>MySQL Database Server

and logged in with the admin credentials found in:

/etc/mysql/debian.cnf

Finally I navigated to User Permissions
and changed the host for mythtv to Any and bob's your uncle - xbmc was able to connect to the backend - yay