forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
24 lines
3.4 KiB
HTML
24 lines
3.4 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><util:constant</p>
|
|
<p id="dcs-faq-0730009__en-us_topic_0152099099_p672110325">static-field="org.springframework.session.data.redis.config.ConfigureRedisAction.NO_OP"/></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.<p id="dcs-faq-0730009__en-us_topic_0152099099_p161361613726">@Bean</p>
|
|
<p id="dcs-faq-0730009__en-us_topic_0152099099_p1913611137218">public static ConfigureRedisAction configureRedisAction() {</p>
|
|
<p id="dcs-faq-0730009__en-us_topic_0152099099_p4136121312218">return ConfigureRedisAction.NO_OP;</p>
|
|
<p id="dcs-faq-0730009__en-us_topic_0152099099_p8136111317210">}</p>
|
|
</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 only by <strong id="dcs-faq-0730009__b1487021465913">single-node</strong> and <strong id="dcs-faq-0730009__b12870191425910">master/standby</strong> 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>
|
|
|