I have an IP address, xx.xx.xx.xx, for which ping works. But when I do an nslookup for that IP address it is failing. Is there a way to find the domain name of the machine with the IP address xx.xx.xx.xx?
The only way to do this is via a reverse DNS lookup. However, if you are saying that
nslookup is failing then (unless there is a local issue with you having bad DNS servers listed on your local machine), then a reverse lookup will not work.
The various tools that other posters have mentioned, all ultimately do exactly the same the nslookup will do from your machine. They do a reverse DNS lookup via the "in-addr.arpa" address range (this is a special domain reserved in DNS for reverse lookups).
You need to use a "reverse DNS lookup". Try this one online, or Google further for other options.