- [*] 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
```

if (CollectionUtils.isNotEmpty(serviceNames)) {
            String serviceNamesKey = toStringKeys(serviceNames);
            ServiceInstancesChangedListener instancesChangedListener = serviceListeners.get(serviceNamesKey);
            if (instancesChangedListener != null) {
                instancesChangedListener.removeListener(protocolServiceKey, listener);
                if (!instancesChangedListener.hasListeners()) {
                    serviceListeners.remove(serviceNamesKey);
                }
            }
        }
    }
    @Override
    public List<URL> lookup(URL url) {
        throw new UnsupportedOperationException("");
    }
    @Override
    public URL getUrl() {
        return registryURL;
    }
    @Override
    public boolean isAvailable() {
        return !serviceDiscovery.isDestroy() && !serviceDiscovery.getServices().isEmpty();
    }
    @Override
    public void destroy() {
        registryManager.removeDestroyedRegistry(this);
        
        execute(serviceDiscovery::destroy);
    }
    protected void subscribeURLs(URL url, NotifyListener listener, Set<String> serviceNames) {