MythTV Connection Problem
#1
Hi All

I'm having a problem connecting to a MythTV source inside XBMC.

The system is a Mythbuntu installation, with the myth backend on the same machine. I've added the source, and it works fine when there is a network connection. When the network is unplugged, trying to connect to the video source brings up an error "Remote share Network is not connected".

I've tried using localhost, 127.0.0.1, and the machine name inside the myth:// string, but they all have the same behaviour. The local loopback device is running, and the MythTV frontend can connect to the backend, so the problem seems to be with XBMC.

Does anyone have any ideas what is wrong?

Cheers
Reply
#2
What version of Myth are you running. Something has changed in 0.23 that requires the machine name of the mythbackend machine to be configured within /etc/hosts.
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
Reply
#3
I'm running Myth 0.23. localhost is defined in /etc/hosts. I've also tried defining it in XBMC's advancedsettings.xml, but that didn't help either.

The local Myth frontend can connect to the backend with no issues, so the problem seems to be with XBMC. It appears that with no network connected that it doesn't even try to resolve localhost through the myth:// protocol. I haven't tried setting up local shares through any other protocol to see if they can be accessed or not.

My XBMC version is XBMC PRE-10.5 r30428M. I compiled it from source.
Reply
#4
@Firecat, the machine name (not localhost) needs to be in the /etc/hosts file along with the IP address for it. If you are using linux, start xbmc from the command line as a lot of the libcmyth logging is output there and there should be an obvious error regarding the connection error. I haven't had time to diagnose further since there is a workaround that many of us are using with 0.23.

Note that the IP address or machine name used to connect to the backend through myth:// in XBMC doesn't control the IP address or machine name that actually ends up being used to play the file as that information is sent from the backend for each recording.

Your /etc/hosts files should look something like:
Code:
127.0.0.1       localhost
127.0.1.1       davbuntu
192.168.1.3     davmyth
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
Reply
#5
I've just upgraded to XBMC version PRE-10.5 R31067M and still have the same issue.

I've added the machine to my /etc/hosts file, which now has the following entries (machine name is gisele, and eth0 interface is statically assigned to 10.1.1.4):
Code:
127.0.0.1    localhost
127.0.1.1    gisele
10.1.1.4    gismyth
With the network plugged in, I can access the internal directories of the myth:// source through any of the 3 names, and the 3 IP addresses, above.

With the network plugged in, and successfully accessing the source, there is the following output on the terminal:
Code:
tony@gisele:~$ xbmc
(cmyth)cmyth_conn_connect: asked for version 8, got version 56
(cmyth)cmyth_conn_connect: asked for version 56, got version 56
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
(cmyth)__cmyth_rcv_proginfo: got recording info
cmyth_db_check_connection: mysql_connect() failed: Can't connect to MySQL server on 'gismyth' (111)(cmyth)cmyth_db_get_connection: cmyth_db_check_connection failed
(cmyth)cmyth_mysql_get_chanlist, finalisation/execution of query failed!
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server "PS
                                                                          "
      after 137 requests (136 known processed) with 0 events remaining

With the network unplugged, and trying to access the source, the output is:
Code:
tony@gisele:~$ xbmc
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server "�S"
      after 137 requests (136 known processed) with 0 events remaining

(I always seem to get the X error when I run XBMC from the terminal and shut it down.) And yes, the above is correct, I'm getting connection errors when it works, and no error when it doesn't.
Reply
#6
More information:
When the network is plugged in, and the connection works, the relevant section of xbmc.log reads:
Code:
18:12:52 T:140424760793120 M:1335914496   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
18:12:52 T:140424760793120 M:1335914496   DEBUG: OnKey: 61453 pressed, action is Select
18:12:52 T:140424760793120 M:1335914496   DEBUG: CGUIMediaWindow::GetDirectory (myth://gismyth/)
18:12:52 T:140424760793120 M:1335914496   DEBUG:   ParentPath = []
18:12:52 T:140424540702480 M:1335914496   DEBUG: CGetDirectory::DoWork retrieving myth://gismyth/
18:12:52 T:140424540702480 M:1335914496   DEBUG: SECTION:LoadDLL(xbmc.so)
18:12:52 T:140424540702480 M:1335914496   DEBUG: Loading Internal Library
18:12:52 T:140424540702480 M:1335914496   DEBUG: CGetDirectory::DoWork retrieving myth://gismyth/ succeeded
18:12:52 T:140424540702480 M:1335914496   DEBUG: CGetDirectory::OnJobComplete called
18:12:52 T:140424664581904 M:1335914496   DEBUG: thread start, auto delete: 0
18:12:52 T:140424664581904 M:1335906304   ERROR: GetGuide - Unable to get list of channels: myth://gismyth/guide
18:12:52 T:140424664581904 M:1335906304   ERROR: GetDirectory - Error getting myth://gismyth/guide/
18:12:52 T:140424664581904 M:1335906304   DEBUG: Thread 140424664581904 terminating
18:12:55 T:140424760793120 M:1337446400   DEBUG: SDLKeyboard: scancode: 9, sym: 27, unicode: 27, modifier: 0
18:12:55 T:140424760793120 M:1337446400   DEBUG: OnKey: 61467 pressed, action is PreviousMenu

With the network unplugged, and selecting the source just bringing up an error dialog box, the section reads:
Code:
18:16:53 T:140267139975200 M:1328074752   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
18:16:53 T:140267139975200 M:1328074752   DEBUG: OnKey: 61453 pressed, action is Select
18:16:53 T:140267139975200 M:1328074752    INFO: Loading skin file: DialogOK.xml
18:16:53 T:140267139975200 M:1328074752   DEBUG: Load DialogOK.xml: 2.27ms
18:16:53 T:140267139975200 M:1328074752   DEBUG: ------ Window Init (DialogOK.xml) ------
18:16:53 T:140267139975200 M:1328074752   DEBUG: Alloc resources: 0.03ms (0.00 ms skin load)
18:16:54 T:140267139975200 M:1328074752   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
18:16:54 T:140267139975200 M:1328074752   DEBUG: OnKey: 61453 pressed, action is Select
18:16:54 T:140267139975200 M:1327947776   DEBUG: ------ Window Deinit (DialogOK.xml) ------
18:16:55 T:140267139975200 M:1327955968   DEBUG: SDLKeyboard: scancode: 9, sym: 27, unicode: 27, modifier: 0
Reply
#7
@Firecat, have you confirmed that the MySQL username and password are correct? The default if not specified is username and password = "mythtv" as per http://wiki.xbmc.org/?title=MythTV#Setup_in_XBMC. The errors in the stderr log suggest the connection to the MySQL database isn't working. The "Guide" and "Live Channels" directories use MySQL and those are the ones with errors in the XBMC log.

If your /etc/hosts file looks like:
Code:
127.0.0.1    localhost
127.0.1.1    gisele
10.1.1.4    gismyth
then aren't XBMC and MythTV on different boxes (since gisele != gismyth)?

Have you run through the wiki page with regards to troubleshooting? http://wiki.xbmc.org/?title=MythTV#Trouble_Shooting
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
Reply

Logout Mark Read Team Forum Stats Members Help
MythTV Connection Problem0