You are not logged in.

#1 2007-08-08 11:56:02

voidzero
Member
Registered: 2007-06-21
Posts: 109

Some internet applications don't work

# ftp
ftp: ftp/tcp: unknown service

# whois google.com
getaddrinfo(whois.crsnic.net): Servname not supported for ai_socktype

I'm thinking there's a general error here. /etc/services does exist so this isn't the problem. Other than that I'm pretty clueless, can anyone please offer their assistance? Thanks. smile

Offline

#2 2007-08-08 15:31:42

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Some internet applications don't work

Make sure /etc/services is world readable:

chown root:root /etc/services
chmod 644 /etc/services

Last edited by FUBAR (2007-08-08 15:31:52)


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#3 2007-08-08 15:40:58

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Thanks... however this was already the case:

% ls -alF /etc/services
-rw-r--r-- 1 root root 13651 2007-07-30 21:52 /etc/services

Offline

#4 2007-08-09 08:16:42

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Some internet applications don't work

Does your /etc/services have the line

ftp        21/tcp

?


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#5 2007-08-09 09:07:51

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

% cat /etc/services| grep ftp
ftp-data    20/tcp        # default ftp data port
ftp        21/tcp        # File Transfer Protocol

Offline

#6 2007-08-10 09:06:27

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: Some internet applications don't work

OK, I'm out.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#7 2007-08-10 09:10:30

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Thanks anyway, FUBAR. smile

Anyone else that could take a shot at helping me?

Offline

#8 2007-08-10 09:16:38

clickit
Member
From: Athens, Hellas
Registered: 2007-07-18
Posts: 93

Re: Some internet applications don't work

perhaps you'll find a solution here => http://bbs.archlinux.org/viewtopic.php?id=12437

Offline

#9 2007-08-10 09:18:32

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Heh, nono ftp is installed (/usr/bin/ftp) it just doesn't work like some other console programs like whois!

Offline

#10 2007-08-10 17:21:29

Sacro
Member
Registered: 2007-06-27
Posts: 10

Re: Some internet applications don't work

voidzero wrote:

% cat /etc/services| grep ftp
ftp-data    20/tcp        # default ftp data port
ftp        21/tcp        # File Transfer Protocol

Nice useless use of cat!

Offline

#11 2007-08-10 19:04:21

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Some internet applications don't work

If you have ftp installed then "man ftp" will tell you all you need to make it work.
I no longer user ftp (as it is insecure) in favor of scp and ssh which allow grater security and all the features you may want, but I remember having to type something like "ftp site_name" and after logging in I would issue a command like "put" to sent files from my system to the server.

Hope this helps.

R

Offline

#12 2007-08-10 19:25:34

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Thanks ralvez for your suggestions, however I think the problem is much more plain, and simple, than your suggestions. The problem is:
errors come up when starting ftp.

the error is
ftp: ftp/tcp: unknown service

it happens always.
i do know how to use ftp and the alternatives. It's not what I asked... neutral

I just want a working system and this (together with whois) didn't work from the start.

So please before you answer which I really would love, because this is a very confusing error, at least get the problem before coming with advice that suggests different things.

Now we have this out of the way, let me try to explain the issue once more.

ftp from command line gives the error:
ftp: ftp/tcp: unknown service

whois gives the error:
getaddrinfo(whois.crsnic.net): Servname not supported for ai_socktype

mc does not open valid ftp connections, however, ssh does work. Weird...

/etc/services is correct, does contain ftp 21/tcp and is owned by root:root with modes 644.

Is someone please able to tell me why I am getting these errors? It must be something in the general networking sense, I do have IPv6 configured (auto-config - can't imagine this being the problem).

Thanks guys for helping me lol

Last edited by voidzero (2007-08-10 19:30:04)

Offline

#13 2007-08-10 19:57:30

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Some internet applications don't work

Everything on google is pointing to /etc/services exactly what I'm not sure.
Does services have 43/tcp/upd for whois

Does running the command through strace help further?
strace whois www.google.com

Honestly I really don't know was just trying to help.

Offline

#14 2007-08-10 20:39:03

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Strace! How could I forget about strace.. silly me.

An ftp strace shows this, I can't make cheese out of it but does it say anything to you?

% strace ftp
execve("/usr/bin/ftp", ["ftp"], [/* 51 vars */]) = 0
brk(0)                                  = 0x8066000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=110171, ...}) = 0
mmap2(NULL, 110171, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ede000
close(3)                                = 0
open("/lib/libreadline.so.5", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\274\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0555, st_size=224484, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7edd000
mmap2(NULL, 195908, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ead000
mmap2(0xb7ed8000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2a) = 0xb7ed8000
mmap2(0xb7edc000, 3396, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7edc000
close(3)                                = 0
open("/lib/libncurses.so.5", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\347\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=296368, ...}) = 0
mmap2(NULL, 269892, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e6b000
mmap2(0xb7ea4000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x38) = 0xb7ea4000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360`\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=7225798, ...}) = 0
mmap2(NULL, 1246672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d3a000
mmap2(0xb7e65000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12b) = 0xb7e65000
mmap2(0xb7e68000, 9680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7e68000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=100857, ...}) = 0
mmap2(NULL, 12412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7d36000
mmap2(0xb7d38000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7d38000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d35000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d358d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7d38000, 4096, PROT_READ)   = 0
mprotect(0xb7e65000, 8192, PROT_READ)   = 0
mprotect(0xb7f14000, 4096, PROT_READ)   = 0
munmap(0xb7ede000, 110171)              = 0
brk(0)                                  = 0x8066000
brk(0x8087000)                          = 0x8087000
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = 0
send(3, "\2\0\0\0\22\0\0\0\t\0\0\0services\0", 21, MSG_NOSIGNAL) = 21
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}], 1, 5000) = 1
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"services\0", 9}], msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, 0) = 9
fstat64(4, {st_mode=S_IFREG|0600, st_size=217016, ...}) = 0
pread64(4, "\1\0\0\0h\0\0\0\0\0\0\0\1\0\0\0\24+\274F\0\0\0\0\323\0"..., 104, 0) = 104
mmap2(NULL, 217016, PROT_READ, MAP_SHARED, 4, 0) = 0xb7d00000
close(4)                                = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = 0
send(3, "\2\0\0\0\20\0\0\0\10\0\0\0ftp/tcp\0", 20, MSG_NOSIGNAL) = 20
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN|POLLHUP}], 1, 5000) = 1
read(3, "\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\377"..., 24) = 24
close(3)                                = 0
write(2, "ftp: ftp/tcp: unknown service\n", 30ftp: ftp/tcp: unknown service
) = 30
exit_group(1)                           = ?
Process 5775 detached

Offline

#15 2007-08-10 20:40:43

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Strace of whois might be more obvious, but I don't know which package contains the missing files!

open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f70000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2586
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7f70000, 4096)                = 0
open("/usr/share/locale/en_GB.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_GB/LC_MESSAGES/libc.mo", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1474, ...}) = 0
mmap2(NULL, 1474, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f70000
close(3)                                = 0
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "getaddrinfo(whois.crsnic.net): S"..., 69getaddrinfo(whois.crsnic.net): Servname not supported for ai_socktype) = 69
write(2, "\n", 1
)                       = 1
exit_group(2)                           = ?
Process 5779 detached

Offline

#16 2007-08-10 21:36:14

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: Some internet applications don't work

Honestly I'd love to say I can, but its cheese to me to.

I can do a comparison with whois but not ftp all I can say is I'm getting little mention of locale, in my output any where, but I wouldn't of thought this would be the cause.
The one thing that does stand out is I can't see any resolving or bind but hopefully someone with way more knowledge than I have can assist further.

But what you're getting is so different from myself I really haven't got a clue. If you haven't perhaps set up a locale. Thats what the missing files are, I do have it.

I'm purely guessing I wouldn't of thought this would be it but what do I know and perhaps it might be it.

Last edited by FeatherMonkey (2007-08-10 21:39:08)

Offline

#17 2007-08-10 23:49:21

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Some internet applications don't work

@voidzero: Sorry, your original post is unclear (at least to me, so with a bad question, you get a bad answer roll)

Now, to the problem: check /etc/nsswitch.conf and if you see something like "NOTFOUND = return" comment it out to regain ftp connectivity.

Hope this helps.

R

Offline

#18 2007-08-11 11:47:45

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Some internet applications don't work

Have you ran /etc/rc.d/network ?


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#19 2007-08-14 19:55:20

voidzero
Member
Registered: 2007-06-21
Posts: 109

Re: Some internet applications don't work

Yes ofcourse, test1000, smile

Ralvez - right now I am using smbldap-tools for ldap stuff, this archlinux install is my client, server is running debian.

#ident $Id: nsswitch.ldap,v 2.4 2003/10/02 02:36:25 lukeh Exp $
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses LDAP conjunction with files.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:         files ldap
group:          files ldap

# consult DNS first, we will need it to resolve the LDAP host. (If we
# can't resolve it, we're in infinite recursion, because libldap calls
# gethostbyname(). Careful!)
hosts:          dns ldap files

# LDAP is nominally authoritative for the following maps.
services:   ldap [NOTFOUND=return] files
networks:   ldap [NOTFOUND=return] files
protocols:  ldap [NOTFOUND=return] files
rpc:        ldap [NOTFOUND=return] files
ethers:     ldap [NOTFOUND=return] files

# no support for netmasks, bootparams, publickey yet.
netmasks:   files
bootparams: files
publickey:  files
automount:  files

# I'm pretty sure nsswitch.conf is consulted directly by sendmail,
# here, so we can't do much here. Instead, use bbense's LDAP
# rules ofr sendmail.
aliases:    files
sendmailvars:   files

# Note: there is no support for netgroups on Solaris (yet)
netgroup:   ldap [NOTFOUND=return] files

You think these need modification?

Offline

#20 2007-08-14 20:10:49

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Some internet applications don't work

Hum ... my guess is "yes" because the system that has the setting ON will not respond.

R.

Offline

#21 2007-08-15 07:15:53

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: Some internet applications don't work

Spam Alert!!!


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

Board footer

Powered by FluxBB