TCPSocket -> Wrong error on Windows?

Discussion in 'Ruby' started by Stephan Kämper, Nov 29, 2003.

  1. Hi all,

    I'm playing around with net connections a bit and ran into this behaviour:
    (Note, that there's no partner running on the given port.)

    C:\>irb
    irb(main):001:0> require "socket"
    => true
    irb(main):002:0> session = TCPSocket.new( 'localhost', 12345 )
    Errno::E061: Die Druckerwarteschlange ist voll. - connect(2)
    from (irb):2:in `initialize'
    from (irb):2:in `new'
    from (irb):2
    irb(main):003:0> exit

    What's happening?
    "Die Druckerwarteschlange ist voll." means something like "The printer queue is full".
    Hmm, for me the translation doesn't help a lot.

    Does anyone have an idea, why I get ... a wrong error?
    I'm running the Win installer version from Dave and Andy on a Win98SE.

    BTW, trying this one the identical hardware, but using an OS I get the appropriate error:

    stk@tao:~> irb
    irb(main):001:0> require 'socket'
    => true
    irb(main):002:0> session = TCPSocket.new( 'localhost', 12345 )
    Errno::ECONNREFUSED: Connection refused - connect(2)
    from (irb):2:in `initialize'
    from (irb):2:in `new'
    from (irb):2
    irb(main):003:0>

    That makes more sense.

    Have a nice world

    Stephan
    Stephan Kämper, Nov 29, 2003
    #1
    1. Advertising

  2. Stephan Kämper

    Guest

    Hi,

    At Sun, 30 Nov 2003 07:57:11 +0900,
    Stephan Kämper wrote:
    > What's happening?
    > "Die Druckerwarteschlange ist voll." means something like "The printer queue is full".
    > Hmm, for me the translation doesn't help a lot.


    I think it had been fixed already.

    > Does anyone have an idea, why I get ... a wrong error?
    > I'm running the Win installer version from Dave and Andy on a Win98SE.


    What version is it?

    --
    Nobu Nakada
    , Nov 30, 2003
    #2
    1. Advertising

  3. Stephan Kämper

    Joey Gibson Guest

    --------------030509090907000500070906
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed
    Content-Transfer-Encoding: 8bit

    On 11/29/2003 8:24 PM, wrote:

    >Hi,
    >
    >At Sun, 30 Nov 2003 07:57:11 +0900,
    >Stephan Kämper wrote:
    >
    >
    >>What's happening?
    >>"Die Druckerwarteschlange ist voll." means something like "The printer queue is full".
    >>Hmm, for me the translation doesn't help a lot.
    >>
    >>

    >
    >I think it had been fixed already.
    >
    >
    >
    >>Does anyone have an idea, why I get ... a wrong error?
    >>I'm running the Win installer version from Dave and Andy on a Win98SE.
    >>
    >>

    >
    >What version is it?
    >
    >
    >

    I just ran this test on a WinXP box using the installer ruby180-10.exe
    and I get the same error, though it's in english, not German:

    irb(main):001:0> require 'socket'
    => true
    irb(main):002:0> session = TCPSocket.new("localhost", 12345)
    Errno::E061: The printer queue is full. - connect(2)
    from (irb):2:in `initialize'
    from (irb):2:in `new'
    from (irb):2


    --
    Never trust a girl with your mother's cow
    never let your trousers go falling down in the green grass...

    http://www.joeygibson.com/blog
    http://www.joeygibson.com/blog/life/Wisdom.html


    --------------030509090907000500070906--
    Joey Gibson, Nov 30, 2003
    #3
  4. Stephan Kämper

    Rich Guest

    Same error.
    Printer queue is full

    ruby -v
    ruby 1.8.0 (2003-08-04) [i386-mswin32]

    OS
    Win 2000

    I'm trying to find the code that messed things up... TCPServer.new works...

    -Rich
    Rich, Nov 30, 2003
    #4
  5. Stephan Kämper

    Guest

    Hi,

    At Sun, 30 Nov 2003 10:30:38 +0900,
    Joey Gibson wrote:
    > I just ran this test on a WinXP box using the installer ruby180-10.exe
    > and I get the same error, though it's in english, not German:
    >
    > irb(main):001:0> require 'socket'
    > => true
    > irb(main):002:0> session = TCPSocket.new("localhost", 12345)
    > Errno::E061: The printer queue is full. - connect(2)
    > from (irb):2:in `initialize'
    > from (irb):2:in `new'
    > from (irb):2


    Mapping from WSACONNREFUSED seems lacked. But I'm not sure why
    it's E061 but not E10061.

    --
    Nobu Nakada
    , Nov 30, 2003
    #5
  6. Hi

    wrote:
    > I think it had been fixed already.


    And so did I, until...

    > What version is it?


    Sorry for not giving this info right away:

    ruby 1.8.0 (2003-08-04) [i386-mswin32]

    As I mentioned I use Dave & Andy's WinInstaller on Win98. To be precise I installed this version

    http://prdownloads.sourceforge.net/rubyinstaller/ruby180-10.exe?download

    (with some additional modules installed, e.g. the latest FxRuby [1.0.27])


    Best wishes

    Stephan
    Stephan Kämper, Nov 30, 2003
    #6
  7. "Stephan Kämper" wrote:
    > Sorry for not giving this info right away:
    >
    > ruby 1.8.0 (2003-08-04) [i386-mswin32]
    >


    irb(main):001:0> require "socket"
    => true
    irb(main):002:0> session = TCPSocket.new('localhost',12345)
    Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2)
    from (irb):2:in `initialize'
    from (irb):2:in `new'
    from (irb):2
    irb(main):003:0>
    irb(main):006:0> RUBY_VERSION
    => "1.8.1"
    irb(main):007:0> RUBY_PLATFORM
    => "i386-mswin32"
    irb(main):008:0> RUBY_RELEASE_DATE
    => "2003-10-31"

    This is running 1.8.1-preview2 under Windows XP.
    Jon A. Lambert, Dec 3, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Davies
    Replies:
    0
    Views:
    103
    Alan Davies
    Aug 5, 2003
  2. Noah

    TCPSocket error

    Noah, Nov 8, 2003, in forum: Ruby
    Replies:
    3
    Views:
    111
    Mike Stok
    Nov 10, 2003
  3. Matthew Margolis

    TCPSocket and windows

    Matthew Margolis, Mar 2, 2005, in forum: Ruby
    Replies:
    4
    Views:
    214
    Matthew Margolis
    Mar 2, 2005
  4. Pat Maddox
    Replies:
    18
    Views:
    255
    Guillaume Marcais
    Apr 4, 2005
  5. Victor 'Zverok' Shepelev

    TCPSocket#initialize slow on Windows

    Victor 'Zverok' Shepelev, Sep 3, 2008, in forum: Ruby
    Replies:
    2
    Views:
    108
    Roger Pack
    Sep 5, 2008
Loading...

Share This Page