• [flnews 1.1.0] configure timeout for nntp connection to a server

    From yamo'@21:1/5 to All on Wed Aug 31 12:17:33 2022
    Hi,

    At starting of flnews, it is blocked : it waiting a reply of an
    inaccessible server.

    Status : Busy / Refreching subscribed newsgroups

    It should be configurable or by default small enought maybe 5 seconds.

    Thanks,
    --
    Stéphane

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael =?ISO-8859-1?Q?B=E4uerle?=@21:1/5 to yamo' on Wed Aug 31 14:38:34 2022
    yamo' wrote:

    At starting of flnews, it is blocked : it waiting a reply of an
    inaccessible server.

    Status : Busy / Refreching subscribed newsgroups

    It should be configurable or by default small enought maybe 5 seconds.

    I have tried to reproduce this with multiples setups and compared the
    behaviour with a connection via telnet:


    Server name cannot be resolved
    ==============================

    | $ telnet news.example 119
    | news.example: No address associated with hostname

    flnews error messages on terminal:
    |
    | flnews: INET: getaddrinfo() failed
    | flnews: INET: No address associated with hostname
    | flnews: NNTP: Cannot connect to server
    | [Second attempt]

    No significant delay/blocking was observed.


    Server name can be resolved, but no NNTP service available ==========================================================

    | $ telnet Server 119
    | Trying 192.168.199.123...
    | telnet: Unable to connect to remote host

    flnews error messages on terminal:
    |
    | flnews: INET: Connection refused
    | flnews: NNTP: Cannot connect to server
    | [Second attempt]

    "Server" was an existing internal Server without NNTP service.
    No significant delay/blocking was observed.


    Server name can be resolved, no NNTP service, no connection reset =====================================================================

    | $ telnet www.google.com 119
    | Trying 172.217.168.228...
    | [Delay]
    | telnet: Unable to connect to remote host

    flnews error messages on terminal:
    |
    | [Delay]
    | flnews: INET: connect() failed
    | flnews: NNTP: Cannot connect to server
    | [Second attempt]

    Server has not refused the connection here.
    connect() failed after timeout of the operating system.
    The observed delay for flnews was twice as long (because of the second attempt).
    While waiting for the connection the thread for the GUI was not blocked.
    It was possible to terminate flnews via GUI (or with Ctrl-C via SIGINT).


    Conclusion:
    Does not look wrong in general. flnews behaves similar to other
    programs (but retry after first error).

    Can you confirm that the problem you have falls into the third category
    above?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yamo'@21:1/5 to All on Thu Sep 1 09:15:52 2022
    Hi Michael,

    Michael Bäuerle a écrit :
    yamo' wrote:

    At starting of flnews, it is blocked : it waiting a reply of an
    inaccessible server.

    Status : Busy / Refreching subscribed newsgroups

    It should be configurable or by default small enought maybe 5 seconds.

    I have tried to reproduce this with multiples setups and compared the behaviour with a connection via telnet:


    Server name can be resolved, but no NNTP service available ==========================================================
    Server name can be resolved, no NNTP service, no connection reset =====================================================================
    Can you confirm that the problem you have falls into the third category above?


    It is a server which is actually inaccessible (mine pasdenom.info:563
    fiber broken...). DNS is OK

    I don't see the difference between the two last categories.

    I have an account configured with user/pass and at the start I cannot go
    to Edit/Server and have to wait for a long timeout.


    $ nc pasdenom.info nntp
    #Nothing happen during a very long time...
    $

    I didn't tried on port 563, I don't know if netcat can speak on a TLS connection.

    Thanks,

    --
    Stéphane

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yamo'@21:1/5 to All on Thu Sep 1 09:17:39 2022
    Hi,
    yamo' a écrit :
    I have an account configured with user/pass and at the start I cannot go
    to Edit/Server and have to wait for a long timeout.

    I had (after a long time, it is possible to edit the server).

    --
    Stéphane

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael =?ISO-8859-1?Q?B=E4uerle?=@21:1/5 to yamo' on Thu Sep 1 19:00:59 2022
    yamo' wrote:
    yamo' a écrit :

    I have an account configured with user/pass and at the start I cannot
    go to Edit/Server and have to wait for a long timeout.

    I had (after a long time, it is possible to edit the server).

    I see. The server configuration window in the GUI is blocked until the
    idle state is reached.

    I'm currently working on a user configurable connection timeout.
    The first attempt has not worked as expected. I will be back when I
    have something that works.

    In the meantime you can use this workaround:
    - Close the program
    - Open the configfile with a text editor
    With standard configuration: "~/.config/flnews/configfile"
    - Search for the entry "server:"
    You can enter a working server name directly.
    Or you can insert garbage (something that cannot be resolved).
    - Save the configfile
    - Start program again
    A server entry that does not resolve should quickly fail, and make
    the server configuration window accessible again.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yamo'@21:1/5 to All on Fri Sep 2 10:12:41 2022
    Hi,
    Michael Bäuerle a écrit :
    I'm currently working on a user configurable connection timeout.
    The first attempt has not worked as expected. I will be back when I
    have something that works.


    Thanks a lot for your work!

    --
    Stéphane

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael =?ISO-8859-1?Q?B=E4uerle?=@21:1/5 to yamo' on Fri Sep 2 12:22:55 2022
    yamo' wrote:
    Michael Bäuerle a écrit :

    I'm currently working on a user configurable connection timeout.
    The first attempt has not worked as expected. I will be back when I
    have something that works.

    Thanks a lot for your work!

    <https://micha.freeshell.org/flnews/src/flnews-1.2.0pre5.tar.bz2> Size(flnews-1.2.0pre5.tar.bz2)= 1197684
    SHA2-256(flnews-1.2.0pre5.tar.bz2)= 6144cadd2777568a7e6f817ed8823bee2ca829e156a6b27ef9080382d69473e3

    The snapshot above supports a user defined TCP connection timeout with
    the new compile time option CFG_TCP_CONNECT_TIMEOUT in the file CONFIG.
    The value is interpreted as seconds, 0 uses the default timeout from
    the operating system (former behaviour).

    I have set 5 seconds for testing. Therefore at build time the config
    rule (make config) should display:
    |
    | [...]
    | Store TCP connection timeout ... 5 seconds
    | [...]

    Note that this timeout is used for every connection attempt. And one
    retry is executed for every IP address returned by getaddrinfo().
    If this new timeout is detected at runtime, the message on the terminal
    should look like this:
    |
    | [...]
    | flnews: INET: User defined TCP connection timeout
    | [...]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From yamo'@21:1/5 to All on Mon Sep 5 14:44:41 2022
    Hi Michael,

    Michael Bäuerle wrote:


    The snapshot above supports a user defined TCP connection timeout with
    the new compile time option CFG_TCP_CONNECT_TIMEOUT in the file CONFIG.
    The value is interpreted as seconds, 0 uses the default timeout from
    the operating system (former behaviour).


    I didn't edit anything and it works very well.

    flnews 1.2 isn't blocked by a server that didn't reply!

    Best regards,
    --
    Stéphane

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)