gpt4 book ai didi

configuration - Play Framework GUID

转载 作者:行者123 更新时间:2023-12-03 20:05:38 25 4
gpt4 key购买 nike

我创建了一个 Play 应用程序。当我运行应用程序时,我在开发和生产中都收到此错误

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

我不知道这是什么,这会做什么。如何解决这个问题。请帮帮我。

最佳答案

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

127.0.0.1 localhost mynap3

到您的/etc/hosts 文件

你可以通过执行来做到这一点
sudo bash
echo "127.0.0.1 localhost mynap3" >> /etc/hosts

关于configuration - Play Framework GUID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8562881/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com