Debugging a TCPSocket.open timeout

Discussion in 'Ruby' started by Student Jr, May 20, 2008.

  1. Student Jr

    Student Jr Guest

    I'm trying to do an IMAP connection. My first target is gmail:

    Net::IMAP.new("imap.gmail.com", 143)

    goes walkabout on line 886:

    TCPSocket.open("imap.gmail.com", 143)

    AT&T swears they are not port blocking. My system logs are clean.

    The code for TCPSocket is compiled in, so inserting printfs is going to
    be really painful. Moreover, the actual error is probably a ways down
    the stack.

    Ideas?
    --
    Posted via http://www.ruby-forum.com/.
     
    Student Jr, May 20, 2008
    #1
    1. Advertising

  2. Student Jr wrote:
    > I'm trying to do an IMAP connection. My first target is gmail:
    >
    > Net::IMAP.new("imap.gmail.com", 143)
    >
    > goes walkabout on line 886:
    >
    > TCPSocket.open("imap.gmail.com", 143)
    >
    > AT&T swears they are not port blocking. My system logs are clean.
    >
    > The code for TCPSocket is compiled in, so inserting printfs is going to
    > be really painful. Moreover, the actual error is probably a ways down
    > the stack.
    >
    > Ideas?


    What about trying netcat? Not sure that will give more info than tcp
    open, but if you have to convince someone, it's better than saying "my
    ruby program doesn't work".

    --
    vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
     
    Joel VanderWerf, May 20, 2008
    #2
    1. Advertising

  3. Student Jr

    Student Jr Guest

    Joel VanderWerf wrote:
    > Student Jr wrote:
    >> The code for TCPSocket is compiled in, so inserting printfs is going to
    >> be really painful. Moreover, the actual error is probably a ways down
    >> the stack.
    >>
    >> Ideas?

    >
    > What about trying netcat? Not sure that will give more info than tcp
    > open, but if you have to convince someone, it's better than saying "my
    > ruby program doesn't work".


    sudo nc -v -v imap.gmail.com 143
    DNS fwd/rev mismatch: gmail-imap.l.google.com != py-in-f109.google.com
    DNS fwd/rev mismatch: gmail-imap.l.google.com != py-in-f111.google.com

    I don't know what to expect, so I don't know if this really means
    anything or not...
    --
    Posted via http://www.ruby-forum.com/.
     
    Student Jr, May 20, 2008
    #3
  4. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Student Jr wrote:
    | I'm trying to do an IMAP connection. My first target is gmail:
    |
    | Net::IMAP.new("imap.gmail.com", 143)
    |
    | goes walkabout on line 886:
    |
    | TCPSocket.open("imap.gmail.com", 143)
    |
    | AT&T swears they are not port blocking. My system logs are clean.
    |
    | The code for TCPSocket is compiled in, so inserting printfs is going to
    | be really painful. Moreover, the actual error is probably a ways down
    | the stack.
    |
    | Ideas?

    Have you followed (well, as much as possible :p) the instructions GMail
    provides for configuring email clients for IMAP?

    When I used Thunderbird on Ubuntu 8.04 to connect to Google's IMAP, I
    had no problems.

    - --
    Phillip Gawlowski
    Twitter: twitter.com/cynicalryan
    Blog: http://justarubyist.blogspot.com

    Write clearly - don't be too clever.
    ~ - The Elements of Programming Style (Kernighan & Plaugher)
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (MingW32)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iEYEARECAAYFAkgzIUcACgkQbtAgaoJTgL+99ACdHi40kwAUQkpeD2Vh9qknX737
    vbkAoIANsiX0JMD0qlB+Nc7pR9xdZmqr
    =5ecP
    -----END PGP SIGNATURE-----
     
    Phillip Gawlowski, May 20, 2008
    #4
  5. Student Jr

    Student Jr Guest

    Phillip Gawlowski wrote:
    >
    > Student Jr wrote:
    > | I'm trying to do an IMAP connection. My first target is gmail:
    > |
    > | Net::IMAP.new("imap.gmail.com", 143)
    > |
    > | goes walkabout on line 886:
    > |
    > | TCPSocket.open("imap.gmail.com", 143)
    > |
    > | AT&T swears they are not port blocking. My system logs are clean.
    > |
    > | The code for TCPSocket is compiled in, so inserting printfs is going to
    > | be really painful. Moreover, the actual error is probably a ways down
    > | the stack.
    > |
    > | Ideas?
    >
    > Have you followed (well, as much as possible :p) the instructions GMail
    > provides for configuring email clients for IMAP?
    >
    > When I used Thunderbird on Ubuntu 8.04 to connect to Google's IMAP, I
    > had no problems.


    > Write clearly - don't be too clever.



    Funny what the infamous "one more look" can do. They are using a
    different port. This nicely deals with the immediate example
    problem--the long timeout on a bad connection is going to have to be
    handled via shelling out anyway, I guess.

    --
    Posted via http://www.ruby-forum.com/.
     
    Student Jr, May 20, 2008
    #5
    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. Jesper Olsen

    TCPSocket & $SAFE=1

    Jesper Olsen, Jul 31, 2003, in forum: Ruby
    Replies:
    2
    Views:
    129
    Jesper Olsen
    Aug 1, 2003
  2. Alan Davies
    Replies:
    0
    Views:
    118
    Alan Davies
    Aug 5, 2003
  3. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,306
    Brian Candler
    Oct 6, 2004
  4. Pat Maddox
    Replies:
    18
    Views:
    267
    Guillaume Marcais
    Apr 4, 2005
  5. Vipin Vm
    Replies:
    0
    Views:
    117
    Vipin Vm
    Jan 1, 2009
Loading...

Share This Page