java.net.UnknownHostException in while running Pla

2019-09-10 20:55发布

I am able to run and get results properly. I am getting below error while running activator in Play Framework 2.5.3.

Warning: node.js detection failed, sbt will use the Rhino based Trireme        JavaScript engine instead to run JavaScript assets  compilation,    which in some cases may be orders of magnitude slower than using node.js.
            [error] n.s.e.Cache - Unable to set localhost. This prevents      creation of a GUID. Cause was: linux-78et.suse: linux-  78et.suse: unknown error
          java.net.UnknownHostException: linux-78et.suse: linux-78et.suse: unknown error
    at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
    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:722)
       at net.sf.ehcache.CacheManager.doInit(CacheManager.java:439)
      at net.sf.ehcache.CacheManager.init(CacheManager.java:377)
      at net.sf.ehcache.CacheManager.<init>(CacheManager.java:259)
       at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1037)
      at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:936)
    Caused by: java.net.UnknownHostException: linux-78et.suse: unknown error
      at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
      at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
      at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
      at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
      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:722)
      at net.sf.ehcache.CacheManager.doInit(CacheManager.java:439)
      at net.sf.ehcache.CacheManager.init(CacheManager.java:377)
      [info] application - ApplicationTimer demo: Starting application at 2016-05-22T19:21:48.074Z.

Below is the imageenter image description here

1条回答
乱世女痞
2楼-- · 2019-09-10 21:46

Try to change the localhost entry in /etc/hosts (you need root/sudo access) from

127.0.0.1 localhost

to

127.0.0.1 localhost linux-78et.suse
查看更多
登录 后发表回答