[mythtv-users] Can't connect to remote backend database (again)

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Aug 21 09:49:26 UTC 2021


On Sat, 21 Aug 2021 16:27:17 +1000, you wrote:

>>
>>
>> Run Wireshark or tshark or tcpdump on the backend box and capture the
>> traffic from the Chromecast with Google TV and see if it is actually
>> ever trying to connect to the database.  Just use a "host
>> 192.168.0.125" capture filter to only see the traffic from the
>> Chromecast with Google TV.
>>
>
>Hi Simon, thanks for your suggestion. I've captured the traffic with tshark
>and I get this repeated a few times:
>
>  147 88.911855731 192.168.0.120 ? 192.168.0.125 MySQL 161 Server Greeting
>proto=10 version=8.0.26-0ubuntu0.20.04.2
>  148 88.912727650 192.168.0.125 ? 192.168.0.120 TCP 66 39502 ? 3306 [ACK]
>Seq=1 Ack=96 Win=87808 Len=0 TSval=131226266 TSecr=1186449381
>  149 88.915360803 192.168.0.125 ? 192.168.0.120 MySQL 232 Login Request
>user=mythtv db=mythconverg
>  150 88.915367067 192.168.0.120 ? 192.168.0.125 TCP 66 3306 ? 39502 [ACK]
>Seq=96 Ack=167 Win=65152 Len=0 TSval=1186449385 TSecr=131226267
>  151 88.915469028 192.168.0.120 ? 192.168.0.125 MySQL 114 Auth Switch
>Request
>  152 88.917330547 192.168.0.125 ? 192.168.0.120 TCP 66 39502 ? 3306 [FIN,
>ACK] Seq=167 Ack=144 Win=87808 Len=0 TSval=131226267 TSecr=1186449385
>  153 88.917457270 192.168.0.120 ? 192.168.0.125 MySQL 121 Response Error
>1158
>  154 88.917470722 192.168.0.120 ? 192.168.0.125 TCP 66 3306 ? 39502 [FIN,
>ACK] Seq=199 Ack=168 Win=65152 Len=0 TSval=1186449387 TSecr=131226267
>  155 88.918298535 192.168.0.125 ? 192.168.0.120 TCP 60 39502 ? 3306 [RST]
>Seq=168 Win=0 Len=0
>  156 88.918774149 192.168.0.125 ? 192.168.0.120 TCP 60 39502 ? 3306 [RST]
>Seq=168 Win=0 Len=0
>  157 89.996525845 34:0a:33:87:ad:00 ? Broadcast    ARP 60 Who has
>192.168.0.125? Tell 192.168.0.204
>  158 89.999819001 192.168.0.125 ? 192.168.0.120 TCP 74 39504 ? 3306 [SYN]
>Seq=0 Win=65535 Len=0 MSS=1460 SACK_PERM=1 TSval=131226538 TSecr=0 WS=256
>  159 89.999861548 192.168.0.120 ? 192.168.0.125 TCP 74 3306 ? 39504 [SYN,
>ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM=1 TSval=1186450469
>TSecr=131226538 WS=128
>  160 90.000509424 192.168.0.125 ? 192.168.0.120 TCP 66 39504 ? 3306 [ACK]
>Seq=1 Ack=1 Win=87808 Len=0 TSval=131226538 TSecr=1186450469
>
>So at least I know the request is reaching the backend database. But what I
>can't work out is why it's returning an error. From what I can find online
>error 1158 means "Got an error reading communication packets". How would I
>go about resolving this?

If the Chromecast with Google TV device was a normal Linux box, I
would be trying this command to see if it is possible to login to the
database:

mysql -h 192.168.0.120 -u mythtv mythconverg

Does it have a terminal session that you can use for that?  Does it
have the mysql command installed?  If not, then you could make sure
the CGTV device is powered off (so it is not using its IP address),
and then use a virtual machine and set it to use the CGTV's IP address
as a static IP address and see if the command works from there.  The
VM would need to be set to use bridged networking so that it is
connected to the same subnet that your CGTV and MythTV backend boxes
are.  And then capture the packets for a good login and compare them
to the bad login above.


More information about the mythtv-users mailing list