<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.2</li>
<li>Operating System version: Mac Os</li>
<li>Java version: JDK 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Fix for PR: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="454652391" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/4276" data-hovercard-type="pull_request" data-hovercard-url="/apache/dubbo/pull/4276/hovercard" href="https://github.com/apache/dubbo/pull/4276">#4276</a></p>
<p dir="auto">Step 1: set executes to 1 in dubbo:service</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean id=&quot;demoService&quot; class=&quot;com.xxx.&quot;/&gt;
&lt;dubbo:service interface=&quot;com.xxx&quot; ref=&quot;demoService&quot; executes=&quot;1&quot;&gt;
&lt;/dubbo:service&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean id="demoService" class="com.xxx."/&gt;
&lt;dubbo:service interface="com.xxx" ref="demoService" executes="1"&gt;
&lt;/dubbo:service&gt;
</code></pre></div>
<p dir="auto">Step 2:<br>
Invoke service with two threads concurrent. The second one have been rate limited.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ExecutorService executorService = Executors.newFixedThreadPool(2);
for (int i = 0; i &lt; 2; i++) {
  executorService.submit(new Runnable() {
    @Override
    public void run() {
      String result = service.sayHello(input);
      System.out.println(result);
    }
  });
}"><pre class="notranslate"><code class="notranslate">ExecutorService executorService = Executors.newFixedThreadPool(2);
for (int i = 0; i &lt; 2; i++) {
  executorService.submit(new Runnable() {
    @Override
    public void run() {
      String result = service.sayHello(input);
      System.out.println(result);
    }
  });
}
</code></pre></div>
<p dir="auto">Step 3:<br>
Repeat step 2, all two requests have been passed.</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Step 3 should be rate limited.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">Step 3 have not been rate limited.</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.0</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    ReferenceConfig  referenceConfig = new ReferenceConfig();

    //application
    String appName = AppInfoUtils.getAppName();
    ApplicationConfig applicationConfig = new ApplicationConfig();
    applicationConfig.setName(appName);
    referenceConfig.setApplication(applicationConfig);

    //registry
    //zookeeper://127.0.0.1:2181
    referenceConfig.setRegistry(&quot;zookeeper://127.0.0.1:2181&quot;);
    ......"><pre class="notranslate"><code class="notranslate">    ReferenceConfig  referenceConfig = new ReferenceConfig();

    //application
    String appName = AppInfoUtils.getAppName();
    ApplicationConfig applicationConfig = new ApplicationConfig();
    applicationConfig.setName(appName);
    referenceConfig.setApplication(applicationConfig);

    //registry
    //zookeeper://127.0.0.1:2181
    referenceConfig.setRegistry("zookeeper://127.0.0.1:2181");
    ......
</code></pre></div>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">it can use zookeeper registry</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">it does't work</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: &lt;dubbo:registry zookeeperProtocol=&quot;false&quot; valid=&quot;false&quot; id=&quot;zookeeper://127.0.0.1:2181&quot; prefix=&quot;dubbo.registries.&quot; /&gt;

	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:129)
	at org.apache.dubbo.config.AbstractInterfaceConfig.loadRegistries(AbstractInterfaceConfig.java:198)
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:358)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:314)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232)"><pre class="notranslate"><code class="notranslate">java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: &lt;dubbo:registry zookeeperProtocol="false" valid="false" id="zookeeper://127.0.0.1:2181" prefix="dubbo.registries." /&gt;

	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:129)
	at org.apache.dubbo.config.AbstractInterfaceConfig.loadRegistries(AbstractInterfaceConfig.java:198)
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:358)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:314)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232)
</code></pre></div>