本文介绍了运行Play Framework Activator时出现java.net.UnknownHostException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我能够正常运行并获得结果.在Play Framework 2.5.3中运行激活器时出现错误提示.
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.
下面是图像
推荐答案
尝试从以下位置更改/etc/hosts
中的localhost条目(您需要root/sudo访问权限):
Try to change the localhost entry in /etc/hosts
(you need root/sudo access) from
127.0.0.1 localhost
到
127.0.0.1 localhost linux-78et.suse
这篇关于运行Play Framework Activator时出现java.net.UnknownHostException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!