2

I am using Play 2.3.7 and I recently started seeing this error when starting my application. I've been trying to write some tests using the FakeApplication class recently, but I'm not sure if that's what caused this:

[info] play - database [default] connected at jdbc:postgresql://localhost/gsn
[error] n.s.e.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known
java.net.UnknownHostException: MacBook-Pro.local: MacBook-Pro.local: nodename nor servname provided, or not known
    at java.net.InetAddress.getLocalHost(InetAddress.java:1473) ~[na:1.7.0_71]
    at net.sf.ehcache.Cache.<clinit>(Cache.java:214) ~[ehcache-core-2.6.8.jar:na]
    at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:296) [ehcache-core-2.6.8.jar:na]
    at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:219) [ehcache-core-2.6.8.jar:na]
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:722) [ehcache-core-2.6.8.jar:na]
Caused by: java.net.UnknownHostException: MacBook-Pro.local: nodename nor servname provided, or not known
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.7.0_71]
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) ~[na:1.7.0_71]
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) ~[na:1.7.0_71]
    at java.net.InetAddress.getLocalHost(InetAddress.java:1469) ~[na:1.7.0_71]
    at net.sf.ehcache.Cache.<clinit>(Cache.java:214) ~[ehcache-core-2.6.8.jar:na]
[info] play - Application started (Dev)

Maybe it is something related to the database connection, since it appears right when the initial connection is made? Interestingly, the application still seems to run fine after this.

Any help would be appreciated, thanks!

KJ50
  • 765
  • 1
  • 10
  • 27
  • I remember seeing something similar (although I think it was Play 1.x) when the hostname (in your case localhost) could not be resolved to the machine. I added a line to hosts and the error was gone. No idea how this works in a Mac, though. – Leonidas K Mar 01 '15 at 08:40
  • possible duplicate of [java Exception in thread "main" java.net.UnknownHostException: Test: Test: unknown error OS ubuntu](http://stackoverflow.com/questions/24612100/java-exception-in-thread-main-java-net-unknownhostexception-test-test-unkno) – Grzegorz Żur Sep 18 '15 at 14:45

0 Answers0