Issue 1:
Recently, we keep receiving issues from the community reporting duplicate URL addresses in Registry, mostly zookeeper, after upgrading to 2.7.1. Those URLs are all pushed to the Consumer and because only one of the duplicated URLs is valid, it causes the consumer to fail when the consumer chooses the invalid one during load balance.

The following are some typical issues: #3785 #3770 #3920 #4013

After troubleshooting, we found the reason for the problem: in version 2.7.1, the URL addresses will be registered as a persistent node in zookeeper, which is different from the behavior in 2.7.0 or before, in which they are registered as ephemeral nodes. The meaning of the ephemeral node is that it will get removed from zookeeper when the server process went for a while. Now, after changed to persistent, the node cannot be removed in some exceptional scenarios, such as process crashed, process forced killed with kill -9, etc, eventually leading to the appearance of dirty data.

Advices to solve or avoid the problem:

Never forcibly terminating the process to ensure that Dubbo enters it's elegant shutdown process.

Wait for 2.7.2 to fix this issue, going to be released in early June.

For dirty data that has already been generated, consider manual or ZK scripts to clean up, but be careful of the deletion criteria.

Add the following configuration for 2.7.1: <dubbo:provider dynamic="true"/> or <dubbo:service dynamic="true"/>

近期，关于升级到2.7.1版本后注册中心（多数是zookeeper）出现重复URL地址数据无法删除的情况，我们持续收到来自社区的issue报告。以下issue是几个典型的异常现象：#3785 #3770 #3920 #4013

经过问题排查我们定位到了问题的原因：在2.7.1版本中URL地址在zookeeper中被注册为持久persistent节点(2.7.0及之前注册的是临时emperal节点)，这样当server进程异常终止无法进入正常优雅下线流程时，如进程崩溃、强行kill -9等，导致zookeeper已失效持久节点无法清空，最终导致脏数据的出现。

解决及规避方法：

上下线过程避免强行终止进程，保证让Dubbo进入优雅停机流程

官方2.7.2版本将会修复此问题，预计在6月初发布

对于已经产生的脏数据，考虑手动或ZK脚本予以清理，但此时要注意严格控制删选条件

2.7.1版本增加配置：<dubbo:provider dynamic="true"/> 或<dubbo:service dynamic="true"/>

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.6 -> 2.7.0

Operating System version: mac

Java version: 1.8

Steps to reproduce this issue

start provider and consumer with dubbo version 2.6.6, consumer can connect to provider

just change the dubbo version in pom from 2.6.6 to 2.7.0, and then an exception occur

the provider code is

@Override
public String sayHello(String name) {
System.out.println("[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "] Hello " + name + ", request from consumer: " + RpcContext.getContext().getRemoteAddress());
return "Hello " + name + ", response from provider: " + RpcContext.getContext().getLocalAddress();
}

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

i can update the dubbo version without change any code.

Actual Result

an exception occurs, and the exception is bellow:

26/03/19 06:27:23:023 CST] DubboServerHandler-10.99.62.72:20880-thread-200 ERROR filter.ExceptionFilter: [DUBBO] Got unchecked and undeclared exception which called by 10.99.62.72. service: com.test.dubbo.DemoService, method: sayHello, exception: java.lang.NoSuchMethodError: com.alibaba.dubbo.rpc.RpcContext.getContext()Lcom/alibaba/dubbo/rpc/RpcContext;, dubbo version: 2.7.0, current host: 10.99.62.72
java.lang.NoSuchMethodError: com.alibaba.dubbo.rpc.RpcContext.getContext()Lcom/alibaba/dubbo/rpc/RpcContext;
at com.test.dubbo.DemoServiceImpl.sayHello(DemoServiceImpl.java:31)
at org.apache.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java)
at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:86)
at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:56)
at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:63)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:88)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:79)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:78)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:138)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:39)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:108)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103)
at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200)
at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)