首页 文章

运行Play Framework Activator时出现java.net.UnknownHostException

提问于
浏览
0

我能够正常运行并获得结果 . 我在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.

下面是图片
enter image description here

1 回答

  • 1

    尝试更改 /etc/hosts 中的localhost条目(您需要root / sudo访问权限)

    127.0.0.1 localhost
    

    127.0.0.1 localhost linux-78et.suse
    

相关问题