<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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"> 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.5</li>
<li>Operating System version: Mac OS</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>部署一个机遇tomcat容器的rest的provider，同时开启monitor</li>
<li>使用客服端访问若干次</li>
<li>发现服务端统计的次数要少一次</li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？<br>
客服端和服务端的调用次数相同</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?<br>
服务端少一次</p>
<p dir="auto">我debug发现在服务端第一次接受请求的时候才初始化monitorFilter，然后通过org.apache.dubbo.monitor.support.AbstractMonitorFactory来创建monitor，然后走了异步的future，导致第一次的monitor为空，就没有进行统计。</p>
<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.1-SNAPSHOT</li>
<li>Operating System version: Mac OS 10.14.3</li>
<li>Java version: Java 11</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>use etcd as config center, or choose other config center implementation</li>
<li>Add a new configurator config to etcd</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./etcdctl put /dubbo/config/org.apache.dubbo.demo.DemoService/configurators &quot;
---
configVersion: v2.7
scope: service
key: org.apache.dubbo.demo.DemoService
enabled: true
configs:
- addresses: [\&quot;0.0.0.0:20890\&quot;]
  side: provider
  parameters:
    timeout: 10000
...&quot;"><pre class="notranslate"><code class="notranslate">./etcdctl put /dubbo/config/org.apache.dubbo.demo.DemoService/configurators "
---
configVersion: v2.7
scope: service
key: org.apache.dubbo.demo.DemoService
enabled: true
configs:
- addresses: [\"0.0.0.0:20890\"]
  side: provider
  parameters:
    timeout: 10000
..."
</code></pre></div>
<ol start="3" dir="auto">
<li>start <code class="notranslate">org.apache.dubbo.demo.provider.Application</code></li>
</ol>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">No exception is thrown.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">Exception is thrown during startup:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IllegalStateException: error state, exporter should not be null
	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:518)
	at org.apache.dubbo.registry.integration.RegistryProtocol$ServiceConfigurationListener.notifyOverrides(RegistryProtocol.java:569)
	at org.apache.dubbo.registry.integration.AbstractConfiguratorListener.process(AbstractConfiguratorListener.java:71)
	at org.apache.dubbo.registry.integration.AbstractConfiguratorListener.initWith(AbstractConfiguratorListener.java:46)
	at org.apache.dubbo.registry.integration.RegistryProtocol$ServiceConfigurationListener.&lt;init&gt;(RegistryProtocol.java:560)
	at org.apache.dubbo.registry.integration.RegistryProtocol.overrideUrlWithConfig(RegistryProtocol.java:209)
	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:182)
	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:61)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:106)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:55)
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:562)
	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:415)
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:376)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:335)
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:319)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:113)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:59)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:27)"><pre class="notranslate"><code class="notranslate">java.lang.IllegalStateException: error state, exporter should not be null
	at org.apache.dubbo.registry.integration.RegistryProtocol$OverrideListener.doOverrideIfNecessary(RegistryProtocol.java:518)
	at org.apache.dubbo.registry.integration.RegistryProtocol$ServiceConfigurationListener.notifyOverrides(RegistryProtocol.java:569)
	at org.apache.dubbo.registry.integration.AbstractConfiguratorListener.process(AbstractConfiguratorListener.java:71)
	at org.apache.dubbo.registry.integration.AbstractConfiguratorListener.initWith(AbstractConfiguratorListener.java:46)
	at org.apache.dubbo.registry.integration.RegistryProtocol$ServiceConfigurationListener.&lt;init&gt;(RegistryProtocol.java:560)
	at org.apache.dubbo.registry.integration.RegistryProtocol.overrideUrlWithConfig(RegistryProtocol.java:209)
	at org.apache.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:182)
	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:61)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:106)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:55)
	at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
	at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:562)
	at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:415)
	at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:376)
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:335)
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:319)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:113)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:59)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
	at org.apache.dubbo.demo.provider.Application.main(Application.java:27)
</code></pre></div>