Nodename nor servname provided, or not known Java
16:27 26 Jan 2016

Recently I tried running my Java project and whenever I run it and open it up to the server address I am getting:

     Unable to determine host name
java.net.UnknownHostException: Caused by: java.net.UnknownHostException: (USERNAME): nodename nor servname provided, or not known

where USERNAME is my username. I believe it has something to do with my /etc/hosts file. I have tried modifying that changing it to:

##
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

And it is still getting the same error every time that I cannot find the sever. I have been stuck on this for a while, mostly time spent modifying the hosts file, but no luck. Any ideas as to how I can get this resolved?

I have also tried deleting my project and re-clone it, and it is still getting the same error.

Ultimately, I think it has something to do with not being able to connect with the host.

java