UnknownHostException - CentOS droplet running tomcat7

Posted May 19, 2014 14.7k views
I changed my password, restarted the droplet and I couldnt start tomcat ever since, when I try to start tomcat if get "UnknownHostException". WHAT I tried so far: * I have changed my droplet name to * my /etc/hosts/ looks like; localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 * restarted the droplet, but its same issue. is my naming correct FQDN 2014-05-19 08:21:02,246 [localhost-startStop-1] ERROR ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: betaEgangan: betaEgangan: Name or service not known betaEgangan: betaEgangan: Name or service not known at at net.sf.ehcache.Cache.( at net.sf.ehcache.config.ConfigurationHelper.createCache( at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache( at net.sf.ehcache.CacheManager.configure( at net.sf.ehcache.CacheManager.init( at net.sf.ehcache.CacheManager.( at net.sf.ehcache.hibernate.EhCacheRegionFactory.start( at java.util.concurrent.Executors$ at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at Caused by: betaEgangan: Name or service not known at$1.lookupAllHostAddr( at at ... 12 more I can not ping this ip from outside the box but ofcourse i can from within.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers
What's the output of running hostname -f in the console? What are the contents of your /etc/sysconfig/network file?
even i am facing same error .

/etc/sysconfig/network file contains


$hostname -f
hostname: Unknown host

what may be the error ?

Try replacing

Reboot your droplet, does that fix it?