I just got through resolving this "hostname nor servername provided" problem (I think there's a missing "neither") for a neighbor on a U2 machine, which was unable to update; in summary,
1) Obviously, DNS was failing, but everything worked fine on a Windows machine on the same network, so I felt it was a problem local to the FreeNAS machine. I switched to the underlying FreeBSD OS, and worked mostly in the shell from then on. We tried nslookup, and it couldn't find anything either, so we looked to see what nameserver was being used.
2) The only nameserver shown in Network Summary was 8.8.8.8. No idea where this came from, but we added the IP of the local router as the first nameserver. I left the 8.8.8.8 in place, mostly because I couldn't figure out how to get rid of it, but it seemed harmless. Now at home, I see 8.8.8.8 as the 2nd in my Network Summary list as well; turns out it's Google's primary DNS server.
3) Now we could use nslookup to find an IP address, but when we tried to access a remote server by name, we got a No Route to Host error, and also couldn't ping by IP address, suggesting a bad routing table. In retrospect, I should have caught this in the first place.
4) Sure enough, the routing table had no default route. Adding the IP of the router as the default gateway solved that, our last problem.