Ashwin Sreekumar
Ashwin Sreekumar

Reputation: 151

Java Redisson client error : bad argument #2 to 'unpack' (data string too short)

I am unable to read redis using redisson. It keeps on giving this error,

Execution exception[[RedisException: ERR Error running script (call to f_7b48e722af8a55315c5dd6c1028bf4652ad35c66):
@user_script:1: user_script:1: bad argument #2 to 'unpack' (data string too short). channel: [id: 0xdf273186, L:/127.0.0.1:62712 - R:/127.0.0.1:6379] 
command: (EVAL), params: [local s = redis.call('hgetall', KEYS[1]); local result = {}; local maxSize = tonumber(redis.call('hg..., 5, ALLUS_XXX, 
redisson__timeout__set:{ALLUS_XXX}, redisson__idle__set:{ALLUS_XXX}, redisson__map_cache__last_access__set:{ALLUS_XXX}, {ALLUS_XXX}:redisson_options, 1637953536277]]]

I am able to set and get values using the redisson framework. But when I set using the cli like

HMSET ALLUS_XXX 1 "{\"ev\":\"Q\",\"sym\":\"XXX\",\"bx\":\"1\",\"ax\":\"20\",\"bp\":157.2,\"ap\":157.21,\"bs\":5,\"as\":1,\"t\":\"1637949207844\",\"q\":\"60303179\",\"z\":3}"

and now try to retrieve using code , getMapCache("ALLUS_XXX").readAllEntrySet() It throws the above error.

Upvotes: 1

Views: 2586

Answers (1)

Ashwin Sreekumar
Ashwin Sreekumar

Reputation: 151

Linking the github issue with the answer https://github.com/redisson/redisson/issues/3989

basically, we can use client.getMap(key, StringCodec.INSTANCE).readAllEntrySet

Upvotes: 1

Related Questions