View previous topic :: View next topic |
Author |
Message |
oegat n00b
Joined: 12 Apr 2003 Posts: 41 Location: Sweden
|
Posted: Sat Apr 12, 2003 12:57 pm Post subject: "ping: unknown protocol icmp" and similar problems |
|
|
I have recently been getting "unknown protocol"-messages when trying to use some services from my gentoo system (1.4rc3, linux-2.4.20-gentoo-r1 #1 SMP). These include:
ping: unknown protocol icmp.
ftp: ftp/tcp: unknown service
syslogd: network logging disabled (syslog/udp service unknown.)
alhough http, nfs, samba, ssh and emerge (uses rsync, right?) works fine.
Update: I solved the problem for ping and syslogd an ugly way while writing most of this post. More on this below.
When searching the forums I found this thread, addressing the same issue with the cause being bad nsswitch.conf. As I will show below, I strongly suspect missing libnss_*-files in my case. But first a look in /etc to get things in the right order:
/etc/protocols looks fine to me:
Code: |
#/etc/protocols
<strip headers>
ip 0 IP # internet protocol, pseudo protocol number
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # Internet Group Management
ggp 3 GGP # gateway-gateway protocol
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
st 5 ST # ST datagram mode
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4
xtp 36 XTP # Xpress Tranfer Protocol
ddp 37 DDP # Datagram Delivery Protocol
idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport
ipv6 41 IPv6 # IPv6
ipv6-route 43 IPv6-Route # Routing Header for IPv6
ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
idrp 45 IDRP # Inter-Domain Routing Protocol
rsvp 46 RSVP # Reservation Protocol
gre 47 GRE # General Routing Encapsulation
esp 50 ESP # Encap Security Payload for IPv6
ah 51 AH # Authentication Header for IPv6
skip 57 SKIP # SKIP
ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
rspf 73 RSPF # Radio Shortest Path First.
vmtp 81 VMTP # Versatile Message Transport
ospf 89 OSPFIGP # Open Shortest Path First IGP
ipip 94 IPIP # IP-within-IP Encapsulation Protocol
encap 98 ENCAP # Yet Another IP encapsulation
pim 103 PIM # Protocol Independent Multicast
|
So does nsswitch.conf:
Code: |
# /etc/nsswitch.conf:
passwd: compat
shadow: compat
group: compat
# passwd: db files nis
# shadow: db files nis
# group: db files nis
hosts: files dns
networks: files dns
services: db files
protocols: db files
rpc: db files
ethers: db files
netmasks: files
netgroup: files
bootparams: files
automount: files
aliases: files
|
Removing "db" from protocols and services lines did not help. Although, the manpage for nsswitch.conf tells me following:
Code: |
FILES
A service named SERVICE is implemented by a shared object library named
libnss_SERVICE.so.X that resides in /lib.
/etc/nsswitch.conf configuration file
/lib/libnss_compat.so.X implements `compat' source for glibc2
/lib/libnss_db.so.X implements `db' source for glibc2
/lib/libnss_dns.so.X implements `dns' source for glibc2
/lib/libnss_files.so.X implements `files' source for glibc2
/lib/libnss_hesiod.so.X implements `hesiod' source for glibc2
/lib/libnss_nis.so.X implements `nis' source for glibc2
/lib/libnss_nisplus.so.2 implements `nisplus' source for glibc 2.1
|
Now, my gentoo contains no /lib/libnss_db.so* or /lib/libnss_files.so*. Also, there is a symlink /usr/lib/libnss_files pointing to (nonexistent) /lib/libnss_files.so.2! Is this the main problem, files missing?
More interesting, during my writing of most of this post I tried to link in a libnss_files.so from a friends debian system, and now ping and syslog works but still no ftp! Any suggestions on what more is missing, how to replace it the "good" way and how it went away in the first place? Or was it obsoleted by any recent addon to the cvstree (I do emerge -u world often) and I missed to update some configuration-file? |
|
Back to top |
|
|
Jimbow Guru
Joined: 18 Feb 2003 Posts: 597 Location: Silver City, NM
|
Posted: Sun Apr 13, 2003 12:35 am Post subject: |
|
|
I've got an up-to-date system and I have /lib/libnss_files.so.2 it belongs to the glibc package. It looks like remerging glibc and netkit-base might get things working again. Certainly do an emerge -s on them to verify that you have the latest stable versions.
A bigger concern is that these files are missing. I've seen a couple of other posts this past week with similar mysterious missing file stories. I haven't yet seen any clues that would point to a common mode of failure. _________________ After Perl everything else is just assembly language. |
|
Back to top |
|
|
oegat n00b
Joined: 12 Apr 2003 Posts: 41 Location: Sweden
|
Posted: Sun Apr 13, 2003 8:25 pm Post subject: |
|
|
Thanks, re-emerging glibc helped. However, weirdness continues: now the locate and updatedb binaries aswell as their manpages are missing :-/
Is there any nice way to check what package a specific binary belongs to? There is no locate in the portage tree but an slocate, I don't know if that one i the standard locate (in other case locate must belong to some other package). In any case files disappearing is not good. |
|
Back to top |
|
|
Jimbow Guru
Joined: 18 Feb 2003 Posts: 597 Location: Silver City, NM
|
Posted: Sun Apr 13, 2003 8:34 pm Post subject: |
|
|
oegat wrote: | Thanks, re-emerging glibc helped. However, weirdness continues: now the locate and updatedb binaries aswell as their manpages are missing :-/ |
Time to fsck your file system.
BTW: what type of file system are you using? Are you overclocking or running hot?
Quote: | Is there any nice way to check what package a specific binary belongs to? There is no locate in the portage tree but an slocate, I don't know if that one i the standard locate (in other case locate must belong to some other package). In any case files disappearing is not good. |
Slocate is the same as locate (only safer). The locate and updatedb commands are symlinks to slocate.
Use qpkg (part of gentoolkit) to find out which package a file belongs to. Example: Code: | qpkg -f `which updatedb`
sys-apps/slocate * |
I just added it to my .bashrc: Quote: |
what () {
qpkg -f `which $1`
} |
_________________ After Perl everything else is just assembly language. |
|
Back to top |
|
|
oegat n00b
Joined: 12 Apr 2003 Posts: 41 Location: Sweden
|
Posted: Mon Apr 14, 2003 7:46 pm Post subject: |
|
|
That actually helped a bit!
fsck aftermath:
/usr on reiserfs looked ok, thats where the 'locate' stuff were. So did /var, also reiser.
/ on ext3 looked terrible and the missing libs among other things were put in lost+found by fsck. I have identified most of it but there are some files left I dont know about :-/
The disk is a quantum scsi about 3yrs old and it has worked fine for me so far, and I dont think it's running hot because I recently added an extra fan in it's vicinity. No errors were reported by badblocks, and I haven't been overclocking either. I do recall a couple of hard reboots a while ago, they are probably the reason.
Now I'm going to re-emerge some progs according to my suspicions and check against the stray files in lost+found. Ironically enough, I have never before had any serious filesystem problems until I migrated to ext3.
My conclusion:
The fs inconsitency explained the missing libs. However it does not explain the disappearing of 'locate' and friends but in this case I suspect it to be a portage thing. Maybe an old version of some package contained locate and I upgraded to a newer version without it?
In any case, thank you for your tips. Time to emerge gentoolkit! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|