🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
5 messages
5 total messages Started by Michael Grimm Mon, 01 Feb 2010 18:13
innfeed and initial-reconnect-time
#82725
Author: Michael Grimm
Date: Mon, 01 Feb 2010 18:13
41 lines
3119 bytes
Hi --

According the manual pages initial-reconnect-time should be doubled
after every failed connect until max-reconnect-time is reached.

In connection.c (2.5.1) I do find:
,----
| /* bump the sleep timer amount each time to wait longer and longer.
|  * Gets reset in resetConnection() */
| cxn->sleepTimeout *= 2 ;
| if (cxn->sleepTimeout > max_reconnect_period)
|   cxn->sleepTimeout = max_reconnect_period ;
`----

But this doesn't work for me. This morning I started another feed (IP
has been made known to DNS two days ago) and found that the default
initial 30 seconds are not doubled at all. One example:

Feb  1 07:18:08 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:18:41 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:19:13 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:19:43 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:20:15 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:20:49 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:21:20 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:21:51 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:22:22 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:22:53 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
Feb  1 07:23:23 feeder1 innfeed[95419]: xxx:0 cxnsleep response unknown: 502 502 Permission denied
and so on ...

I did try to find the reason for that in the sources but I do have to
confess that I couldn't find it.

To all my peers: I am very sorry for those many failed connections
today, I did reset it to a larger value in the meantime.

Regards,
Michael
-- 
to let
Re: innfeed and initial-reconnect-time
#82726
Author: Julien ÉLIE
Date: Mon, 01 Feb 2010 19:01
50 lines
2974 bytes
Hi Michael,

> According the manual pages initial-reconnect-time should be doubled
> after every failed connect until max-reconnect-time is reached.

It depends on what is called a "failed connect" :)



> In connection.c (2.5.1) I do find:
> ,----
> | /* bump the sleep timer amount each time to wait longer and longer.
> |  * Gets reset in resetConnection() */
> | cxn->sleepTimeout *= 2 ;
> | if (cxn->sleepTimeout > max_reconnect_period)
> |   cxn->sleepTimeout = max_reconnect_period ;
> `----

I see that comment for the prepareReopenCbk() function:

/*
 * Set up the callback used when the Connection is sleeping (i.e. will try
 * to reopen the connection).
 */

So it is when the connection is sleeping because of an unknown answer.
Here, I believe something like IHAVE has been sent and the server
receives 502.
(The error for a 502 banner is different.)

It is not an expected response code, so innfeed waits for more data.
cxnSleepOrDie() is called and then prepareReopenCbk().

It is not a "failed connect" because the server had accepted the
connection and answered...  A failed connect is when the peer
does not answer at all (no banner).

To be more explicit, the sleepTimeout is reset here in getModeResponse()
when innfeed sends MODE STREAM:

      /* sleepTimeout get changed at each failed attempt, so reset. */
      cxn->sleepTimeout = init_reconnect_period ;

-- 
Julien ÉLIE

« -- Nous parlerons quand l'interprète dormira.
  [Bong !]
  -- Il dort. On peut parler. » (Astérix) 
Re: innfeed and initial-reconnect-time
#82727
Author: Michael Grimm
Date: Mon, 01 Feb 2010 19:22
42 lines
2450 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote:
> Hi Michael,

>> According the manual pages initial-reconnect-time should be doubled
>> after every failed connect until max-reconnect-time is reached.
>
> It depends on what is called a "failed connect" :)

Understood ;-) I did consider any connect without success a failed one
though.

> So it is when the connection is sleeping because of an unknown answer.
> Here, I believe something like IHAVE has been sent and the server
> receives 502.
> (The error for a 502 banner is different.)
>
> It is not an expected response code, so innfeed waits for more data.
> cxnSleepOrDie() is called and then prepareReopenCbk().
>
> It is not a "failed connect" because the server had accepted the
> connection and answered...  A failed connect is when the peer
> does not answer at all (no banner).

Ok, this explains why even answers like ...

,----
| cxnsleep transfer permission denied
| cxnsleep unexpected non-streaming response for streaming connection: 480\
| 	User and password still required, authinfo command (check)
`----

... aren't considered a failed connect.

Hmm, does this mean that there is no chance to teach an innfeed to be
polite? ;-)

Thanks for your explanations.

Regards,
Michael
-- 
to let
Re: innfeed and initial-reconnect-time
#82729
Author: Julien ÉLIE
Date: Mon, 01 Feb 2010 20:33
47 lines
2907 bytes
Hi Michael,

>> It is not a "failed connect" because the server had accepted the
>> connection and answered...  A failed connect is when the peer
>> does not answer at all (no banner).
>
> Ok, this explains why even answers like ...
>
> ,----
> | cxnsleep transfer permission denied
> | cxnsleep unexpected non-streaming response for streaming connection: 480\
> | User and password still required, authinfo command (check)
> `----
>
> ... aren't considered a failed connect.

Yep!  And it is precisely the 480 response to MODE STREAM that resets
the timer.


> Hmm, does this mean that there is no chance to teach an innfeed to be
> polite? ;-)

Sure!  We should teach innfeed the RFC 3977 language :)

We expected to do that for INN 2.5.2 according to the milestone set
4 months ago:
    http://inn.eyrie.org/trac/ticket/26
    (innfeed error 500 handler)

But obviously, it will not be for INN 2.5.2.

As we wrote in a note:
    There are probably other return codes to catch, besides 500 and 501.

it will take time to achieve that...  We taught RFC 3977 to innd
in INN 2.5.2 and that's already a great improvement.

Let's tackle innfeed in a next release.  There are lots of things
to do for it!

-- 
Julien ÉLIE

« Quod sis, esse uelis nihilque malis ;
  Summum nec metuas diem nec optes. » (Martial) 
Re: innfeed and initial-reconnect-time
#82728
Author: Michael Grimm
Date: Mon, 01 Feb 2010 21:20
21 lines
2056 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote:
> Hi Michael,

>> Hmm, does this mean that there is no chance to teach an innfeed to be
>> polite? ;-)
>
> Sure!  We should teach innfeed the RFC 3977 language :)
[...]
> it will take time to achieve that...  We taught RFC 3977 to innd in
> INN 2.5.2 and that's already a great improvement.
>
> Let's tackle innfeed in a next release.  There are lots of things to
> do for it!

Well, I'll be very patient and wait for 2.5.x or 2.6.0 (and for all my
peers to reload incoming.conf or some newgroups/rmgroups) ;-)

Regards and thanks for clarification,
Michael
-- 
to let
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads