Probably avoidable (unclear) IndexError when connecting.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Connector/Python |
New
|
Undecided
|
Unassigned |
Bug Description
I am not sure what exactly causes the below problem, but I can pretty good predict /when/ it will happen:
I open a ssh tunnel to the mysql server and use this in the ~/.ssh/config:
LocalForward 10101 127.0.0.1:3306
I open a db connection with python to 127.0.0.1 port 10101.
I put my notebook to standby <<< here I am not sure if the above connection is still open or already closed.
The next morning I power on the notebook the ssh connection still sits there but timed out.
If I now try to connect with python to 127.0.0.1 port 10101 I get the below traceback.
If I then reestablish the ssh tunnel everything works fine.
But if I try to connect to 127.0.0.1 port 10101 with no ssh tunnel established, I get a nice and clean:
mysql.connector
Traceback (most recent call last):
File "/home/
import cypra.dl.db as db
File "/home/
import cypra.dblogger as log
File "/home/
__LOG_DB_CONN__ = db.connect(
File "/usr/lib/
return MySQL(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
buf = self.recv()[0]
File "/usr/lib/
(pktsize, pktnr) = self.protocol.
File "/usr/lib/
pktnr = utils.int1read(
IndexError: index out of range
Any idea what causes this?
Sorry this is a duplicate of Bug #528451.