ehcachemulticastgroupaddress设置grails分布式缓存时出错

eivgtgni  于 2021-06-30  发布在  Java
关注(0)|答案(1)|浏览(404)

我正在测试grails ehcache插件的分布式缓存,尝试在不同的端口上运行同一应用程序的两个不同版本。
在buildconfig中,我有:

  1. plugins {
  2. // plugins for the build system only
  3. build ":tomcat:7.0.55"
  4. // plugins for the compile step
  5. compile ":cache-ehcache:1.0.4"
  6. // plugins needed at runtime but not for compilation
  7. runtime ":hibernate4:4.3.6.1"
  8. runtime ":database-migration:1.4.0"
  9. runtime ":jquery:1.11.1"
  10. }

应用程序将运行并正确缓存域对象。
当我将以下配置添加到config.groovy或cacheconfig.groovy(并通过grails.config.locations将其包括在内)时,会出现以下错误:

  1. Message: Could not create CacheManagerPeerProvider. Initial cause was ${ehcacheMulticastGroupAddress}
  2. Line | Method
  3. ->> 63 | createCachePeerProvider in net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory
  4. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  5. | 136 | createCachePeerProviders in net.sf.ehcache.config.ConfigurationHelper
  6. | 795 | configure . . . . . . . in net.sf.ehcache.CacheManager
  7. | 471 | doInit in ''
  8. | 395 | init . . . . . . . . . . in ''
  9. | 177 | rebuild in grails.plugin.cache.ehcache.GrailsEhCacheManagerFactoryBean$ReloadableCacheManager
  10. | 63 | reload . . . . . . . . . in grails.plugin.cache.ehcache.EhcacheConfigLoader
  11. | 42 | reload in grails.plugin.cache.ConfigLoader
  12. | 204 | reloadCaches . . . . . . in CacheGrailsPlugin
  13. | 161 | doCall in CacheGrailsPlugin$_closure3
  14. | 334 | innerRun . . . . . . . . in java.util.concurrent.FutureTask$Sync
  15. | 166 | run in java.util.concurrent.FutureTask
  16. | 1145 | runWorker . . . . . . . in java.util.concurrent.ThreadPoolExecutor
  17. | 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
  18. ^ 722 | run . . . . . . . . . . in java.lang.Thread
  19. Caused by UnknownHostException: ${ehcacheMulticastGroupAddress}
  20. ->> 894 | lookupAllHostAddr in java.net.InetAddress$1
  21. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  22. | 1286 | getAddressesFromNameService in java.net.InetAddress
  23. | 1239 | getAllByName0 . . . . . in ''
  24. | 1155 | getAllByName in ''
  25. | 1091 | getAllByName . . . . . . in ''
  26. | 1041 | getByName in ''
  27. | 113 | createAutomaticallyConfiguredCachePeerProvider in net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory
  28. | 61 | createCachePeerProvider in ''
  29. | 136 | createCachePeerProviders in net.sf.ehcache.config.ConfigurationHelper
  30. | 795 | configure in net.sf.ehcache.CacheManager
  31. | 471 | doInit . . . . . . . . . in ''
  32. | 395 | init in ''
  33. | 177 | rebuild . . . . . . . . in grails.plugin.cache.ehcache.GrailsEhCacheManagerFactoryBean$ReloadableCacheManager
  34. | 63 | reload in grails.plugin.cache.ehcache.EhcacheConfigLoader
  35. | 42 | reload . . . . . . . . . in grails.plugin.cache.ConfigLoader
  36. | 204 | reloadCaches in CacheGrailsPlugin
  37. | 161 | doCall . . . . . . . . . in CacheGrailsPlugin$_closure3
  38. | 334 | innerRun in java.util.concurrent.FutureTask$Sync
  39. | 166 | run . . . . . . . . . . in java.util.concurrent.FutureTask
  40. | 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
  41. | 615 | run . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
  42. ^ 722 | run in java.lang.Thread
wfsdck30

wfsdck301#

看起来您的ehcache配置有一个未解析的变量: ${ehcacheMulticastGroupAddress}

相关问题