delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/11/30/14:49:21

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=cqt5xCG
uTu7JN2Yr4N+2ujhvIhnckzkUf2Ooe1BylswDDssi1x3hiAM80TYTsS90JVKgIot
ygdsC3lRmydXWthMpBmICNBoaRkM4h4QqjcDJqJDqErlc/JZZTzG+0ou8077zl4z
yZJxKBahlFGNut6aX4C1dz9oRs5Pa2fZxBMA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=x9hUssbAXvWcS
e8v03bk0wHvILw=; b=Jm6K7vKz64ndjvHrAklINjtVCzLnRDNK2WVglBZvMK4uc
RiX4m4PUkAxtO/WqetqnUG7Qz+D4InOxlrbSc4PCJ4U41bnXIZDep8fdY0En5dpN
iZKd+kyJG0L9j5YmhAPcbo0P0n59D8Gl/O38kU9vIVcduaWeii71r7M5xUpTwo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_BADIPHTTP,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS,WEIRD_PORT autolearn=no version=3.3.2 spammy=rogue, Closing, Lee, lee
X-HELO: mail-it1-f182.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7m5wzIv0PeldHsmxCm/mLWczIv6XbSiBpHsiHdP+d98=; b=WlkJYtuQn5CCWYt58allIVURcOKu9bcdUOsN6bn+9LBrkRYjZKSBip/Outvt+XLD8n 5y8Uc3jzn/objFYDVvyZwNeHWyzS5vCyc+UiSKNlDY3v8/Zbhl5iU1cF4z1alfSMrgUK 1cJiEB+SWPe2jMZoq9M+YPiCSZIUhpLn8CB2t6PEhOTNrF+9vsQSUfecwpI04Rmdne+5 HYv5FFHGbbSXesk/1qE4zNX6KZJrZgno7Eu0d7kVLPhh+HfhFOCQCBoqs0snH8ubEWbs DNFQW5Q76EzQaatZ7LxFv+G+kuEO/VgyiCrHm3rzsfTwBcp6w1metWHGLlhYl0l9uQkL ogSw==
MIME-Version: 1.0
In-Reply-To: <8a710131-214c-badd-04a8-fc0899cf5511@gmail.com>
References: <8a710131-214c-badd-04a8-fc0899cf5511 AT gmail DOT com>
From: Lee <ler762 AT gmail DOT com>
Date: Fri, 30 Nov 2018 14:49:04 -0500
Message-ID: <CAD8GWssBAH_KKXCC7jxTgCjS02KjXVb7LgkNvyriXJeE7cPSOg@mail.gmail.com>
Subject: Re: Something makes curl hang for 5 minutes after connection refused
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Note-from-DJ: This may be spam

On 11/30/18, Basin Ilya  wrote:
> Hi.
>
> Recently I noticed that `curl` does not fail immediately after connection
> refused, but waits for 5 minutes.
>
> This only happens on my machine and only with the `Cygwin` version of
> `curl`. The mingw version is unaffected.
> I tried downgrading curl, but it didn't help. I thought there's a rogue
> setting in `/etc` or in home or maybe some environment variable, but I
> couldn't find it.
>
>     basin AT BASIN /cygdrive/c/Users/basin
>     $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
>     * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection
> #-5000)
>     * Added connection 0. The cache now contains 1 members
>     *   Trying 127.0.0.1...
>     * TCP_NODELAY set
>     * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection
> #0)
    <.. snip ..>
>     curl: (28) Connection timed out after 300145 milliseconds
>
>     basin AT BASIN /cygdrive/c/Users/basin
>     $ /usr/bin/curl --version
>     curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11
> libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0

> Can someone try to reproduce it?

I get the same behavior:
$ /usr/bin/curl -v http://127.0.0.1:2/
* STATE: INIT => CONNECT handle 0x600057ad0; line 1404 (connection #-5000)
* Added connection 0. The cache now contains 1 members
*   Trying 127.0.0.1...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x600057ad0; line 1456 (connection #0)
* Connection timed out after 300324 milliseconds
* multi_done
* stopped the pause stream!
* Closing connection 0
* The cache now contains 0 members
curl: (28) Connection timed out after 300324 milliseconds

$ /usr/bin/curl --version
curl 7.59.0 (x86_64-unknown-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p
zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0
nghttp2/1.31.0


I also get an almost immediate 'failed to connect' notice on windows:
C:\>C:\UTIL\curl\curl.exe -v http://127.0.0.1:2/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 2 failed: Connection refused
* Failed to connect to 127.0.0.1 port 2: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 2: Connection refused

with either version of curl:
C:\>where curl
C:\UTIL\curl\curl.exe
C:\Windows\System32\curl.exe

Regards,
Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019