Files
doc-exports/docs/dcs/umn/dcs-faq-0730009.html
chenjunjie ab5f2db011 DCS UMN 20240705 version
Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com>
Co-authored-by: chenjunjie <chenjunjie@huawei.com>
Co-committed-by: chenjunjie <chenjunjie@huawei.com>
2025-02-26 10:24:22 +00:00

24 lines
3.1 KiB
HTML

<a name="dcs-faq-0730009"></a><a name="dcs-faq-0730009"></a>
<h1 class="topictitle1">What If "ERR Unsupported CONFIG subcommand" is Displayed in SpringCloud?</h1>
<div id="body1596093268949"><p id="dcs-faq-0730009__en-us_topic_0152099099_p11422113014583">By using DCS Redis instances, <span class="keyword" id="dcs-faq-0730009__keyword75301593585">Spring Session can implement session sharing</span>. When interconnecting with Spring Cloud, the following error information is displayed:</p>
<div class="fignone" id="dcs-faq-0730009__en-us_topic_0152099099_fig1775053516012"><span class="figcap"><b>Figure 1 </b>Spring Cloud error information</span><br><span><img id="dcs-faq-0730009__en-us_topic_0152099099_image20258254115810" src="en-us_image_0266315619.png"></span></div>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p3701016105918">For security purposes, DCS does not support the <strong id="dcs-faq-0730009__b28725425920">CONFIG</strong> command initiated by a client. You need to perform the following steps:</p>
<ol id="dcs-faq-0730009__en-us_topic_0152099099_ol82491552120"><li id="dcs-faq-0730009__en-us_topic_0152099099_li32480551812">On the DCS console, set the value of the <strong id="dcs-faq-0730009__b7186568598">notify-keyspace-event</strong> parameter to <strong id="dcs-faq-0730009__b17186196125917">Egx</strong> for a DCS Redis instance.</li><li id="dcs-faq-0730009__en-us_topic_0152099099_li924845512118">Add the following content to the XML configuration file of the Spring framework:<p id="dcs-faq-0730009__en-us_topic_0152099099_p2097611571110"><a name="dcs-faq-0730009__en-us_topic_0152099099_li924845512118"></a><a name="en-us_topic_0152099099_li924845512118"></a>&lt;util:constant</p>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p672110325">static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/&gt;</p>
</li><li id="dcs-faq-0730009__en-us_topic_0152099099_li182493557111">Modify the related Spring code. Enable the <strong id="dcs-faq-0730009__b3571493597">ConfigureRedisAction.NO_OP</strong> bean component to forbid a client to invoke the <strong id="dcs-faq-0730009__b195816965917">CONFIG</strong> command.<pre class="screen" id="dcs-faq-0730009__screen12275192515303">@Bean
public static ConfigureRedisAction configureRedisAction() {
return ConfigureRedisAction.NO_OP;
}</pre>
</li></ol>
<p id="dcs-faq-0730009__en-us_topic_0152099099_p319234318111">For more information, see the <a href="https://docs.spring.io/spring-session/docs/current/api/" target="_blank" rel="noopener noreferrer">Spring Session Documentation</a>.</p>
<div class="notice" id="dcs-faq-0730009__en-us_topic_0152099099_note139026388342"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dcs-faq-0730009__en-us_topic_0152099099_p990233883412">Session sharing is supported by single-node, read/write splitting, and master/standby DCS Redis instances, but not by cluster DCS Redis instances.</p>
</div></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326020.html">Client and Network Connection</a></div>
</div>
</div>