- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 3.x
* Operating System version: Ubuntu 18.04.5
* Java version: 11
* nacos version: 1.4.2

### Steps to reproduce this issue

1. provider配置
```
dubbo:
  application:
    metadata-type: remote
    register-mode: instance
  registry:
    address: nacos://${nacos.host}:${nacos.port}
  protocol:
    name: tri
    serialization: protobuf
```
2. consumer配置
```
dubbo:
  application:
    metadata-type: remote
    service-discovery:
      migration: APPLICATION_FIRST
  registry:
    address: nacos://${nacos.host}:${nacos.port}
#    ?registry-type=${nacos.registry-type}
  protocol:
    name: tri
    serialization: protobuf
```

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

### Expected Result

![image](https://user-images.githubusercontent.com/50915608/130789754-e2940dd9-1e08-43b6-b67e-aef4d3f77426.png)


### Actual Result

![image](https://user-images.githubusercontent.com/50915608/130886455-753a9d8f-fe18-48ac-8bd1-9da7376dcd41.png)


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

java.lang.IllegalStateException: Failed to check the status of the service service.HelloService. No provider available for the service service.HelloService from the url dubbo://

}
        WritableMetadataService writableMetadataService = WritableMetadataService.getDefaultExtension(serviceInstance.getApplicationModel());
        String host = null;
        int port = -1;
        Set<URL> urls = writableMetadataService.getExportedServiceURLs();
        if (CollectionUtils.isNotEmpty(urls)) {
            ApplicationModel applicationModel = serviceInstance.getApplicationModel();
            String preferredProtocol = applicationModel.getCurrentConfig().getProtocol();
            if (preferredProtocol != null) {
                for (URL exportedURL : urls) {
                    if (preferredProtocol.equals(exportedURL.getProtocol())) {
                        host = exportedURL.getHost();
                        port = exportedURL.getPort();
                        break;
                    }
                }
            } else {
                URL url = urls.iterator().next();
                host = url.getHost();
                port = url.getPort();
            }
            if (serviceInstance instanceof DefaultServiceInstance) {
                DefaultServiceInstance instance = (DefaultServiceInstance) serviceInstance;
                instance.setHost(host);
                instance.setPort(port);
            }
        }
    }
}