sloflin72 / mythbox

Automatically exported from code.google.com/p/mythbox
GNU General Public License v2.0
0 stars 1 forks source link

Connect to MySQL failed: 1156 (08S01): Got packets out of order,10000) #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start XBMC, start MythBox Script 
2. Small error message stating the above on the bottom right
3. Test connection
4. Same error message

What is the expected output? What do you see instead?
I expect the connection to succeed :)

What version of the product are you using? On what operating system?

OS: Fedora 11 x86_64 on an Intel Atom 230
MythTV 0.21-fixes (mythtv-backend-0.21-20.fc11.x86_64) from rpmfusion
XBMC from SVN (Rev 24469)
MythBox SVN-1558

Please provide any additional information below.

This is not the same issue as #63. I already tried resetting the password,
which did not help. Probably a 64bit issue?

Original issue reported on code.google.com by markus.d...@gmail.com on 9 Nov 2009 at 10:26

GoogleCodeExporter commented 9 years ago
I would hazard a guess that this is not a 64bit issue as I don't encounter it 
on my
64bit install of Windows.  I can't recall if my Karmic install is 64bit or not, 
but i
don't experience it there either.

Original comment by m.joel.m...@gmail.com on 10 Nov 2009 at 12:12

GoogleCodeExporter commented 9 years ago
I dug into this a bit and found, that the client/server-communication is 
different
when using e.g. php. So it might not be mythbox's failure, but an error in the 
used
mysql connector library. I would as well report this to "upstream" then, if I 
knew,
where upstream is? Is it python.org?

Anyway, attached are the wireshark dumps, "mysqlok.txt" is the working 
connection,
with following PHP script, "mysqlnok.txt" the non-working connection from 
mythbox.
The interesting packets are 9 and following. It seems like mysql wants to send 
three
packets after login, and mythbox sends the "use database" directly after 
receiving
the first one -- hence "packets not in order".

This is the PHP script I used for testing:

$conn = mysql_connect('127.0.0.1', 'mythtv', '*******');
$res = mysql_select_db("mythconverg", $conn);
mysql_close($conn);

Original comment by markus.d...@gmail.com on 10 Nov 2009 at 9:20

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
An interesting observation with the wireshark dumps. 

In the working scenario, wireshark is not able to "recognize" the request byte
sequence in frame 9 (line 78) and tags it as "Unknown (79) (79)"

In the non-working scenario, wireshark is able to "recognize" the request byte
sequence in frame 9 (line 77) and tags it as "Request Use Database"

Without going into it further, it would seem the 5.1.37 mysql client/server 
protocol
has a slight change which neither wireshark or the pure python mysql client that
mythbox uses know about. Will follow up with upstream project @
https://launchpad.net/myconnpy

Original comment by semir.pa...@gmail.com on 11 Nov 2009 at 12:02

GoogleCodeExporter commented 9 years ago
Actually it's not part of the request, that wireshark does not recognize, but 
mysql
sends three packets after login. One without payload, the unrecognized one and 
then
"ok". 

The myconnpy client does not wait for all three packets to arrive, but sends 
the "use
database" immediately after the first (the empty one). I guess, that is the 
reason
for mysql bailing out with "packets out of order".

Anyway. Could you report this to upstream? I think I do not give a good reporter
there as I dont know python, don't know the version I am using in this case and 
how
to upgrade it (as it is the version bundled with xbmc, I guess) and also would 
not
know how to test patches to myconnpy.

Original comment by markus.d...@gmail.com on 11 Nov 2009 at 7:22

GoogleCodeExporter commented 9 years ago
No problem. I'm going to run the myconnpy unit tests in a Fedora 11 vm with 
mysql
5.1.37 just for grins.

Original comment by semir.pa...@gmail.com on 12 Nov 2009 at 1:52

GoogleCodeExporter commented 9 years ago
Looks like it is already a known issue. I'll update mythbox when the bug is 
fixed
upstream.  https://bugs.launchpad.net/myconnpy/+bug/380528

Original comment by semir.pa...@gmail.com on 22 Nov 2009 at 9:32

GoogleCodeExporter commented 9 years ago
Geert's guess in https://bugs.launchpad.net/myconnpy/+bug/380528 is right -- I 
had
old_passwords=1 in my my.cnf, which seems to be a distribution default.

After setting this to 0 and resetting all passwords, mythbox can connect to 
mysql and
now basically works. So I assume, this bug can be closed.

Now it's time to test the rest of mythbox :)

Thanks for the help!

Original comment by markus.d...@gmail.com on 23 Nov 2009 at 7:05

GoogleCodeExporter commented 9 years ago
Added solution as Q15 to the FAQ. You can verify in the attached build.

http://dl.dropbox.com/u/131337/mythbox-svn-1699.tar.gz

Original comment by semir.pa...@gmail.com on 22 Dec 2009 at 6:37