Tuesday, June 14, 2011

netstat getnameinfo failed error

netstat -pt shows getname info failed error when u try to grep something from the output.

the error is due to one of the IP's in the netstat output cannot be converted into hostname as it does not exist in the /etc/hosts instead it is getting converted to UNKNOWN.

You avert the error by using

1) netstat -pt --numeric_ports  | grep something
when you use this command the IP's will not  be converted into hostnames and the error will not arise.

2)or try to find for which IP's the hostname is not generated and in the netstat  output it shows as UNKNOWN and try to add those IP's to the /etc/hosts.
And in some cases it may also be tunnel IP's which is unknown to the system and it will be of different format.

No comments:

Post a Comment