On this page

Show all

Help Center/ Distributed Cache Service/ FAQs/ Client and Network Connection/ What If "ERR Unsupported CONFIG subcommand" is Displayed in SpringCloud?

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

Updated on 2024-12-11 GMT+08:00

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.

NOTICE:

Single-node, master/standby, and read/write splitting DCS Redis instances support spring session sharing, but cluster ones do not support.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback