Issue 1:
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.7.5

Operating System version: Mac OS 10.15.2

Java version: 1.8.0_231

Steps to reproduce this issue

通过brew安装etcd

执行etcd命令，前台模式启动etcd

启动provider服务（grpc + etcd）

执行 etcdctl get / --prefix 命令，观察到etcd中有数据

等mac经过1轮休眠，再执行 etcdctl get / --prefix，发现数据为空

Expected Result

注册信息不应该自己丢失

即便注册信息丢失，也能在电脑唤醒后自己恢复

Actual Result

注册信息丢失

dubbo输出以下日志

2020-01-09 16:20:35.020 WARN 15182 --- [pool-6-thread-2] o.a.d.r.etcd.jetcd.JEtcdClientWrapper : [DUBBO] Failed to keep alive for global lease '7587843563781079999', waiting for retry again., dubbo version: 2.7.5, current host: ***

相关代码和配置

import io.grpc.stub.StreamObserver;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import testproto.DubboGreeterGrpc;
import testproto.HelloReply;
import testproto.HelloRequest;

import java.util.concurrent.*;

@Service(interfaceClass = DubboGreeterGrpc.IGreeter.class, version = "1.0.0")
public class GreeterServiceImpl extends DubboGreeterGrpc.GreeterImplBase {

@Override
public void sayHello(HelloRequest request, StreamObserver<HelloReply> responseObserver) {
try {
TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException ignored) {
}
responseObserver.onNext(HelloReply.newBuilder().setMessage("pong-java-" + System.currentTimeMillis()).build());
responseObserver.onCompleted();
}

}

spring.application.name=dubbo-provider
server.port=8080
dubbo.application.name=${spring.application.name}
dubbo.application.metadata=remote
dubbo.protocol.name=grpc
dubbo.protocol.port=8888
dubbo.registry.address=etcd3://127.0.0.1:2379?registry-type=service
dubbo.provider.threads=10
dubbo.provider.threadpool=fixed
dubbo.provider.loadbalance=roundrobin
dubbo.metadata-report.address=etcd://127.0.0.1:2379

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.7.4

Operating System version: win 10

Java version: jdk 8u22

Steps to reproduce this issue

dubbo 2.7.4 版本dubbo-demo 运行报错,无法初始化配置器

运行 dubbo-demo-api-provider,使用 zookeeper 3.5,已经确认zk 正常。

service.setRegistry(new RegistryConfig("zookeeper://192.168.1.203:2181"));

运行报错，错误位于 AbstractInterfaceConfig::useRegistryForConfigIfNecessary

的 628 行

cc.getParameters().put(org.apache.dubbo.remoting.Constants.CLIENT_KEY,rc.getClient());

提示 rc.getClient() 为空

使用 nacos 正常,修改代码，编译运行正常

service.setRegistry(new RegistryConfig("nacos://192.168.1.207:8848"));

dubbo-demo-xml-provider 也是相同的错误

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

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Exception in thread "main" java.lang.NullPointerException
at org.apache.dubbo.config.AbstractInterfaceConfig.lambda$null$7(AbstractInterfaceConfig.java:628)
at java.util.Optional.orElseGet(Optional.java:267)