I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository. There is a similar issue #10198. I did as the issue described, but still failed.

### Environment

* Dubbo version: branch 3.1
* Operating System version: win7
* Java version: 11

### Steps to reproduce this issue

1. modify the dubbo.properties in [dubbo-demo-xml-provider](https://github.com/apache/dubbo/tree/3.1/dubbo-demo/dubbo-demo-xml/dubbo-demo-xml-provider)
`dubbo.application.qos-enable=true`
`dubbo.application.qos-port=33333`
`dubbo.application.qos-accept-foreign-ip=true`
2. run dubbo-demo-xml-provider

### Expected Behavior

`telnet {ip} 33333` will connect to QoS server successfully.

### Actual Behavior

![1664249369632](https://user-images.githubusercontent.com/55968645/192425286-b545f34c-92f5-4842-ac82-ffe62281ef79.png)

There is no exception. Provider is successfully started and running.

}
    private static List<URL> genCompatibleRegistries(ScopeModel scopeModel, List<URL> registryList, boolean provider) {
        List<URL> result = new ArrayList<>(registryList.size());
        registryList.forEach(registryURL -> {
            if (provider) {
                
                String registerMode;
                if (SERVICE_REGISTRY_PROTOCOL.equals(registryURL.getProtocol())) {
                    registerMode = registryURL.getParameter(REGISTER_MODE_KEY, ConfigurationUtils.getCachedDynamicProperty(scopeModel, DUBBO_REGISTER_MODE_DEFAULT_KEY, DEFAULT_REGISTER_MODE_INSTANCE));
                    if (!isValidRegisterMode(registerMode)) {
                        registerMode = DEFAULT_REGISTER_MODE_INSTANCE;
                    }
                    result.add(registryURL);
                    if (DEFAULT_REGISTER_MODE_ALL.equalsIgnoreCase(registerMode)
                        && registryNotExists(registryURL, registryList, REGISTRY_PROTOCOL)) {
                        URL interfaceCompatibleRegistryURL = URLBuilder.from(registryURL)
                            .setProtocol(REGISTRY_PROTOCOL)
                            .removeParameter(REGISTRY_TYPE_KEY)
                            .build();
                        result.add(interfaceCompatibleRegistryURL);
                    }
                } else {
                    registerMode = registryURL.getParameter(REGISTER_MODE_KEY, ConfigurationUtils.getCachedDynamicProperty(scopeModel, DUBBO_REGISTER_MODE_DEFAULT_KEY, DEFAULT_REGISTER_MODE_ALL));
                    if (!isValidRegisterMode(registerMode)) {
                        registerMode = DEFAULT_REGISTER_MODE_INTERFACE;
                    }
                    if ((DEFAULT_REGISTER_MODE_INSTANCE.equalsIgnoreCase(registerMode) || DEFAULT_REGISTER_MODE_ALL.equalsIgnoreCase(registerMode))
                        && registryNotExists(registryURL, registryList, SERVICE_REGISTRY_PROTOCOL)) {
                        URL serviceDiscoveryRegistryURL = URLBuilder.from(registryURL)
                            .setProtocol(SERVICE_REGISTRY_PROTOCOL)