Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: MythTV could not connect to database

  1. #11
    Join Date
    Jun 2007
    Location
    Southampton, England
    Beans
    45

    Re: MythTV could not connect to database

    Bump

    Anyone?

  2. #12
    Join Date
    Dec 2008
    Beans
    10

    Re: MythTV could not connect to database

    What I have found is that if my router is not powered so that the default DHCP network configuration cannot take place, then Ubuntu doesn't appear to allow even the loop-back address (127.0.0.1, used when back and front end are installed on a single machine) to operate; giving the appearance that the front-end cannot communicate with the back-end.

    The solution I employed for this problem was to assign an IP address statically, so that the network stack always comes up.

  3. #13
    Join Date
    Mar 2007
    Location
    Christchurch, NZ
    Beans
    3,239

    Re: MythTV could not connect to database

    Quote Originally Posted by Addanc View Post
    What I have found is that if my router is not powered so that the default DHCP network configuration cannot take place, then Ubuntu doesn't appear to allow even the loop-back address (127.0.0.1, used when back and front end are installed on a single machine) to operate; giving the appearance that the front-end cannot communicate with the back-end.

    The solution I employed for this problem was to assign an IP address statically, so that the network stack always comes up.
    Well of course if your network is not up mysql and the backend will not work.

  4. #14
    Join Date
    Mar 2012
    Beans
    44

    Re: MythTV could not connect to database

    I think most users do not have this problem as they are using a wired ethernet connection, in which case it is trivial to apply a static network address which is there at boot. For those of us using a wireless connection how do you make it static?

  5. #15
    Join Date
    Mar 2008
    Beans
    1,086

    Re: MythTV could not connect to database

    Quote Originally Posted by jksj View Post
    I think most users do not have this problem as they are using a wired ethernet connection, in which case it is trivial to apply a static network address which is there at boot. For those of us using a wireless connection how do you make it static?
    There are at least three ways. The normal and probably best way is to enter your wireless router's setup routine. In this, there will be a setting whereby you can reserve a specific and defined IP address always to be leased to a specific device/MAC address when that device connects. The device (in this case your master backend) is still on DHCP, but always gets leased the same address at bootup. As far as Mythtv is concerned, this is good enough.

    The second and more old-fashioned method, generally more difficult on contemporary multi-device home networks, is to enter the wireless router's setup routine and disable the router's DHCP server. This puts the responsibility on the network administrator (you) to go into and configure Network Manager (or the equivalents on non-Ubuntu non-Gnome) for Static IP on each device: manually assign a valid non-conflicting IP address to each device on this network, enter the correct netmask value and enter the IP address of the gateway to the outside world.

    The third way --incorrect, and a bit block-headed, but sometimes functional for those who are either unable or unwilling to enter the setup routine on their wireless router-- is simply to choose an address from the range that the wireless router is configured to lease, but beyond the group that the router is likely to lease to the number of the devices on the subnet, and then set up Static IP on that one device alone (i.e. the myth master backend) to arrogate that chosen IP address to itself, even though there's no DHCP lease for that address.

    For example, if the class C wireless network were on 192.168.1.0, and there were 5 other devices and also your Mythtv master backend, on this network, then 192.168.1.1 would likely be your gateway address, and DHCP would generally lease the addresses 192.168.1.2-7 to the 6 total devices on your network. If the myth backend machine has static IP set to, say, 192.168.1.15, this is an address that would be unlikely to be assigned by DHCP to one of your other devices, and therefore an IP address conflict between your backend and another device is unlikely. Of course, in this example, if 8 of your closest friends come over for the evening, each toting his own wifi tablet, then you're busted with a guaranteed IP conflict. So in all this is the least satisfactory method.

    On my own network, I use static IP on all my ethernet boxes including my 3 myth backend-only machines, and two frontend-only machines. I have a separate subnet set up for normal wireless with DHCP, and from this subnet two frontend-only laptops and two frontend-only tablets connect.

  6. #16
    Join Date
    Mar 2012
    Beans
    44

    Re: MythTV could not connect to database

    High thanks for the pointers on setting up a static address. I already use the first one you mention ie locking the address which the wireless router allocates using DHCP. However if the router fails to allocate the address for some reason (fault with network provider modem) myth will not start. This is disconcerting as your main tv now has a dependence on your internet provider.
    I use a combined front/backend and on every startup the frontend (mythwelcome) shows a fail to connect status for about 30 seconds, then if the wireless network has started ok it connects and all is well. This is with the network address in Myth set to localhost!
    I understand the time delay is due to network manager, which only runs on user login taking time to allocate the address.
    My original question was how to make localhost valid early in the boot process before myth starts up when there is no hardwired ethernet connection.

  7. #17
    Join Date
    Mar 2008
    Beans
    1,086

    Re: MythTV could not connect to database

    Quote Originally Posted by jksj View Post
    High thanks for the pointers on setting up a static address. I already use the first one you mention ie locking the address which the wireless router allocates using DHCP. However if the router fails to allocate the address for some reason (fault with network provider modem) myth will not start. This is disconcerting as your main tv now has a dependence on your internet provider.
    I use a combined front/backend and on every startup the frontend (mythwelcome) shows a fail to connect status for about 30 seconds, then if the wireless network has started ok it connects and all is well. This is with the network address in Myth set to localhost!
    I understand the time delay is due to network manager, which only runs on user login taking time to allocate the address.
    My original question was how to make localhost valid early in the boot process before myth starts up when there is no hardwired ethernet connection.
    There are many potential ways to address these issues.

    1) Reserve the appropriate DHCP address in the router for your backend, but set up static IP for _that very same address_ on your backend machine anyway. No IP conflict, because the address is reserved for you, but you don't have to wait for your gimpy DHCP server in the router to dish out the address.

    2) Go to pure static IP on this subnet. No DHCP delays here, either.

    3) Put a "sleep 30" or similar delay at the start of the mythfrontend script to delay the frontend startup to after the network fully initializes. This has become a traditional workaround for mythfrontend startup timing issues.

    4) Network manager was added to Mythbuntu in 8.04, and has generally been slower than molasses, contributing timing problems to mythfrontend startup. Primarily (in my opinion) from misplacing what ought to happen early in init or upstart process well before Xinit to the graphical shell instead. Good for laptops, bad for everybody else. But Network Manager is not the only solution --wicd is possible and does its real work before X starts up. Also some of the more intrepid 8.04 users just ripped out Network Manager and composed upstart scripts to connect to their networks prior to X starting, using a command set more or less in accordance with what can now be found in places like sections 1.3 and 1.3.1 of a networking guide for 12.04 found here: http://ubuntuguide.org/wiki/Ubuntu_P...tic_IP_address

    One of these solutions or workarounds would be expected to work for you. There are likely to be several others.
    Last edited by klc5555; November 26th, 2012 at 07:08 PM.

  8. #18
    Join Date
    Jul 2008
    Beans
    218

    Re: MythTV could not connect to database

    Hi, just upgraded from 10.04 lts amd64 to 12.04 lts amd64. Everything OK on the main pc (frontend & backend), but cannot connect to database on remote frontend.
    I get the set country screen, then I'm presented with the database set option, and everything is as it shoud be: IP, ID, PWD, port... it does not work anymore. On Myth control the MySQL test is succesful; I can use MythWeb, connect to shares & control the PC with VNC...Tried uninstalling Myth (0.25) and reinstall, the same.
    Tried from a LiveCD 12.04 from a notebook: test ok but the frontend does not start.
    Any ideas? TIA

  9. #19
    Join Date
    Mar 2008
    Beans
    1,086

    Re: MythTV could not connect to database

    Is the mysqld service on the master backend still set to accept remote connections after the upgrade?

    Have you run "mythfrontend" from a terminal on one of the remote frontends to see what the output is on the screen when mythfrontend fails to connect? Have you taken a look at what the mythbackend log and the mythfrontend log indicate after one of the failed connect attempts? May give you a bit more data to debug your issue with.

  10. #20
    Join Date
    Jan 2011
    Beans
    5

    One solution

    I have:
    - 12.4 LTS 64bit server, mythweb and 3 mythfrontends
    - mythfrontend did not start
    - mythweb was ok
    - mysql worked
    - ping was ok

    Solution:

    a) I checked out "Check server availability" from setting
    and the its started.


    b) time to time I have had problem's if difrent time between
    sever and clients, booting, crash, poweroff,... then ntp time must be updated:
    > ntpdate ntp.ubuntu.com

    c) Several time's lost country / time zone after software upgrades
    and had to corect it:
    > dpkg-reconfigure tzdata

Page 2 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •