- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: MySQL: 'Packets out of order 2<>1' for Ruby bi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 08:04 AM
тАО04-04-2008 08:04 AM
my = Mysql::new("localhost","root","xxxxxx","testdb")
RuntimeError: Packets out of order: 2<>1
from ./mysql.rb:1019:in `read'
from ./mysql.rb:444:in `read'
from ./mysql.rb:130:in `real_connect'
from ./mysql.rb:91:in `initialize'
from (irb):2:in `new'
from (irb):2
Now, I don't expect anyone else uses Ruby on VMS, but I wonder if other language bindings (e.g. Perl) work, and if so, how? I don't know where to begin debugging. I took a brief look at the code where the error occurs but it was not obvious what might be wrong:
def read()
buf = []
len = nil
@sock.sync = false
while len == nil or len == MAX_PACKET_LENGTH do
a = @sock.read(4)
len = a[0]+a[1]*256+a[2]*256*256
pkt_nr = a[3]
if @pkt_nr != pkt_nr then
raise "Packets out of order: #{@pkt_nr}<>#{pkt_nr}"
end
@pkt_nr = @pkt_nr + 1 & 0xff
buf << @sock.read(len)
end
@sock.sync = true
buf.join
end
I see that in mysql.rb the Unix socket is defaulted to /tmp/mysql.sock. Now, surely Unix sockets don't work on VMS. Could this be related to my problem?
The setup program for this package attempts to determine the correct value with:
mysql_config --socket
but the VMS implementation of MySQL doesn't seem to have this utility.
Ben
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 04:11 PM
тАО04-04-2008 04:11 PM
Solutionhttp://tinyurl.com/6h9kok
but most of them must be wrong or there wouldn't be so many. The two I thought were most interesting were:
1.) replacing 'localhost' with 127.0.0.1 to make sure you follow the TCP/IP socket code path rather than the one for UNIX domain sockets. This is in a part of the code you did not quote:
if (host == nil or host == "localhost") and defined? UNIXSocket then
If the UNIXSocket extension (or plug-in or whatever you call them in Ruby) is present, it just might be defined even if the infrastructure it would need to work is not there.
2.) The other thing at the link cited above that was at least intriguing if kind of scary is changing the settings that control byte order to use network rather than native order. I could be wrong but I have the impression MySQL uses the same byte order on all platforms in order to make databases portable, but Ruby would almost surely use native ints, so this could involve fiddling.
There appear to be at least three MySQL bindings for Ruby, one of which uses the client library that ships with the database to do this sort of low-level byte shuffling; my money would be on that one rather than the pure-Ruby solution. Most likely there is an ODBC option as well.
As far as Perl goes, the usual path is the DBI library with the appropriate DBD extension. I've never used DBD::MySQL, but don't know of any reason it wouldn't work. I use DBD::Sybase with some frequency.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 10:03 PM
тАО04-04-2008 10:03 PM
Re: MySQL: 'Packets out of order 2<>1' for Ruby binding
Also 5.1.11 is fairly old there is a port of 5.1.22 on IA64 and 5.1.23 on AXP. We are working on a release of 5.1.23 IA64 kit, but I don't have any schedule.
You can take a look at
http://vmsmysql.dyndns.org/
mysql_config is a shell script which has not (yet?) been ported
If someone want to translate it into DCL he is welcome :-)
JF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2008 10:10 PM
тАО04-04-2008 10:10 PM
Re: MySQL: 'Packets out of order 2<>1' for Ruby binding
JF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2008 02:40 AM
тАО04-05-2008 02:40 AM
Re: MySQL: 'Packets out of order 2<>1' for Ruby binding
>>>mysql_config is a shell script which has not (yet?) been ported
If someone want to translate it into DCL he is welcome :-)
May be you should install GNV
http://gnv.sourceforge.net/
and just run mysql_config in gnv on your Vms ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2008 03:01 AM
тАО04-07-2008 03:01 AM
Re: MySQL: 'Packets out of order 2<>1' for Ruby binding
As for the new version, I had wondered if that were ready. I didn't find it easy to locate. I'll see if we can upgrade. Are there specific issues with the older release you can think of that I should watch out for? I'd like to know now if I can proceed with testing on this older version to decide if we're going to be successful before investing further resources to this project, or if I should upgrade immediately.
GNV? Sounds like overkill :) But yeah, we have GNV lying around. Still, a DCL translation of the script would be better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2008 03:51 AM
тАО04-07-2008 03:51 AM
Re: MySQL: 'Packets out of order 2<>1' for Ruby binding
http://www.tmtm.org/en/mysql/ruby/
* MySQL 5.0.51a
* Ruby 1.8.6, 1.9.0
We have the first one covered with jfp's beta, but the second could only be satisfied with JRuby at this time, and we're not ready to go there yet. So things are not looking good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2008 09:37 AM
тАО04-07-2008 09:37 AM
Re: MySQL: 'Packets out of order 2<>1' for Ruby binding
OpenVMS Developer & System Manager