Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2013 08:48:29 GMT
From:      Henrik Larsson <freebsd@spambox.dk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/180942: ftp/curl 7.31.0 "getpeername() failed with errno 57: Socket is not connected"
Message-ID:  <201307300848.r6U8mThL019176@oldred.freebsd.org>
Resent-Message-ID: <201307300850.r6U8o2qO038134@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         180942
>Category:       ports
>Synopsis:       ftp/curl 7.31.0 "getpeername()  failed with errno 57: Socket is not connected"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 30 08:50:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Henrik Larsson
>Release:        8.4
>Organization:
>Environment:
FreeBSD <hostname> 8.4-RELEASE FreeBSD 8.4-RELEASE #0: Thu Jun 13 23:41:57 CEST 2013 <user@hostname>:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I have installed "Curl 7.31.0" on FreeBSD 8.4 using the port. I have an 
issue with using Curl to download from a specific site.

If I try to download from the site directly, it fail with "getpeername() 
failed with errno 57: Socket is not connected":
--cut--
% curl -v http://www.malwarepatrol.net
* Adding handle: conn: 0x801286300
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x801286300) send_pipe: 1, recv_pipe: 0
* About to connect() to www.malwarepatrol.net port 80 (#0)
*   Trying 141.101.116.91...
* Connected to www.malwarepatrol.net (141.101.116.91) port 80 (#0)
* getpeername() failed with errno 57: Socket is not connected
> GET / HTTP/1.1
> User-Agent: curl/7.31.0
> Host: www.malwarepatrol.net
> Accept: */*
>
* Recv failure: Software caused connection abort
* Closing connection 0
curl: (56) getpeername() failed with errno 57: Socket is not connected
--cut--

If I download the Curl source files and run configure with no other options than "prefix". The download work fine:
--cut--
% ./curl -v -s http://www.malwarepatrol.net | more
* About to connect() to www.malwarepatrol.net port 80 (#0)
*   Trying 141.101.116.91...
* Adding handle: conn: 0x80147f600
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x80147f600) send_pipe: 1, recv_pipe: 0
* Connected to www.malwarepatrol.net (141.101.116.91) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.31.0
> Host: www.malwarepatrol.net
> Accept: */*
>
< HTTP/1.1 200 OK
* Server cloudflare-nginx is not blacklisted
< Server: cloudflare-nginx
< Date: Tue, 30 Jul 2013 08:46:59 GMT
< Content-Type: text/html; charset=iso-8859-1
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=da641ad74c9637d2f54289e4ba4fc885c1375174018764; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.malwarepatrol.net
< CF-RAY: 960c811325b05b5
--cut--

This is the output of my OPTIONS file:
--cut--
# This file is auto-generated by 'make config'.
# Options for curl-7.31.0
_OPTIONS_READ=curl-7.31.0
_FILE_COMPLETE_OPTIONS_LIST=CA_BUNDLE COOKIES CURL_DEBUG DEBUG DOCS EXAMPLES GSSAPI IDN IPV6 LDAP LDAPS LIBSSH2 NTLM PROXY RTMP SPNEGO TLS_SRP CARES THREADED_RESOLVER CYASSL GNUTLS NSS OPENSSL POLARSSL
OPTIONS_FILE_SET+=CA_BUNDLE
OPTIONS_FILE_UNSET+=COOKIES
OPTIONS_FILE_UNSET+=CURL_DEBUG
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=EXAMPLES
OPTIONS_FILE_SET+=GSSAPI
OPTIONS_FILE_UNSET+=IDN
OPTIONS_FILE_UNSET+=IPV6
OPTIONS_FILE_UNSET+=LDAP
OPTIONS_FILE_UNSET+=LDAPS
OPTIONS_FILE_UNSET+=LIBSSH2
OPTIONS_FILE_UNSET+=NTLM
OPTIONS_FILE_SET+=PROXY
OPTIONS_FILE_UNSET+=RTMP
OPTIONS_FILE_UNSET+=SPNEGO
OPTIONS_FILE_SET+=TLS_SRP
OPTIONS_FILE_UNSET+=CARES
OPTIONS_FILE_SET+=THREADED_RESOLVER
OPTIONS_FILE_UNSET+=CYASSL
OPTIONS_FILE_UNSET+=GNUTLS
OPTIONS_FILE_UNSET+=NSS
OPTIONS_FILE_SET+=OPENSSL
OPTIONS_FILE_UNSET+=POLARSSL
--cut--

I have no idea if some of the specific FreeBSD patches or the port specific Makefile is causing this, and need some help to fix it.
>How-To-Repeat:
- Install ftp/curl port
- Run command "curl -v http://www.malwarepatrol.net"
- The download fail with "getpeername()  failed with errno 57: Socket is not connected"
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307300848.r6U8mThL019176>