Gnus development mailing list
 help / color / mirror / Atom feed
* Connecting to a newsserver with nntp.
@ 1996-02-21 18:02 Per Persson
  1996-02-21 18:39 ` eichin
  0 siblings, 1 reply; 11+ messages in thread
From: Per Persson @ 1996-02-21 18:02 UTC (permalink / raw)


My usual newsserver at news.solace.mh.se is currently down due to some
new installations and reworking of everything, thus I noticed
something which annoys me quite a lot. It takes Gnus minutes to
realize that the newsserver is down. 

Wouldn't it be a good idea to `ping' the machine before trying to
connect to the nntp port on it? `ffap.el' does this when you try to
access ftp servers so I bet it would be easy to implement in Gnus
too. I find it to be a bit annoying to wait for 4-5 minutes to get
Gnus to realize that the server isn't responding when a `ping' takes
much less time. However, I don't want the time limit on the connect to
be lessend, on occasions it takes 3-4 minutes for my Gnus to connect
to news.solace.mh.se when it IS working.

-- 
anum meum aperies, asperge me spermate tuo et inquinabor
url; http://pfawww.pp.se/~pp/   email; <pp@pfawww.pp.se>
phone#'s;  work/home/fax: +46 (0)18 100899/247473/103737


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 18:02 Connecting to a newsserver with nntp Per Persson
@ 1996-02-21 18:39 ` eichin
  1996-02-21 19:51   ` Per Persson
  0 siblings, 1 reply; 11+ messages in thread
From: eichin @ 1996-02-21 18:39 UTC (permalink / raw)
  Cc: ding

I think you're actually seeing two problems: 
	1) linux has a much higher connection timeout than BSD
traditionally had. This is legitimate, but...
	2) emacs doesn't get interrupted by ^g when waiting for a
network connection. (This also backs up other subprocesses, which can
be rather annoying...)

If problem 2 gets fixed (19.29 was still broken at least) then you can
just ^g when it takes to long for you comfort.


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 18:39 ` eichin
@ 1996-02-21 19:51   ` Per Persson
  1996-02-21 19:56     ` eichin
  0 siblings, 1 reply; 11+ messages in thread
From: Per Persson @ 1996-02-21 19:51 UTC (permalink / raw)
  Cc: ding

eichin@cygnus.com writes:

>I think you're actually seeing two problems: 
>	1) linux has a much higher connection timeout than BSD
>traditionally had. This is legitimate, but...

If the machine is down, Gnus shouldn't even try to connect to the
nntp port on it. In my ever so humble opinion.

>	2) emacs doesn't get interrupted by ^g when waiting for a
>network connection. (This also backs up other subprocesses, which can
>be rather annoying...)

Hitting ^g is absolutly not what I want, that still doesn't bring me
my mails...

>If problem 2 gets fixed (19.29 was still broken at least) then you can
>just ^g when it takes to long for you comfort.

19.30 is still broken in this way, how about the .31 pretests? Perhaps
it would be an idea to start using those pretests after all. I have a
problem with this second 'problem' in ZenIRC as well.

-- 
anum meum aperies, asperge me spermate tuo et inquinabor
url; http://pfawww.pp.se/~pp/   email; <pp@pfawww.pp.se>
phone#'s;  work/home/fax: +46 (0)18 100899/247473/103737


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 19:51   ` Per Persson
@ 1996-02-21 19:56     ` eichin
  1996-02-21 20:19       ` Per Persson
  1996-02-21 22:29       ` Greg Stark
  0 siblings, 2 replies; 11+ messages in thread
From: eichin @ 1996-02-21 19:56 UTC (permalink / raw)
  Cc: ding

> If the machine is down, Gnus shouldn't even try to connect to the
> nntp port on it. In my ever so humble opinion.

Just note that ping isn't reliable (for example, if I can get to the
nntp server though a firewall without being able to ping the host, it
should still let me...) though that just means it should be
optional... what could another variable hurt :-)

> Hitting ^g is absolutly not what I want, that still doesn't bring me
> my mails...

Strictly speaking, the ^g should interrupt the connect, allowing it to
fail, and gnus could then "catch" that failure and continue on to
non-news stuff... or at least I think that makes sense.


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 19:56     ` eichin
@ 1996-02-21 20:19       ` Per Persson
  1996-02-22  1:12         ` Lars Magne Ingebrigtsen
  1996-02-21 22:29       ` Greg Stark
  1 sibling, 1 reply; 11+ messages in thread
From: Per Persson @ 1996-02-21 20:19 UTC (permalink / raw)
  Cc: ding

eichin@cygnus.com writes:

>Just note that ping isn't reliable (for example, if I can get to the
>nntp server though a firewall without being able to ping the host, it
>should still let me...) though that just means it should be
>optional... what could another variable hurt :-)

Hey this is emacs!

gnus-use-ping			If we want to use ping.
gnus-ping-command-list		Which ping to use.	
gnus-ping-timeout		How long to wait for 'host is alive'.
gnus-ping-continously		Ping other machine while reading news.
gnus-ping-secondary-methods	Ping machines used by secondary methods.
				(Possibly a list of methods).
gnus-ping-fail-hook		What to do if the ping fails
gnus-ping-suceed-hook		What to do if the ping suceeds.
gnus-ping-pre-hook		What to do before pinging.
gnus-ping-post-hook		What to do after pinging.
gnus-ping-pong			Ping again when 'host is alive' just to
				make sure the host is alive. If numeric,
				ping host that many times.
gnus-ping-myself		Is I'm not alive, don't even start Gnus.
gnus-ping-per-persson		Send a mail to me, telling me my ideas
				are moronic. If numeric, mail me that 
				many times.

>Strictly speaking, the ^g should interrupt the connect, allowing it to
>fail, and gnus could then "catch" that failure and continue on to
>non-news stuff... or at least I think that makes sense.

gnus-dont-use-ping-but-let-me-use-^g, yes please! :-)

-- 
anum meum aperies, asperge me spermate tuo et inquinabor
url; http://pfawww.pp.se/~pp/   email; <pp@pfawww.pp.se>
phone#'s;  work/home/fax: +46 (0)18 100899/247473/103737


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 19:56     ` eichin
  1996-02-21 20:19       ` Per Persson
@ 1996-02-21 22:29       ` Greg Stark
  1996-02-22  6:01         ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Greg Stark @ 1996-02-21 22:29 UTC (permalink / raw)
  Cc: pp, ding


There are lots of problems with trying to determine if the host is up through
some other mechinism like ping.  Trusting two different protocols to agree
about whether the host is available is going to be inherently unreliable.
Ping itself is extrememely non-portable, it works differently under different
versions of Unix, and isn't available at all for some operating systems.

It's also not clear how long to wait for the ping response.  The same
arguments that justify(?) making the TCP timeout so large hold for ICMP
packets.  If Gnus has to wait for your modem to dial in an initiate a PPP
connection it could well take 30+ seconds before the first ping gets through.
I'm not sure why Linux thought the traditional 60 seconds was inadequate, but
there's no reason to think those arguments don't hold in this case.

The real answer regarding C-g is to implement asynchronous backend interfaces.
Then Gnus can initiate connections to the nntp backend and your mail backend
and allow you to read your mail while the nntp backend is still waiting to
time out.  Lars has already indicated that this is in the cards for Red Gnus.
(Right Lars?)

greg


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 20:19       ` Per Persson
@ 1996-02-22  1:12         ` Lars Magne Ingebrigtsen
  1996-02-22  7:54           ` Per Persson
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-22  1:12 UTC (permalink / raw)


pp@pfawww.pp.se (Per Persson) writes:

> Hey this is emacs!
> 
> gnus-use-ping			If we want to use ping.
> gnus-ping-command-list		Which ping to use.	
> gnus-ping-timeout		How long to wait for 'host is alive'.
> gnus-ping-continously		Ping other machine while reading news.
> [...]

ROTFL!  I'm tempted to put this in the manual somewhere...  :-)  

Anyways, pinging the machine before attempting to connect to it might
be a good idea.  If this is done by other packages, could somebody
send me example code?

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: Connecting to a newsserver with nntp.
  1996-02-21 22:29       ` Greg Stark
@ 1996-02-22  6:01         ` Lars Magne Ingebrigtsen
  1996-02-22 23:28           ` Wes Hardaker
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-22  6:01 UTC (permalink / raw)


gsstark@MIT.EDU (Greg Stark) writes:

> There are lots of problems with trying to determine if the host is up through
> some other mechinism like ping.  Trusting two different protocols to agree
> about whether the host is available is going to be inherently unreliable.

That's true, but if one knows that a server doesn't answer pings, then
it is down (and vice versa, etc.), then it would be nice to be able to
ping the server first.  YMMV.  So adding a `nntp-ping-before-connect'
variable (nil by default) seems like a reasonable idea.

> The real answer regarding C-g is to implement asynchronous backend
> interfaces.  Then Gnus can initiate connections to the nntp backend
> and your mail backend and allow you to read your mail while the nntp
> backend is still waiting to time out.  Lars has already indicated
> that this is in the cards for Red Gnus.  (Right Lars?)

Yup.  I've written parts of if already, even.

--
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: Connecting to a newsserver with nntp.
  1996-02-22  1:12         ` Lars Magne Ingebrigtsen
@ 1996-02-22  7:54           ` Per Persson
  1996-02-22 18:03             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Per Persson @ 1996-02-22  7:54 UTC (permalink / raw)
  Cc: ding

larsi@ifi.uio.no (Lars Magne Ingebrigtsen) writes:

>ROTFL!  I'm tempted to put this in the manual somewhere...  :-)  

Strange things happens when your newsserver is down and you have to
resort to your mailinglists for fun. O:-)

>Anyways, pinging the machine before attempting to connect to it might
>be a good idea.  If this is done by other packages, could somebody
>send me example code?

ffap.el which comes with 19.30 does this and has some variables for
it, it's pretty much spread out so I guess you have to poke around in
it a little yuorself. :-)

/pp.


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

* Re: Connecting to a newsserver with nntp.
  1996-02-22  7:54           ` Per Persson
@ 1996-02-22 18:03             ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-02-22 18:03 UTC (permalink / raw)


pp@pfawww.pp.se (Per Persson) writes:

> ffap.el which comes with 19.30 does this and has some variables for
> it, it's pretty much spread out so I guess you have to poke around in
> it a little yuorself. :-)

Hmn.  Here's the relevant code:

	(condition-case error
	    (progn
	      (delete-process
	       (open-network-stream
		"ffap-machine-p" nil host (or service "discard")))
	      t)
	  (error
	   (let ((mesg (car (cdr error))))
	     (cond
	      ;; v18:
	      ((string-match "^Unknown host" mesg) nil)
	      ((string-match "not responding$" mesg) mesg)
	      ((equal mesg "connection failed")
	       (if (equal (nth 2 error) "permission denied")
		   nil			; host does not exist
		 ;; Other errors mean host exists:
		 (nth 2 error)))
	      ;; Could be "Unknown service":
	      (t (signal (car error) (cdr error)))))))

So it doesn't really ping at all -- it just tries to connect to the
"discard" port on the machine.  If that fails, then it assumes the
machine is down.

Anyways, Gnus could do something similar.  

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


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

* Re: Connecting to a newsserver with nntp.
  1996-02-22  6:01         ` Lars Magne Ingebrigtsen
@ 1996-02-22 23:28           ` Wes Hardaker
  0 siblings, 0 replies; 11+ messages in thread
From: Wes Hardaker @ 1996-02-22 23:28 UTC (permalink / raw)
  Cc: ding

>>>>> "Lars" == Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

    gsstark@MIT.EDU (Greg Stark) writes:

    >> The real answer regarding C-g is to implement asynchronous
    >> backend interfaces.  Then Gnus can initiate connections to the
    >> nntp backend and your mail backend and allow you to read your
    >> mail while the nntp backend is still waiting to time out.  Lars
    >> has already indicated that this is in the cards for Red Gnus.
    >> (Right Lars?)

    Lars> Yup.  I've written parts of if already, even.

You know, one of the more annoying things I've been meaning to talk
about just came into my mind.

Here was my setup:

local nntp server
A distant nntp server as a second server.  

- sgnus was configured to check for new news-groups on both servers.
- I had subscribed to something like 3-5 newsgroups on the second server.

The second server is currently in-operational, but only halfway so.
It will let me connect to it, but immediately dis-connects me (note:
much different than connect-refused).  This caused sgnus to report
'lost connection with nntp server' upon entry every time.

So...  I gave up on the server and unsubscribed to the subscribed
newsgroups, and removed the server from the check-for-new-groups
server's list (whatever the @#%$ variable is).

Didn't work.  Still got the connection refused messages (which was a
pain since a lot of my local groups ended up with '*'s next to them
instead of article numbers (explain that one!) and because it never
properly drew the group buffer (the graphic GNUS local was always
still there till I hit the 'l' key).

I ended up going into the .newsrc.eld file and removing all instances
of the remote server/group entries in it by hand.  What I was suprised
to see was that there were like two entries per group.  Wierd again.

Why am I typing all this for you to read?
Beats the hell out of me...

Wes


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

end of thread, other threads:[~1996-02-22 23:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-02-21 18:02 Connecting to a newsserver with nntp Per Persson
1996-02-21 18:39 ` eichin
1996-02-21 19:51   ` Per Persson
1996-02-21 19:56     ` eichin
1996-02-21 20:19       ` Per Persson
1996-02-22  1:12         ` Lars Magne Ingebrigtsen
1996-02-22  7:54           ` Per Persson
1996-02-22 18:03             ` Lars Magne Ingebrigtsen
1996-02-21 22:29       ` Greg Stark
1996-02-22  6:01         ` Lars Magne Ingebrigtsen
1996-02-22 23:28           ` Wes Hardaker

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