修改linu主机名后 启动tomcat服务报Unable to set localhost. This prevents creation of a GUID. Cause was: qudaogua

下面贴下主要的报错信息:

 Found dialect org.hibernate.dialect.MySQLDialect
10:09:53,610 ERROR [localhost-startStop-1][Cache:120] Unable to set localhost. This prevents creation of a GUID. Cause was: qudaoguanli: qudaoguanli
java.net.UnknownHostException: qudaoguanli: qudaoguanli
        at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
        at net.sf.ehcache.Cache.<clinit>(Cache.java:214)
        at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:296)
        at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:219)
        at net.sf.ehcache.CacheManager.configure(CacheManager.java:762)
        at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463)
        at net.sf.ehcache.CacheManager.init(CacheManager.java:392)
        at net.sf.ehcache.CacheManager.<init>(CacheManager.java:266)
        at com.liferay.portal.cache.ehcache.CacheManagerUtil.createCacheManager(CacheManagerUtil.java:38)
        at com.liferay.portal.cache.ehcache.EhcachePortalCacheManager.afterPropertiesSet(EhcachePortalCacheManager.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546)

 

这个问题是由修改主机名引起的

解决办法:

直接修改linux的/etc目录下的hosts文件即可

修改内容 在127.0.0.1 的后面添加上你修改的主机名即可 我这里添加的是qudaoguanli

你可能感兴趣的:(修改linu主机名后 启动tomcat服务报Unable to set localhost. This prevents creation of a GUID. Cause was: qudaogua)