Redis Extension Cast Error

Description

We are currently using Redis Extension ( redis.extension-2.9.0.4-BETA ) to manage the Session across multiple instances of Lucee.

After Redis failover, Lucee starts throwing errors and the only solution right now is to terminate the Lucee instance.

Heres the stack trace:

java.lang.ClassCastException: [B cannot be cast to java.lang.Long at redis.clients.jedis.Connection.getIntegerReply(Connection.java:265) at redis.clients.jedis.Jedis.expire(Jedis.java:315) at lucee.extension.io.cache.redis.AbstractRedisCache.put(AbstractRedisCache.java:131) at lucee.runtime.type.scope.storage.IKHandlerCache.store(IKHandlerCache.java:54) at lucee.runtime.type.scope.storage.IKStorageScopeSupport.store(IKStorageScopeSupport.java:415) at lucee.runtime.type.scope.storage.IKStorageScopeSupport.getInstance(IKStorageScopeSupport.java:198) at lucee.runtime.type.scope.ScopeContext.getCFSessionScope(ScopeContext.java:667) at lucee.runtime.type.scope.ScopeContext.getSessionScope(ScopeContext.java:505) at lucee.runtime.PageContextImpl.sessionScope(PageContextImpl.java:1389) at lucee.runtime.PageContextImpl.sessionScope(PageContextImpl.java:1383) at lucee.runtime.interpreter.VariableInterpreter.scope(VariableInterpreter.java:655) at lucee.runtime.interpreter.VariableInterpreter.getVariableEL(VariableInterpreter.java:221)

Reading a little bit online looks like its related to the re-use of a closed connection, but I can be wrong:
https://programmersought.com/article/8781708994/

Environment

None

Attachments

4
  • 25 Aug 2020, 01:37 pm
  • 25 Aug 2020, 01:37 pm
  • 21 Aug 2020, 08:58 am
  • 21 Aug 2020, 08:58 am

duplicates

Activity

Show:

Pothys - MitrahSoft 3 June 2024 at 11:59

Could you please try this with the latest Redis extension? And report me back here. It could be helpful to improve the ticket status.

Miguel Targa 3 September 2020 at 16:37

Yes, used in multiple instances.
And all use the same version.

Michael Offner 3 September 2020 at 16:32

is Redis used by multiple instances? if so are all using 2.9.0.10-RC?

Miguel Targa 25 August 2020 at 13:38

We are still having issues, here's the pool config:


Latest Stack trace

[B cannot be cast to java.lang.Long java.lang.ClassCastException: [B cannot be cast to java.lang.Long at redis.clients.jedis.Connection.getIntegerReply(Connection.java:265) at redis.clients.jedis.BinaryJedis.expire(BinaryJedis.java:436) at lucee.extension.io.cache.redis.AbstractRedisCache.put(AbstractRedisCache.java:133) at lucee.runtime.type.scope.storage.IKHandlerCache.store(IKHandlerCache.java:54) at lucee.runtime.type.scope.storage.IKStorageScopeSupport.store(IKStorageScopeSupport.java:415) at lucee.runtime.type.scope.storage.IKStorageScopeSupport.touchAfterRequest(IKStorageScopeSupport.java:295) at lucee.runtime.PageContextImpl.release(PageContextImpl.java:531) at lucee.runtime.CFMLFactoryImpl.releaseLuceePageContext(CFMLFactoryImpl.java:210) at lucee.runtime.CFMLFactoryImpl.releasePageContext(CFMLFactoryImpl.java:177) at lucee.runtime.concurrency.UDFCaller2.call(UDFCaller2.java:94) at lucee.runtime.concurrency.UDFCaller2.call(UDFCaller2.java:38) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

Michael Offner 21 August 2020 at 10:27

i have reviewed the extension code and the jedis code to better understand the problem and i have done some improvements with the following version.

That version make sure we have never 2 pools open and that we handle better exception while loading a connection.

https://ext.lucee.org/redis.extension-2.9.0.10-RC.lex

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 29 July 2020 at 14:32
Updated 3 June 2024 at 12:00

Flag notifications