Bug 59057 - Get "Name or service not known" for correct hostname usinfg ftp (and telnet)
Get "Name or service not known" for correct hostname usinfg ftp (and telnet)
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2002-01-29 23:59 EST by Jean-Francois Pirus
Modified: 2007-04-18 12:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-21 22:49:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jean-Francois Pirus 2002-01-29 23:59:45 EST
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:

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

Additional info:
Comment 1 Bernhard Rosenkraenzer 2002-01-30 05:39:44 EST
The code seems correct; assigning to glibc. 
has a test case
Comment 2 Ulrich Drepper 2003-04-21 22:49:16 EDT
This definitely works for me on RHL9.  If you still have a problem after
updating to RHL9 please open a bug for RHL9.

Note You need to log in before you can comment on or make changes to this bug.