dimanche 14 juin 2015

"client not initialized" error when using SSMCache with AWS elasticache autodiscovery

I am using Spring cache with AWS elasticache provider. I get this warning:

WARN c.g.code.ssm.spring.SSMCache - An error has occurred for cache defaultCache and key 

java.lang.IllegalStateException: Client is not initialized
    at net.spy.memcached.MemcachedClient.checkState(MemcachedClient.java:1623) ~[elasticache-java-cluster-client.jar:na]
    at net.spy.memcached.MemcachedClient.enqueueOperation(MemcachedClient.java:1617) ~[elasticache-java-cluster-client.jar:na]
    at net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:1013) ~[elasticache-java-cluster-client.jar:na]
    at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1235) ~[elasticache-java-cluster-client.jar:na]
    at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1256) ~[elasticache-java-cluster-client.jar:na]
    at com.google.code.ssm.providers.elasticache.MemcacheClientWrapper.get(MemcacheClientWrapper.java:147) ~[aws-elasticache-provider.jar:na]
    at com.google.code.ssm.CacheImpl.get(CacheImpl.java:271) ~[simple-spring-memcached.jar:na]
    at com.google.code.ssm.CacheImpl.get(CacheImpl.java:106) ~[simple-spring-memcached.jar:na]
    at com.google.code.ssm.spring.SSMCache.getValue(SSMCache.java:226) [spring-cache.jar:na]
    at com.google.code.ssm.spring.SSMCache.get(SSMCache.java:100) [spring-cache.jar:na]

I am using the same memcache without spring cache and it works fine. I get this error only when I use spring cache.

I have verified that the security groups has the Inbound port specified and I am running my code on EC2.




Aucun commentaire:

Enregistrer un commentaire