下面是当我使用 Ehcache 2 在 AWS lambda 中缓存 Java 代码中的变量之一时出现的错误。EhCache 是否在无服务器 Aws Lambda 上运行?
ERROR Unable to set localhost. This prevents creation of a GUID. Cause was: ip-10-22-209-10: ip-10-22-209-10: Name or service not known (net.sf.ehcache.Cache:224)
java.net.UnknownHostException: ip-10-22-209-10: ip-10-22-209-10: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at net.sf.ehcache.Cache.<clinit>(Cache.java:222)
at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:305)
at net.sf.ehcache.config.ConfigurationHelper.createCaches(ConfigurationHelper.java:238)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:816)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:498)
at net.sf.ehcache.CacheManager.init(CacheManager.java:394)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:269)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1103)
at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:879)
at net.sf.ehcache.CacheManager.create(CacheManager.java:860)
at net.sf.ehcache.CacheManager.getInstance(CacheManager.java:894)
at com.capitalone.stsedh.datawise.engine.lite.core.service.RuleExecutionServiceImpl.<init>(RuleExecutionServiceImpl.java:50)