Bug 59057

Summary: Get "Name or service not known" for correct hostname usinfg ftp (and telnet)
Product: [Retired] Red Hat Linux Reporter: Jean-Francois Pirus <jfp>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: ftp://ftp.perl.org
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-22 02:49:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jean-Francois Pirus 2002-01-30 04:59:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.7) Gecko/20011221

Description of problem:
When trying to ftp to ftp.perl.org, you get the following error:
Name or service not known.
Doing an nslookup and ftp'ing to the ip address works.
The bug might be related to the glibc bug 2832.

Basically using gethostbyname() works, which is what ftp.c in netkit-ftp-0.17 does. 
The netkit-ftp.usagi-ipv6.patch (from ftp-0.17-12.src.rpm) switches to using
getaddrinfo() with a PF_UNSPEC (0) parameter which make it search IPv6 the IPv4.
Changing the parameter to AF_INET fixes the problem but disables IPv6 lookups.

telnet has the same behaviour.
It could be related to the length of the A record the CNAME points to
or the fact that it's a double CNAME indirection.

ftp.perl.org    canonical name = ftp.perl.org.develooper.com.
ftp.perl.org.develooper.com     canonical name = ftp.cpan.ddns.develooper.com.
Name:   ftp.cpan.ddns.develooper.com


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.ftp ftp.perl.org
2.
3.
	

Additional info:

Comment 1 Bernhard Rosenkraenzer 2002-01-30 10:39:44 UTC
The code seems correct; assigning to glibc. 
 
Jakub: 
http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=default&cmd=view+audit-trail&cmd=view&pr=2832 
has a test case

Comment 2 Ulrich Drepper 2003-04-22 02:49:16 UTC
This definitely works for me on RHL9.  If you still have a problem after
updating to RHL9 please open a bug for RHL9.