Error

While trying to setup Azure Cache for Redis as spring session store, I encountered following exception: .JedisDataException: ERR unknown command CONFIG, with args beginning with: get, notify-keyspace-events": 1,

Fix

Found the solution in spring-session-gh-issue

  • Kotlin
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    @Configuration
    class HttpSessionConfig() {
        companion object {
            // another solution could be to enable notify-keyspace-events for redis
            @Bean
            fun configureRedisAction(): ConfigureRedisAction {
                return ConfigureRedisAction.NO_OP
            }
        }
    }
    
  • Java
    1
    2
    3
    4
    5
    6
    7
    8
    
    @Configuration
    class HttpSessionConfig() {
        // another solution could be to enable notify-keyspace-events for redis
        @Bean
        public static ConfigureRedisAction configureRedisAction() {
            return ConfigureRedisAction.NO_OP;
        }
    }