Lost connection to MySQL server at 'reading authorization packet', system error: 104

Posted 2022-04-29 23:58 by azri.

More rarely, it can happen when the client is attempting the initial connection to the server. In this case, if your connect_timeout value is set to only a few seconds, you may be able to resolve the problem by increasing it to ten seconds, perhaps more if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using SHOW STATUS LIKE 'aborted_connections'. It will increase by one for each initial connection attempt that the server aborts. You may see “reading authorization packet” as part of the error message; if so, that also suggests that this is the solution that you need.

 

https://stackoverflow.com/questions/21091850/error-2013-hy000-lost-connection-to-mysql-server-at-reading-authorization-pa

Traceback (most recent call last):

  File "/home/pi/adsb-receiver/build/portal/python/flights.fa.py", line 1056, in <module>

    processor.processAircraftList(data["aircraft"]) #PROBLEM HERE!!! 205

  File "/home/pi/adsb-receiver/build/portal/python/flights.fa.py", line 97, in processAircraftList

    db = self.connectDB()

  File "/home/pi/adsb-receiver/build/portal/python/flights.fa.py", line 93, in connectDB

    db=self.config["database"]["db"])

  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 86, in Connect

    return Connection(*args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__

    super(Connection, self).__init__(*args, **kwargs2)

_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'reading authorization packet', system error: 104")

  2022/04/29_13:23:32

Waiting for data... (interrupt to abort)

 

 

7.processPositions

staBbRgInserted position w/ Squawk (6545L, '2022/04/29 05:22:23', 12337, u'2174', 5.705303, 115.480515, 89.0, 12400, -2048, 342.1, -5.6, 3995L)

6e.Check if position data is available

5e.aircraft.has_key flight

5.processAircraft

5b.Updating Aircraft: 86d244

5c.Found Aircraft ID: 3911

5d.check if aircraft.has_key

6.processFlight

6c.Updated Flight: ANA1971(3911L, '2022/04/29 05:22:23', u'ANA1971')

6d.Get Flight ID 

7.processPositions

staBbRgInserted position w/ Squawk (6609L, '2022/04/29 05:22:23', 9051, u'3713', 3.808136, 114.397702, 218.5, 40000, 0, 489.6, -8.2, 3911L)

6e.Check if position data is available

5e.aircraft.has_key flight

Last Run: 2022/04/29 13:22:57

____________________________________________________________________________________________

4.processAircraftList

3.connectDB

2.setupDBStatements

Traceback (most recent call last):

  File "/home/pi/adsb-receiver/build/portal/python/flights.fa.py", line 1056, in <module>

    processor.processAircraftList(data["aircraft"]) #PROBLEM HERE!!! 205

  File "/home/pi/adsb-receiver/build/portal/python/flights.fa.py", line 97, in processAircraftList

    db = self.connectDB()

  File "/home/pi/adsb-receiver/build/portal/python/flights.fa.py", line 93, in connectDB

    db=self.config["database"]["db"])

  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 86, in Connect

    return Connection(*args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 204, in __init__

    super(Connection, self).__init__(*args, **kwargs2)

_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'reading authorization packet', system error: 104")

9. Main

1.flightsprocessor

4.processAircraftList

3.connectDB

2.setupDBStatements

5.processAircraft

5b.Updating Aircraft: 8a07ec

5c.Found Aircraft ID: 3837

5d.check if aircraft.has_key

6.processFlight

6c.Updated Flight: MYU7711(3837L, '2022/04/29 05:23:41', u'MYU7711')

6d.Get Flight ID 

7.processPositions

staBbRgInserted position w/ Squawk (3640L, '2022/04/29 05:23:41', 2134, u'2265', 4.499367, 113.912264, 69.0, 28100, -2304, 430.5, -4.1, 3837L)

6e.Check if position data is available

5e.aircraft.has_key flight