-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service cannot registered, openAPI query result not consistent #1712
Comments
I found the answer on my IDE console: com.xxx.xxx.api.service.xxxService:1.0.0: in the last, it has the extra ":" it is the bug? |
I find the URLTest in dubbo project it looks like the extra ":" is expected
Who is responsible? nacos or nacos-sync? |
i search the answer in nacos-sync use nacos in the ZookeeperSyncToNacosServiceImpl#getServiceNameFromCache,the method is generate the service name the code display:
in the nacos-sync entity this is the answer (: i will give the but i think the “:” in the end is not pretty Thank you! |
We will go to repair the nacos - sync components problem |
// 这是 2.7.5
String parameterValue = this.getParameter(parameterName);
if (!StringUtils.isBlank(parameterValue)) {
if (!first) {
target.append(":");
}
target.append(parameterValue);
} else {
target.append(":");
} // 2.6.x
private String getServiceName(URL url, String category) {
StringBuilder serviceNameBuilder = new StringBuilder(category);
appendIfPresent(serviceNameBuilder, url, Constants.INTERFACE_KEY);
appendIfPresent(serviceNameBuilder, url, Constants.VERSION_KEY);
appendIfPresent(serviceNameBuilder, url, Constants.GROUP_KEY);
return serviceNameBuilder.toString();
}
private void appendIfPresent(StringBuilder target, URL url, String parameterName) {
String parameterValue = url.getParameter(parameterName);
if (!StringUtils.isBlank(parameterValue)) {
target.append(SERVICE_NAME_SEPARATOR).append(parameterValue);
}
} This is a Dubbo version issue, Without about a problem with Nacos Sync. I consider if there is a way to solve this problem. |
This issue has been resolved, you can use version 0.3.5 of Nacos Sync. |
hello ,
I use nacos-sync to sync zkRegister to nacoRsegister
when i sync one service , in the nacos op, it looks like right
but, when i use consumer, it can not find provider
i use openAPI try to solve question:
when i use this command, it looks like ok
bug when i use this command
hosts is empty。
Was the registration successful?
The text was updated successfully, but these errors were encountered: