Bug 699093

Summary: lftp fails to connect to some sites
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: lftpAssignee: Jiri Skala <jskala>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: aglotov, jskala, pertusus
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-26 08:12:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michal Jaegermann 2011-04-23 01:52:43 UTC
Description of problem:

It appears that lftp has issue connecting to some sites.  For example:

$ lftp -d http://fedora.mirror.nexicom.net/linux/updates/14/x86_64/
---- Connecting to fedora.mirror.nexicom.net (2607:f1f0:0:4::2) port 80
**** connect: Network is unreachable
---- Closing HTTP connection
cd: Success

and you are back at a shell prompt.

AFAICT lftp-4.2.2-1.fc16 from rawhide does not suffer from this.
Here is the same attempt with it:

$ lftp -d http://fedora.mirror.nexicom.net/linux/updates/14/x86_64/
---- Connecting to fedora.mirror.nexicom.net (2607:f1f0:0:4::2) port 80
**** connect: Network is unreachable
---- Closing HTTP connection
---- Connecting to fedora.mirror.nexicom.net (98.124.49.250) port 80
---- Sending request... 
....

and that works as expected.

lftp-4.0.9-3.fc14 gets a connection like this:

$ lftp http://98.124.49.250/

and that works; only after that lftp is unable to find anything there so

$ lftp http://98.124.49.250/linux/updates/14/x86_64/

fails with "cd: Access failed: 404 Not Found (/linux/updates/14/x86_64)"


Version-Release number of selected component (if applicable):
lftp-4.0.9-3.fc14

How reproducible:
every time with fedora.mirror.nexicom.net which replies with both
IPv6 and IPv4 addresses.

Maybe it would work with IPv6 route from me to 2607:f1f0:0:4::2 but this is beyond my control, I am afraid.

Comment 1 Jiri Skala 2011-04-26 08:12:38 UTC
I don't think this is a fault of lftp. 

The link http://fedora.mirror.nexicom.net/linux/updates/14/x86_64/ works for me fine on f14.

I've tried to put links http://98.124.49.250/ and .../linux/updates/14/x86_64 to browser. There is probably no ftp server.

Comment 2 Michal Jaegermann 2011-04-26 14:14:25 UTC
(In reply to comment #1)
> I don't think this is a fault of lftp.

Hm, then why a newer version worked while the one from f14 did not?
 
> The link http://fedora.mirror.nexicom.net/linux/updates/14/x86_64/ works for me
> fine on f14.

Indeed, today it works.  That what I see on F14 machine with '-d' flag:

$ lftp -d http://fedora.mirror.nexicom.net/linux/updates/14/x86_64/
---- Connecting to fedora.mirror.nexicom.net (98.124.49.250) port 80
---- Sending request...          
---> HEAD /linux/updates/14/x86_64/ HTTP/1.1
---> Host: fedora.mirror.nexicom.net
---> User-Agent: lftp/4.0.9
---> Accept: */*
---> Connection: keep-alive
---> 
<--- HTTP/1.1 200 OK                       
<--- Date: Tue, 26 Apr 2011 13:47:48 GMT
<--- Server: Apache/2.2.16 (Debian)
<--- Vary: Accept-Encoding
<--- Keep-Alive: timeout=15
<--- Connection: Keep-Alive
<--- Content-Type: text/html;charset=UTF-8
<--- 
cd ok, cwd=/linux/updates/14/x86_64

 
> I've tried to put links http://98.124.49.250/ and .../linux/updates/14/x86_64
> to browser. There is probably no ftp server.

Oh, a server is there.  No, no ftp but we are using http protocol.
$ lftp -d http://98.124.49.250/
---- Connecting to 98.124.49.250 (98.124.49.250) port 80
---- Sending request...                     
---> HEAD / HTTP/1.1
---> Host: 98.124.49.250
---> User-Agent: lftp/4.0.9
---> Accept: */*
---> Connection: keep-alive
---> 
<--- HTTP/1.1 200 OK                                  
<--- Date: Tue, 26 Apr 2011 13:53:59 GMT
<--- Server: Apache/2.2.16 (Debian)
<--- Last-Modified: Sun, 13 Mar 2011 15:01:47 GMT
<--- ETag: "590a002-6ae-49e5e795b8cc0"
<--- Accept-Ranges: bytes
<--- Content-Length: 1710
<--- Vary: Accept-Encoding
<--- Keep-Alive: timeout=15
<--- Connection: Keep-Alive
<--- Content-Type: text/html
<--- 
cd ok, cwd=/
lftp 98.124.49.250:/> pwd
http://98.124.49.250/

Most likely 'fedora.mirror.nexicom.net' is a "virtual" one and that is why it is not finding its content without a name.  Try and see also

lftp http://centos.mirror.nexicom.net/
 or
lftp http://debian.mirror.nexicom.net/

No idea what games they were playing Friday but the difference is that
then the first connection was attempted to 2607:f1f0:0:4::2, and that was ending  in a failure, and today I see it to 98.124.49.250 (both time port 80). With lftp-4.2.2-1.fc16 after "Network is unreachable" on 2607:f1f0:0:4::2, which for me is indeed the case, 98.124.49.250 was tried instead of an exit.