You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tried to create a service with labelSelector but got this:
ErrCode:400, ErrMsg:failed to req API:/api//nacos/v1/ns/service after all servers([127.0.0.1:8848]) tried: caused: specified service already exists, serviceName : DEFAULT_GROUP@@cross-site-server;
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:490)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:395)
at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:391)
at com.alibaba.nacos.client.naming.net.NamingProxy.createService(NamingProxy.java:276)
at com.alibaba.nacos.client.naming.NacosNamingMaintainService.createService(NacosNamingMaintainService.java:133)
at com.alibaba.nacos.client.naming.NacosNamingMaintainService.createService(NacosNamingMaintainService.java:128)
at com.alibaba.nacos.spring.factory.DelegatingNamingMaintainService.createService(DelegatingNamingMaintainService.java:89)
...
Describe the bug
I tried to create a service with labelSelector but got this:
My code is as below:
Expected behavior
Service created successfully.
Acutally behavior
Fail to create the service.
How to Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
FYI, here's another way to see a related error on the console:
I try to locate the error and find this:
nacos/naming/src/main/java/com/alibaba/nacos/naming/selector/LabelSelector.java
Lines 170 to 176 in 7fd4d9a
nacos/naming/src/main/java/com/alibaba/nacos/naming/selector/LabelSelector.java
Lines 247 to 267 in 7fd4d9a
第一段代码在172行调用了一次checkInnerSyntax方法,并且给形参start赋了0值。而在checkInnerSyntax方法中,第265行,这里用了一个index++来作为索引。结合前后代码,我推测这里或许是想表达“
确认下一个元素是否在SUPPORTED_INNER_CONNCETORS
”中这样一个逻辑,但却错误地使用了index++
,导致了错误的出现。The text was updated successfully, but these errors were encountered: