Help Center/ Distributed Cache Service/ User Guide (Ankara Region)/ FAQs/ Client and Network Connection/ What If "ERR Unsupported CONFIG subcommand" is Displayed in SpringCloud?
Updated on 2024-11-26 GMT+08:00

What If "ERR Unsupported CONFIG subcommand" is Displayed in SpringCloud?

By using DCS Redis instances, Spring Session can implement session sharing. When interconnecting with Spring Cloud, the following error information is displayed:

Figure 1 Spring Cloud error information

For security purposes, DCS does not support the CONFIG command initiated by a client. You need to perform the following steps:

  1. On the DCS console, set the value of the notify-keyspace-event parameter to Egx for a DCS Redis instance.
  2. Add the following content to the XML configuration file of the Spring framework:

    <util:constant

    static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/>

  3. Modify the related Spring code. Enable the ConfigureRedisAction.NO_OP bean component to forbid a client to invoke the CONFIG command.
    @Bean
    public static ConfigureRedisAction configureRedisAction() {
        return ConfigureRedisAction.NO_OP;
    }

For more information, see the Spring Session Documentation.

Session sharing is supported by single-node and master/standby DCS Redis instances, but not by cluster DCS Redis instances.