播放框架 GUID [英] Play Framework GUID

查看:16
本文介绍了播放框架 GUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个播放应用程序.当我运行应用程序时,我在 dev 和 prod 中都收到此错误

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.

推荐答案

java 无法将 mynap3 解析为 localhost,因此您必须添加该行

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

127.0.0.1 localhost mynap3

到您的/etc/hosts 文件

to your /etc/hosts file

你可以通过执行来做到这一点

you can do this by executing

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

这篇关于播放框架 GUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆