Play应用程序启动时出错

时间:2015-03-23 23:01:37

标签: linux playframework

我注意到我的Play应用程序日志中出现了非阻塞(貌似)错误。 它在部署后在启动时发生。我没有看到任何负面影响,但仍然记录日志条目。这是堆栈跟踪的一部分:

2015-03-23 22:34:48,753 - [INFO] - from play in main 
database [default] connected at jdbc:mysql://localhost:3306/bowlingdb?characterEncoding=UTF-8

2015-03-23 22:34:48,851 - [ERROR] - from net.sf.ehcache.Cache in main 
Unable to set localhost. This prevents creation of a GUID. Cause was: ip-172-30-0-197: ip-172-30-0-197: Name or service not known
java.net.UnknownHostException: ip-172-30-0-197: ip-172-30-0-197: Name or service not known
        at java.net.InetAddress.getLocalHost(InetAddress.java:1473) ~[na:1.7.0_75]
        at net.sf.ehcache.Cache.<clinit>(Cache.java:214) ~[net.sf.ehcache.ehcache-core-2.6.8.jar:na]
        at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:296) [net.sf.ehcache.ehcache-core-2.6.8.jar:na]

你能帮我弄清楚为什么会这样吗? 应用程序托管在Amazon EC2 Linux实例上。

1 个答案:

答案 0 :(得分:0)

正如@Ryan建议的问题是我的linux盒子的主机名没有映射到etc / hosts中。 问题解决了。

相关问题