[mythtv-users] Mythbackend error: Failed to connect to (127.0.0.1:6543)
Stephen Worthington
stephen_agent at jsw.gen.nz
Wed Nov 7 07:45:04 UTC 2018
On Wed, 7 Nov 2018 07:07:03 +0000, you wrote:
>I am building a new mythtv backend on a Mint 19 system using MariaDB.
>
>When the backend starts I get a connection refused error:
>
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: C thread_unknown
>mythcommandlineparser.cpp:2619 (ConfigureLogging) mythbackend version:
>fixes/29 [v29.1-41-gd8a2db7] www.mythtv.org
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: C thread_unknown
>mythcommandlineparser.cpp:2621 (ConfigureLogging) Qt version: compile:
>5.9.5, runtime: 5.9.5
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: N thread_unknown
>mythcommandlineparser.cpp:2623 (ConfigureLogging) Enabled verbose msgs:
>general
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: N thread_unknown
>logging.cpp:927 (logStart) Setting Log Level to LOG_INFO
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I Logger
>logging.cpp:313 (run) Added logging to the console
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Interrupt handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Terminated handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Segmentation fault handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Aborted handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Bus error handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Floating point exception
>handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Illegal instruction handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Real-time signal 0 handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I thread_unknown
>signalhandling.cpp:194 (SetHandlerPrivate) Setup Hangup handler
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: N thread_unknown
>mythdirs.cpp:195 (InitializeMythDirs) Using runtime prefix = /usr
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: N thread_unknown
>mythdirs.cpp:197 (InitializeMythDirs) Using configuration directory =
>/home/mythtv/.mythtv
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I CoreContext
>mythcorecontext.cpp:271 (Init) Assumed character encoding: en_GB.UTF-8
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: N CoreContext
>mythcontext.cpp:599 (LoadDatabaseSettings) Empty LocalHostName.
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I CoreContext
>mythcontext.cpp:607 (LoadDatabaseSettings) Using localhost value of antec300
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I CoreContext
>mythcontext.cpp:852 (TestDBconnection) Start up testing connections. DB
>localhost, BE , attempt 0, status dbAwake
>Nov 7 06:11:43 antec300 mythbackend: mythbackend[1573]: I LogForward
>loggingserver.cpp:302 (SyslogLogger) Added syslogging
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: N CoreContext
>mythcorecontext.cpp:1768 (InitLocale) Setting QT default locale to en_GB
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: I CoreContext
>mythcorecontext.cpp:1801 (SaveLocaleDefaults) Current locale en_GB
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: N CoreContext
>mythlocale.cpp:123 (LoadDefaultsFromXML) Reading locale defaults from
>/usr/share/mythtv//locales/en_gb.xml
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: I CoreContext
>mythtranslation.cpp:73 (load) Loading en_gb translation for module
>mythfrontend
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: I CoreContext
>schemawizard.cpp:120 (Compare) Current MythTV Schema Version (DBSchemaVer):
>1348
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: I CoreContext
>mythtranslation.cpp:73 (load) Loading en_gb translation for module
>mythfrontend
>Nov 7 06:11:44 antec300 mythbackend: mythbackend[1573]: E
>MythSocketThread(-1) mythsocket.cpp:698 (ConnectToHostReal)
>MythSocket(55a92e1135d0:-1): Failed to connect to (127.0.0.1:6543)
>Connection refused
>===============================
>config.xml is:
>
>paul at antec300:~$ sudo cat /home/mythtv/.mythtv/config.xml
><Configuration>
> <Database>
> <PingHost>1</PingHost>
> <Host>localhost</Host>
> <UserName>mythtv</UserName>
> <Password>fNrQdxxx</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>
>
>paul at antec300:~$
>
>===============================
>Based on some other posts I checked mythconverg db:
>
>paul at antec300:~$ mysql --host=localhost --user=mythtv --password=fNrQdxxx
>mythconverg
>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 MariaDB monitor. Commands end with ; or \g.
>Your MariaDB connection id is 41
>Server version: 10.1.34-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
>
>Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
>
>Type 'help;' or '\h' for help. Type '\c' to clear the current input
>statement.MariaDB [mythconverg]> select * from settings where value like
>'%serverip%'
> -> ;
>+------------------+--------------+-------------------+
>| value | data | hostname |
>+------------------+--------------+-------------------+
>| BackendServerIP | 192.168.1.11 | antec300.home.org |
>| MasterServerIP | 127.0.0.1 | NULL |
>| BackendServerIP6 | ::1 | antec300.home.org |
>+------------------+--------------+-------------------+
>3 rows in set (0.00 sec)
>
>====================================
>Also:
>
>paul at antec300:~$ hostnamectl
> Static hostname: antec300
> Icon name: computer-desktop
> Chassis: desktop
> Machine ID: 0be4b885ddb347e5bc70559303dca99f
> Boot ID: d2ae9489464b4c1b9c861aa1dd1482be
> Operating System: Linux Mint 19
> Kernel: Linux 4.15.0-20-generic
> Architecture: x86-64
>
>paul at antec300:~$ sudo cat /etc/hosts
>127.0.0.1 localhost
>127.0.1.1 antec300.home.org
>
># The following lines are desirable for IPv6 capable hosts
>::1 ip6-localhost ip6-loopback
>fe00::0 ip6-localnet
>ff00::0 ip6-mcastprefix
>ff02::1 ip6-allnodes
>ff02::2 ip6-allrouters
>
>paul at antec300:~$ wget localhost:6543
>--2018-11-07 06:20:15-- http://localhost:6543/
>Resolving localhost (localhost)... 127.0.0.1
>Connecting to localhost (localhost)|127.0.0.1|:6543... failed: Connection
>refused.
>=============================================================
>
>So what am I doing wrong?
>
>regards, paul
Port 6543 is a port that mythbackend uses to listen on - it is created
by mythbackend. It also connects to itself on that port. Is it
possible that some other program is also using that port? To find
out, use this command:
netstat -alnp | grep 6543
This is what I get with mythbackend and mythfrontend.real running:
tcp 0 0 0.0.0.0:6543 0.0.0.0:* LISTEN
2961/mythbackend
tcp 0 0 127.0.0.1:6543 127.0.0.1:48406
ESTABLISHED 2961/mythbackend
tcp 0 0 127.0.0.1:48406 127.0.0.1:6543 ESTABLISHED
8113/mythfrontend.r
tcp 0 0 127.0.0.1:6543 127.0.0.1:48408
ESTABLISHED 2961/mythbackend
tcp 0 0 127.0.0.1:56110 127.0.0.1:6543 TIME_WAIT
-
tcp 0 0 127.0.0.1:56112 127.0.0.1:6543 TIME_WAIT
-
tcp 0 0 10.0.2.4:6543 10.0.2.4:58904 ESTABLISHED
2961/mythbackend
tcp 0 0 10.0.2.4:58904 10.0.2.4:6543 ESTABLISHED
23203/perl
tcp 0 0 127.0.0.1:48408 127.0.0.1:6543 ESTABLISHED
8113/mythfrontend.r
tcp6 0 0 :::6543 :::* LISTEN
2961/mythbackend
More information about the mythtv-users
mailing list