Gnus development mailing list
 help / color / mirror / Atom feed
* nnimap:$server unavailable... Go offline?
@ 2003-12-09 17:01 Chris Shenton
  2003-12-09 17:11 ` Simon Josefsson
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Shenton @ 2003-12-09 17:01 UTC (permalink / raw)


gnus-version's value is "Gnus v5.10.3"

I have an nnimap server, connect to it (with starttls), read mail for
a while, then ignore it a while.  When I return, and do a "g" to check
mail (or go into a group to check headers, or...) Gnus reports

  Unable to open nnimap:myservername, go offline?

I see this is done in gnus-int.el: gnus-open-server, but don't
understand why it's happening.  Does it indicate that my IMAP server
has torn down the connection , but Gnus doesn't automatically
reconnect?

If I say "y", then Quit Gnus, then restart Gnus, it authenticates
again and all is well.

If I say "n", I don't know what state this is supposed to put me in,
but at times it's seemd unusable: I'm not Offline, but neither am I
Online; I can't exit *Summary* buffers cuz it can't write updates to
the server, I can't quit Gnus because I've got unsaved *Summary*s.
I'm in Limbo.

If my server (courier-imap-2.2.1, running without authdaemon stuff) is
tearing down the connection too early (maybe it thinks Gnus is idle?)
perhaps I can increase the timeout.  If I should be using IMAP from
Gnus in some other way (an Agent, whatever that is), I'd appreciate a
pointer.

Here's how I'm using it, splitting logic removed.  Thanks.


(setq
 gnus-secondary-select-methods
 '(
   (nnml "")
   (nnimap "pectopah"		      ;use ~/.authinfo for user/passwd
	   (nnimap-address "pectopah.shenton.org")
	   )
   )
  )



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: nnimap:$server unavailable... Go offline?
  2003-12-09 17:01 nnimap:$server unavailable... Go offline? Chris Shenton
@ 2003-12-09 17:11 ` Simon Josefsson
  2004-01-10 20:20   ` Chris Shenton
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Josefsson @ 2003-12-09 17:11 UTC (permalink / raw)
  Cc: ding

Chris Shenton <chris@shenton.org> writes:

> gnus-version's value is "Gnus v5.10.3"
>
> I have an nnimap server, connect to it (with starttls), read mail for
> a while, then ignore it a while.  When I return, and do a "g" to check
> mail (or go into a group to check headers, or...) Gnus reports
>
>   Unable to open nnimap:myservername, go offline?
>
> I see this is done in gnus-int.el: gnus-open-server, but don't
> understand why it's happening.  Does it indicate that my IMAP server
> has torn down the connection , but Gnus doesn't automatically
> reconnect?

Gnus do try to re-open the connection, but apparently it failed to do
so, and asked that question.  Look in the *Message* buffer for any
earlier errors that may suggest why it was unable to reopen the
connection.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: nnimap:$server unavailable... Go offline?
  2003-12-09 17:11 ` Simon Josefsson
@ 2004-01-10 20:20   ` Chris Shenton
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Shenton @ 2004-01-10 20:20 UTC (permalink / raw)


Chris Shenton <chris@shenton.org> writes:

>> I have an nnimap server, connect to it (with starttls), read mail for
>> a while, then ignore it a while.  When I return, and do a "g" to check
>> mail (or go into a group to check headers, or...) Gnus reports
>>
>>   Unable to open nnimap:myservername, go offline?

Simon Josefsson <jas@extundo.com> writes:

> Gnus do try to re-open the connection, but apparently it failed to do
> so, and asked that question.  Look in the *Message* buffer for any
> earlier errors that may suggest why it was unable to reopen the
> connection.

I don't see anything interesting in *Message* but did turn on
imap-debug, imap-log, and nnimap-debug; I only see an *imap-log*
buffer, however.  It's a little helpful but I'm still not able to
reconnect -- at least not with STARTTLS.  Details below.

I've pulled Gnus "No Gnus v0.2" from CVS a few days ago but I'm still
getting disconnected and Gnus doesn't reconnect.  The disconnect
happens when the IMAP daemon times out and says BYE, from *imap-log*:

  * BYE Disconnected for inactivity.

When I type "G" in groups, it fails to connect (as I reported earlier)
and I have to answer Yes to take it offline.  Nothing is said on port
143 when I sniff the connection while trying to do this "G" after the
disconnect -- it's not really trying to login to IMAP!

If I quit gnus then restart, it reconnects ok.  That's odd.

I've done some testing and believe it's an interaction problem between
nnimap and starttls.  My select methods are like:

  (setq
   gnus-secondary-select-methods
   '(
     (nnimap "pectopah"
             (nnimap-address "pectopah.shenton.org")
             )
     )))

The server offers STARTTLS but doesn't require it from my LAN.  Gnus
finds the "starttls" binary I got from ftp://ftp.opaopa.org/pub/elisp/
and does the STARTTLS ok. 

If I hide the "starttls" binary or tell it to use plaintext in the
server definition with the attribute:

   (nnimap "pectopah"		      ;use ~/.authinfo for user/passwd
	   (nnimap-address "pectopah.shenton.org")
           (nnimap-stream "network")
	   )

then it *is* able to reconnect after a BYE disconnect.  So there
appears to be an interaction problem with nnimap and starttls.


If I use "^" in *Group* to go into the *Server* buffer I see my IMAP
server is offline after the BYE timeout above:

     {nnimap:pectopah} (offline) (agent)

I can say "O" to take it online:

     {nnimap:pectopah} (opened) (agent)

Then I can read as normal, from the *imap-log*; note the first command
below is the same as Gnus sent after the timeout above but that one
failed; this one succeeds:

  4887 STARTTLS
  * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN STARTTLS LOGINDISABLED] Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc.  See COPYING for distribution information.
  4887 OK Begin SSL/TLS negotiation now.
  4888 LOGIN "chris" "yeahright"


So what's the difference? I can't see anything more detailed in
various logs.

* Why does nnimap reconnect when there's no "starttls" binary involved?
* Why does nnimap reconnect using "starttls" binary if I "Open" the Server?
* Why doesn't it reconnect with "starttls" when I do "G" in *Group*
  or let it time out and try to retrieve the next message in *Summary*?

Any suggestions how to debug, diagnose, and fix? 

Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-10 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 17:01 nnimap:$server unavailable... Go offline? Chris Shenton
2003-12-09 17:11 ` Simon Josefsson
2004-01-10 20:20   ` Chris Shenton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).