0.27 -> 31 upgrade. Frontend can't login to database

For discussion of topics specific to MythTV on linux
Post Reply
MrGrumpyGuts
Newcomer
Posts: 4
Joined: Wed Jun 02, 2021 2:24 am
New Zealand

0.27 -> 31 upgrade. Frontend can't login to database

Post by MrGrumpyGuts »

I have been running mythtv for a while. Long enough for the frontend video card to fail and be irreplaceable. The new video card had no HDMI audio output under the existing o/s. I've tried and sworn off using downrev Myth versions. So it's time to upgrade.
To make things as easy as possible, I chose Ubu 20.04 for the frontend and XUbu 20.04 for the backed VM. I used the packages out of the release on both systems. Although I have muddied the water slightly by having to infer some of the process around new functionality. So have XMLTV/mythconverg backup/restore from upstream.
This is the backend log showing content for startup and one frontend connection attmpt:

Code: Select all

Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: C thread_unknown mythcommandlineparser.cpp:2602 (ConfigureLogging) mythbackend version: fixes/31 [v31.0-v31.0] mythtvsite
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: C thread_unknown mythcommandlineparser.cpp:2606 (ConfigureLogging) Qt version: compile: 5.12.5, runtime: 5.12.8
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown mythcommandlineparser.cpp:2608 (ConfigureLogging) Ubuntu 20.04.2 LTS (x86_64)
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: N thread_unknown mythcommandlineparser.cpp:2610 (ConfigureLogging) Enabled verbose msgs:  general
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: N thread_unknown logging.cpp:724 (logStart) Setting Log Level to LOG_INFO
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I Logger logging.cpp:280 (run) Added logging to the console
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Interrupt handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Terminated handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Segmentation fault handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Aborted handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Bus error handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Floating point exception handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Illegal instruction handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Real-time signal 0 handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) Setup Hangup handler
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: N thread_unknown mythdirs.cpp:203 (InitializeMythDirs) Using runtime prefix = /usr
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: N thread_unknown mythdirs.cpp:204 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythcorecontext.cpp:284 (Init) Assumed character encoding: en_US.UTF-8
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I LogForward loggingserver.cpp:248 (SyslogLogger) Added syslogging
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythcontext.cpp:629 (LoadDatabaseSettings) Empty LocalHostName. This is typical.
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythcontext.cpp:636 (LoadDatabaseSettings) Using a profile name of: 'mythtv-31-be0' (Usually the same as this host's name.)
Jun  1 19:11:16 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythcontext.cpp:885 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: N CoreContext mythcorecontext.cpp:1809 (InitLocale) Setting QT default locale to en_US
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythcorecontext.cpp:1842 (SaveLocaleDefaults) Current locale en_US
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: N CoreContext mythlocale.cpp:121 (LoadDefaultsFromXML) Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext platforms/mythpowerdbus.cpp:530 (AcquireLock) PowerDBus: Failed to delay sleep,shutdown: Permission denied
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythpower.cpp:348 (PowerLevelChanged) Power: On AC power
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythpower.cpp:131 (Init) Power: Supported actions: None
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythtranslation.cpp:62 (load) Loading en_us translation for module mythfrontend
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext schemawizard.cpp:117 (Compare) Current MythTV Schema Version (DBSchemaVer): 1361
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext mythtranslation.cpp:62 (load) Loading en_us translation for module mythfrontend
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: N CoreContext main_helpers.cpp:605 (run_backend) MythBackend: Starting up as the master server.
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:385 (Connect) HDHRSH[0](13186326): Added 3 devices from 13186326
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:402 (Connect) HDHRSH[0](13186326): Connected to device(13186326-0)
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:385 (Connect) HDHRSH[0](13186326): Added 3 devices from 13186326
Jun  1 19:11:17 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:402 (Connect) HDHRSH[0](13186326): Connected to device(13186326-0)
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:385 (Connect) HDHRSH[0](13186326): Added 3 devices from 13186326
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:402 (Connect) HDHRSH[0](13186326): Connected to device(13186326-0)
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:385 (Connect) HDHRSH[0](132538F2): Added 3 devices from 132538F2
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:402 (Connect) HDHRSH[0](132538F2): Connected to device(132538F2-0)
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:385 (Connect) HDHRSH[0](132538F2): Added 3 devices from 132538F2
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:402 (Connect) HDHRSH[0](132538F2): Connected to device(132538F2-0)
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:385 (Connect) HDHRSH[0](132538F2): Added 3 devices from 132538F2
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext recorders/hdhrstreamhandler.cpp:402 (Connect) HDHRSH[0](132538F2): Connected to device(132538F2-0)
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext programinfo.cpp:2299 (CheckProgramIDAuthorities) Found 1 distinct programid authorities
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I Scheduler mythdbcon.cpp:447 (getStaticCon) New static DB connectionSchedCon
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'LogClean'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'DBCleanup'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'ThemeUpdateNotifications'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'RecordedArtworkUpdate'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'MythFillDB'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'UpdateRadioStreams'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'JobQueueRecover'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask 'HardwareProfiler'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:729 (Start) Queueing HouseKeeperTask 'HardwareProfiler'.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:737 (Start) Starting HouseKeeper.
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP 0.0.0.0:6544
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP [::]:6544
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP 0.0.0.0:6554
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP [::]:6554
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP 0.0.0.0:6549
Jun  1 19:11:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP [::]:6549
Jun  1 19:11:21 mythtv-31-be0 mythbackend: mythbackend[124831]: I Scheduler scheduler.cpp:2308 (HandleReschedule) Reschedule requested for MATCH 0 0 0 - SchedulerInit
Jun  1 19:11:22 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext main_helpers.cpp:700 (run_backend) Main::Registering HttpStatus Extension
Jun  1 19:11:22 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP 0.0.0.0:6543
Jun  1 19:11:22 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext serverpool.cpp:418 (listen) Listening on TCP [::]:6543
Jun  1 19:11:23 mythtv-31-be0 mythbackend: mythbackend[124831]: N CoreContext autoexpire.cpp:242 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min
Jun  1 19:11:23 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext bonjourregister.cpp:115 (BonjourCallback) Bonjour: Service registration complete: name 'Mythbackend on mythtv-31-be0' type '_mythbackend._tcp.' domain: 'local.'
Jun  1 19:11:27 mythtv-31-be0 mythbackend: mythbackend[124831]: I Scheduler scheduler.cpp:2425 (HandleReschedule) Scheduled 216 items in 5.4 = 5.14 match + 0.12 check + 0.11 place
Jun  1 19:11:27 mythtv-31-be0 mythbackend: mythbackend[124831]: I Scheduler scheduler.cpp:2490 (HandleRunSchedulerStartup) Scheduler: Seem to be woken up by USER
Jun  1 19:12:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I CoreContext housekeeper.cpp:754 (Run) Queueing HouseKeeperTask 'JobQueueRecover'.
Jun  1 19:12:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I HouseKeeping housekeeper.cpp:144 (Run) Running HouseKeeperTask 'HardwareProfiler'.
Jun  1 19:12:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I HouseKeeping housekeeper.cpp:159 (Run) HouseKeeperTask 'HardwareProfiler' Failed.
Jun  1 19:12:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I HouseKeeping housekeeper.cpp:144 (Run) Running HouseKeeperTask 'JobQueueRecover'.
Jun  1 19:12:18 mythtv-31-be0 mythbackend: mythbackend[124831]: I HouseKeeping housekeeper.cpp:164 (Run) HouseKeeperTask 'JobQueueRecover' Finished Successfully.
Jun  1 19:12:37 mythtv-31-be0 mythbackend: mythbackend[124831]: N Expire autoexpire.cpp:242 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min
Jun  1 19:12:38 mythtv-31-be0 mythbackend: mythbackend[124831]: N Expire autoexpire.cpp:634 (SendDeleteMessages) Expiring 5710 MB for 1703 at 2015-02-12T04:59:00Z => "The 100":Rubicon
...
Jun  1 19:12:38 mythtv-31-be0 mythbackend: mythbackend[124831]: E CoreContext mainserver.cpp:3101 (DoHandleDeleteRecording) MainServer: ERROR when trying to delete file: myth://mythtv/1710_20150718203000.mpg. File doesn't exist.  Database metadata will not be removed.
Jun  1 19:12:38 mythtv-31-be0 mythbackend: mythbackend[124831]: E CoreContext mainserver.cpp:3101 (DoHandleDeleteRecording) MainServer: ERROR when trying to delete file: myth://mythtv/1710_20150711203000.mpg. File doesn't exist.  Database metadata will not be removed.
Jun  1 19:12:38 mythtv-31-be0 mythbackend: mythbackend[124831]: E CoreContext mainserver.cpp:3101 (DoHandleDeleteRecording) MainServer: ERROR when trying to delete file: myth://mythtv/1710_20150704203000.mpg. File doesn't exist.  Database metadata will not be removed.
Jun  1 19:12:38 mythtv-31-be0 mythbackend: mythbackend[124831]: E CoreContext mainserver.cpp:3101 (DoHandleDeleteRecording) MainServer: ERROR when trying to delete file: myth://mythtv/1710_20150530203000.mpg. File doesn't exist.  Database metadata will not be removed.
Every frontend start begins with attempts to connect to localhost which times out. The backend is found when the 'search' option is chosen, but double click just results in 'Waiting for database to start' which fails.
Entering connection details into the 'Setup' choice allows all previously recored content to be played. But recording mechanisms and Live TV, don't work.
Using telnet from the frontend to port 6543 produces backend diagnostics:

Code: Select all

Jun  1 19:53:57 mythtv-31-be0 mythbackend: mythbackend[124831]: E MythSocketThread(50) mythsocket.cpp:849 (ReadStringListReal) MythSocket(5644fe2329e0:50): Protocol error: 'Give me ' is not a valid size prefix. 36 bytes pending.
Jun  1 19:53:57 mythtv-31-be0 mythbackend: mythbackend[124831]: I ProcessRequest mainserver.cpp:490 (ProcessRequestWork) MainServer: No data in ProcessRequestWork()
Jun  1 19:54:04 mythtv-31-be0 mythbackend: mythbackend[124831]: I MythSocketThread(50) mainserver.cpp:7909 (connectionClosed) Control sock(5644fe2329e0) disconnected
Jun  1 19:54:04 mythtv-31-be0 mythbackend: mythbackend[124831]: E MythSocketThread(50) mythsocket.cpp:824 (ReadStringListReal) MythSocket(5644fe2329e0:-1): ReadStringList: Connection died.
The frontend's current config is:

Code: Select all

$ cat .mythtv/config.xml 
<Configuration>
  <UPnP>
    <MythFrontend>
      <DefaultBackend>
        <USN>uuid:bd5500a7-8e83-476c-b7dc-e02e64927dc5::urn:schemas-mythtv-org:device:MasterMediaServer:1</USN>
      </DefaultBackend>
    </MythFrontend>
    <UDN>
      <MediaRenderer>4e53bf97-a8ce-4546-8c58-1cccb3f21636</MediaRenderer>
    </UDN>
  </UPnP>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>mythtv-31-be0</Host>
    <UserName>mythtv</UserName>
    <Password>XXXXXXXX</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>
Using those credentials the backend settings are:

Code: Select all

$ mysql -u mythtv -h mythtv-31-be0 -p mythconverg
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 508
Server version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu)

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select * from settings where hostname like 'mythtv-31%';
+-----------------------------+--------------------------------------+---------------+
| value                       | data                                 | hostname      |
+-----------------------------+--------------------------------------+---------------+
| MasterServerIP              | 192.168.255.34                       | mythtv-31-be0 |
| UPnP/UDN/MasterMediaServer  | bd5500a7-8e83-476c-b7dc-e02e64927dc5 | mythtv-31-be0 |
| BackendServerIP             | 192.168.255.34                       | mythtv-31-be0 |
| DateFormat                  | ddd MMM d yyyy                       | mythtv-31-be0 |
| MythArchiveDateFormat       | %a %b %d %Y                          | mythtv-31-be0 |
| MythArchiveTimeFormat       | %I:%M %p                             | mythtv-31-be0 |
| MythArchiveVideoFormat      | NTSC                                 | mythtv-31-be0 |
| ShortDateFormat             | M/d                                  | mythtv-31-be0 |
| TimeFormat                  | h:mm AP                              | mythtv-31-be0 |
| BackendServerPort           | 6543                                 | mythtv-31-be0 |
| BackendStatusPort           | 6544                                 | mythtv-31-be0 |
| AllowConnFromAll            | 1                                    | mythtv-31-be0 |
| ListenOnAllIps              | 1                                    | mythtv-31-be0 |
| BackendServerAddr           | mythtv-31-be0                        | mythtv-31-be0 |
| TruncateDeletesSlowly       | 0                                    | mythtv-31-be0 |
| DisableFirewireReset        | 0                                    | mythtv-31-be0 |
| JobQueueMaxSimultaneousJobs | 1                                    | mythtv-31-be0 |
| JobQueueCheckFrequency      | 60                                   | mythtv-31-be0 |
| JobQueueWindowStart         | 00:00                                | mythtv-31-be0 |
| JobQueueWindowEnd           | 23:59                                | mythtv-31-be0 |
| JobQueueCPU                 | 0                                    | mythtv-31-be0 |
| JobAllowMetadata            | 1                                    | mythtv-31-be0 |
| JobAllowCommFlag            | 1                                    | mythtv-31-be0 |
| JobAllowTranscode           | 1                                    | mythtv-31-be0 |
| JobAllowPreview             | 1                                    | mythtv-31-be0 |
| JobAllowUserJob1            | 0                                    | mythtv-31-be0 |
| JobAllowUserJob2            | 0                                    | mythtv-31-be0 |
| JobAllowUserJob3            | 0                                    | mythtv-31-be0 |
| JobAllowUserJob4            | 0                                    | mythtv-31-be0 |
| UPnP/UDN/MediaServer        | 69596796-0f12-4849-80a8-59d02f3df9ca | mythtv-31-be0 |
| SecurityPin                 | 0000                                 | mythtv-31-be0 |
+-----------------------------+--------------------------------------+---------------+
31 rows in set (0.01 sec)

mysql> ^DBye
I believe the above shows that the database received an import of the backup of the previous operating state. That the backend is started and that both it and the database are reachable from the frontend.

I'm hoping that someone can help me restore household peace by allow more recordings of 'Below Deck'. :lol:
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: 0.27 -> 31 upgrade. Frontend can't login to database

Post by bill6502 »

Checkout Master Backend Name in mythtv-setup. I don't see it set in the
settings dump above.

Note: nmap -p6543 --reason yourBackendHostnameOrIP is a better choice to see if
the backend is accepting connections. telnet sends too much data as you saw.

Please use the code icon rather than the quote icon for logs etc. Thanks.
MrGrumpyGuts
Newcomer
Posts: 4
Joined: Wed Jun 02, 2021 2:24 am
New Zealand

Re: 0.27 -> 31 upgrade. Frontend can't login to database

Post by MrGrumpyGuts »

Thanks for the reply, I wasn't expecting one that quickly.

Code: Select all

$ nmap -p6543 --reason mythtv-31-be0
Starting Nmap 7.80 ( nmapsource ) at 2021-06-01 22:11 PDT
Nmap scan report for mythtv-31-be0 (192.168.255.34)
Host is up, received syn-ack (0.00036s latency).
rDNS record for 192.168.255.34: mythtv-31-be0.XXXXXX

PORT     STATE SERVICE REASON
6543/tcp open  mythtv  syn-ack

Nmap done: 1 IP address (1 host up) scanned in 0.17 seconds
Does leave a mark in the backend log:

Code: Select all

Jun  1 22:10:02 mythtv-31-be0 mythbackend: mythbackend[124831]: I MythSocketThread(57) mainserver.cpp:7856 (connectionClosed) Monitor sock(5644fdf2a2c0) 'mythtv-31-be0' disconnected
Jun  1 22:11:12 mythtv-31-be0 mythbackend: mythbackend[124831]: I MythSocketThread(57) mainserver.cpp:7909 (connectionClosed) Control sock(5644fdf2a2c0) disconnected
But I wouldn't have been confident enough that it was made by my action on the front end. Happy to use your greater knowledge to retry though.

WRT the missing settings, is it obvious to you which steps I might have missed initial configuration? The ubuntu packages only seem to have mythtv-setup and I only saw the backend settings under General there. I should also say that I found a couple of hits in the google results not presented by the local search which included a case where someone manually added settings via SQL. I didn't understand the semantics of the hostname column and deleted entries for the 'old' install and inserted/modified rows for some data:

Code: Select all

mysql> select * from settings where value in ("BackendServerIP","MasterServerIP");
+-----------------+-----------------+----------+
| value           | data            | hostname |
+-----------------+-----------------+----------+
| BackendServerIP | 192.168.1.147   | hydra    |
| BackendServerIP | 192.168.255.250 | mythtv   |
| BackendServerIP | 192.168.255.250 | mythtv   |
| MasterServerIP  | 127.0.1.1       | NULL     |
+-----------------+-----------------+----------+
4 rows in set (0.00 sec)
...
mysql> select * from settings where value in ("BackendServerIP","MasterServerIP");
+-----------------+----------------+---------------+
| value           | data           | hostname      |
+-----------------+----------------+---------------+
| BackendServerIP | 192.168.255.34 | mythtv-31-be0 |
| MasterServerIP  | 192.168.255.34 | mythtv-31-be0 |
+-----------------+----------------+---------------+
2 rows in set (0.00 sec)
neither hydra, nor mythtv hosts will ever be backend hosts in the future, but given the other topic I discovered and the occurrence of 127.1.1 in the frontend behaviour I thought it might be required.

Thanks very much for your time, I appreciate it.
MrGrumpyGuts
Newcomer
Posts: 4
Joined: Wed Jun 02, 2021 2:24 am
New Zealand

Re: 0.27 -> 31 upgrade. Frontend can't login to database

Post by MrGrumpyGuts »

My apologies, I was distracted by the less relevant part of your response, I noticed on re-reading that you infact did mention specific setup, but I believe I have done that correctly:
HostAddressBackendSetup.png
HostAddressBackendSetup.png (166.59 KiB) Viewed 4167 times
I may have found something significant. While capturing the above, I noticed the following flit by the the slaved xterm:

Code: Select all

2021-06-01 23:17:33.564034 I  Current MythTV Schema Version (DBSchemaVer): 1361
2021-06-01 23:17:33.566518 I  MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.1.1:6543 (try 1 of 1)
2021-06-01 23:17:33.566967 E  MythSocket(55da93e24f00:-1): Failed to connect to (127.0.1.1:6543) Connection refused
2021-06-01 23:17:33.567111 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
It bugged me that there was again a reference to 127.1.1, so on a hunch I tried:

Code: Select all

luser@mythtv-31-be0:~$ host mythtv-31-be0
mythtv-31-be0.ramona.purple-people.org has address 192.168.255.34
luser@mythtv-31-be0:~$ getent hosts mythtv-31-be0
127.0.1.1       mythtv-31-be0
I _think_ it might be possible to change the behaviour with nsswitch.conf, but it's easier to just comment out the entry:

Code: Select all

$ grep 127.0.1.1 /etc/hosts
#127.0.1.1	mythtv-31-be0
It's late and hot and a schoolnight, so I'll have to confirm impact tomorrow. Thanks again for your help, and I hope this isn't documented somewhere obvious as an ubuntu behaviour meaning I'd wasted your time.
Cheers
MrGrumpyGuts
Newcomer
Posts: 4
Joined: Wed Jun 02, 2021 2:24 am
New Zealand

Re: 0.27 -> 31 upgrade. Frontend can't login to database

Post by MrGrumpyGuts »

The frontend now starts, there were 3 new recordings made after the upgrade and they are playable. There are other issues but I think it makes sense to ask about them in separate topics. Thanks again for your help.
User avatar
Steve Goodey
Moderator
Posts: 219
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: 0.27 -> 31 upgrade. Frontend can't login to database

Post by Steve Goodey »

If you're happy with the fix could you possibly added [Solved] to the subject line in the first post?

Ta.
Don't forget the Wiki.
Post Reply