Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
723 views
in Technique[技术] by (71.8m points)

configuration - Play Framework GUID

I have created a play application. When i am running the application i'm getting this error both in dev and prod

07:59:58,445 INFO  ~ Precompiling ...
08:00:08,884 ERROR ~ Unable to set localhost. This prevents creation of a GUID. Cause was: sys3: sys3: Name or service not known
java.net.UnknownHostException: sys3: sys3: Name or service not known
    at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
    at net.sf.ehcache.Cache.<clinit>(Cache.java:155)
    at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:298)
    at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:214)
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:552)
    at net.sf.ehcache.CacheManager.init(CacheManager.java:323)
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:279)
    at net.sf.ehcache.CacheManager.create(CacheManager.java:641)
    at play.cache.EhCacheImpl.<init>(EhCacheImpl.java:31)
    at play.cache.EhCacheImpl.newInstance(EhCacheImpl.java:41)
    at play.cache.Cache.init(Cache.java:241)
    at play.Play.start(Play.java:511)
    at play.Play.init(Play.java:300)
    at play.server.Server.main(Server.java:158)
Caused by: java.net.UnknownHostException: sys3: Name or service not known
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:866)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1258)
    at java.net.InetAddress.getLocalHost(InetAddress.java:1434)
    ... 13 more

I don't know what is this, what this will do. How to solve this issue. Pl help me.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

java is unable to resolve mynap3 as localhost, so you'll have to add the line

127.0.0.1 localhost mynap3

to your /etc/hosts file

you can do this by executing

sudo bash
echo "127.0.0.1 localhost mynap3" >> /etc/hosts

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...