We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v2.2.5
v2.1.2
go version
v1.21.4
windows10 20H2 (19042.1706)
..... &constant.ClientConfig{ TimeoutMs: 0, NamespaceId: "", Username: "user", Password: "passwd", NotLoadCacheAtStart: true, LogLevel: "info", } ...... ok, err := n.namingClient.RegisterInstance( vo.RegisterInstanceParam{ ServiceName: serviceInfo.ServiceName, Ip: "172.19.0.1", Port: 8080, Weight: 0, Enable: true, Healthy: true, Ephemeral: true, ClusterName: "", GroupName: "customGroup", }, )
clientConfig和vo.RegisterInstanceParam配置如上,返回值err=nil,ok=false,追进去返回值如图(确信账号和密码没问题):
如果其他配置信息都不动,只把Ephemeral改为false,服务注册就没问题了,Ephemeral设成true,就会报图片中的授权错误。
ok=true, err=nil
The text was updated successfully, but these errors were encountered:
认证失败了,可以看下服务端日志,追查下详细信息
Sorry, something went wrong.
可以重现了,如果使用创建的用户(即非nacos超级用户),授予rw权限,往命名空间public(即namespaceId="")里注册 Ephemeral为 true的服务,就会失败;如果是单独创建一个命名空间,不使用默认的public,就可以注册成功。而超级用户nacos,注册都会成功。有空可以试一下,应该是个bug。
No branches or pull requests
What version of nacos-sdk-go are you using?
v2.2.5
What version of nacos-sever are you using?
v2.1.2
What version of Go are you using (
go version
)?v1.21.4
What operating system (Linux, Windows, …) and version?
windows10 20H2 (19042.1706)
What did you do?
.....
&constant.ClientConfig{
TimeoutMs: 0,
NamespaceId: "",
Username: "user",
Password: "passwd",
NotLoadCacheAtStart: true,
LogLevel: "info",
}
......
ok, err := n.namingClient.RegisterInstance(
vo.RegisterInstanceParam{
ServiceName: serviceInfo.ServiceName,
Ip: "172.19.0.1",
Port: 8080,
Weight: 0,
Enable: true,
Healthy: true,
Ephemeral: true,
ClusterName: "",
GroupName: "customGroup",
},
)
clientConfig和vo.RegisterInstanceParam配置如上,返回值err=nil,ok=false,追进去返回值如图(确信账号和密码没问题):
如果其他配置信息都不动,只把Ephemeral改为false,服务注册就没问题了,Ephemeral设成true,就会报图片中的授权错误。
What did you expect to see?
ok=true, err=nil
The text was updated successfully, but these errors were encountered: