- [*] 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.0.2.1
* Operating System version: Ubuntu20
* Java version: 1.8

### Steps to reproduce this issue

1.  telnet localhost 22222
2. dubbo>ls service


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

### Expected Result
list services

### Actual Result

```
ls service :fail to execute commandContext by org.apache.dubbo.registry.client.ServiceDiscoveryRegistry cannot be cast to org.apache.dubbo.registry.support.AbstractRegistry
```

*
     * @param registryURL the {@link URL url} of registry
     * @return <code>null</code> if not supported
     */
    public static ServiceDiscoveryRegistry create(URL registryURL) {
        return supports(registryURL) ? new ServiceDiscoveryRegistry(registryURL) : null;
    }
    /**
     * Supports or not ?
     *
     * @param registryURL the {@link URL url} of registry
     * @return if supported, return <code>true</code>, or <code>false</code>
     */
    public static boolean supports(URL registryURL) {
        return SERVICE_REGISTRY_TYPE.equalsIgnoreCase(registryURL.getParameter(REGISTRY_TYPE_KEY));
    }
    private static boolean isCompatibleProtocol(String protocol, URL targetURL) {
        return protocol == null || Objects.equals(protocol, targetURL.getParameter(PROTOCOL_KEY))
            || Objects.equals(protocol, targetURL.getProtocol());
    }
    public Map<String, ServiceInstancesChangedListener> getServiceListeners() {
        return serviceListeners;
    }
    private class DefaultMappingListener implements MappingListener {
        private final Logger logger = LoggerFactory.getLogger(DefaultMappingListener.class);
        private URL url;
        private Set<String> oldApps;
        private NotifyListener listener;
        public DefaultMappingListener(URL subscribedURL, Set<String> serviceNames, NotifyListener listener) {
            this.url = subscribedURL;