[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Debugging a TCPSocket.open timeout

Student Jr

5/20/2008 5:47:00 PM

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-....

5 Answers

Joel VanderWerf

5/20/2008 6:35:00 PM

0

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

Student Jr

5/20/2008 6:55:00 PM

0

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-....

Phillip Gawlowski

5/20/2008 7:17:00 PM

0

-----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.bl...

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....

iEYEARECAAYFAkgzIUcACgkQbtAgaoJTgL+99ACdHi40kwAUQkpeD2Vh9qknX737
vbkAoIANsiX0JMD0qlB+Nc7pR9xdZmqr
=5ecP
-----END PGP SIGNATURE-----

Student Jr

5/20/2008 7:23:00 PM

0

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-....

Paul

5/13/2009 5:14:00 PM

0

Dave, I tried the iserror function on the variable in which I stuck
the VLookup return value. IsError never becomes true when VLookup
fails to find something. I resorted to using the Err object as
described at http://www.cpearson.com/excel/CallingWorksheetFunctions....

It turns out that if there is an error, the left-hand-side does not
actually get a result.

I suuppose I could always try putting the VLookup expression inside
IsError as an argument, but then I'd have to repeat that expression to
assign to the destination variable when IsError evaluates to False.

Anyway, I'm sure this is motherhood to most, but it feels like I'm
finally starting to "operate" in the VBA environment.

Thanks again for the leads.