0

The following comes from a Tomcat Server in AWS, where we have a Redis Elasticache instance setup:

redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'SAVE'
at redis.clients.jedis.Protocol.processError(Protocol.java:127)
at redis.clients.jedis.Protocol.process(Protocol.java:161)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239)
at redis.clients.jedis.BinaryJedis.save(BinaryJedis.java:2700)
at cl.waypoint.util.CacheReports.setCacheReports(CacheReports.java:51)
at cl.waypoint.reports3.ReportStatus.setProgress(ReportStatus.java:86)
at cl.waypoint.reports3.Report101.getData(Report101.java:210)
at cl.waypoint.reports3.Report101.createXLS(Report101.java:274)
at cl.waypoint.reports3.ReportStatus.run(ReportStatus.java:38)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Seems like Elasticache is missing support for such command, as Redis by itself does support it. Any ideas or workarounds would be appreciated

PS1: Jedis v2.9.0 and the Elasticache instance has Engine Version Compatibility: 3.2.4

PS2: I've just asked the same question to AWS support as sadly I've had no feedback at all here :(

Cœur
  • 37,241
  • 25
  • 195
  • 267
gvasquez
  • 1,919
  • 5
  • 27
  • 41

1 Answers1

-2

Have you looked at Redisson? Some Redis commands are not available in AWS Elasticache SAVE command is one of them. Here is full list of such commands. Despite of such limitations Redisson has solid integration with AWS Elasticache.

Here is an code example to use it with AWS Elasticache:

// 1. Create config object
Config config = new Config();
config.useReplicatedServers()
    .addNodeAddress("redis://first-node.aws.com:7000", "redis://second-node.aws.com:7001");

// 2. Create Redisson instance
RedissonClient redisson = Redisson.create(config);

// 3. Get object you need
RMap<MyKey, MyValue> map = redisson.getMap("myMap");

RLock lock = redisson.getLock("myLock");

RExecutorService executor = redisson.getExecutorService("myExecutorService");

// over 30 different objects and services are available...
Nikita Koksharov
  • 10,283
  • 1
  • 62
  • 71