The Wayback Machine - http://web.archive.org/web/20200829030918/https://github.com/alibaba/nacos/issues/2555
Skip to content
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

nacos 1.2.0. dom name can only have these characters: 0-9a-zA-Z-._ #2555

Open
DHBin opened this issue Mar 31, 2020 · 4 comments
Open

nacos 1.2.0. dom name can only have these characters: 0-9a-zA-Z-._ #2555

DHBin opened this issue Mar 31, 2020 · 4 comments

Comments

@DHBin
Copy link

@DHBin DHBin commented Mar 31, 2020

Issue Description

Type: bug report

Describe what happened

java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance/beat after all servers([minion-register:8848]) tried: failed to req API:minion-register:8848/nacos/v1/ns/instance/beat. code:400 msg: java.lang.IllegalArgumentException: dom name can only have these characters: 0-9a-zA-Z-._:, current: DEFAULT_GROUP@@consumers:cn.dhbin.minion.core.dubbo.web.service.RequestMappingService:1.0.0:*
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:467)
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:389)
	at com.alibaba.nacos.client.naming.net.NamingProxy.sendBeat(NamingProxy.java:312)
	at com.alibaba.nacos.client.naming.beat.BeatReactor$BeatTask.run(BeatReactor.java:98)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

Describe what you expected to happen

dubbo uses nacos as a registry,configure merge all groups,like this:

<dubbo:reference interface="com.xxx.MenuService" group="*" merger="true" />

nacos will throw out IllegalArgumentException: dom name can only have these characters: 0-9a-zA-Z-._

Tell us your environment

  • Spring boot 2.2.5
  • nacos 1.2.0

Anything else we need to know?

dubbo Group Merger doc : http://dubbo.apache.org/en-us/docs/user/demos/group-merger.html

@wolfgangzhu
Copy link
Contributor

@wolfgangzhu wolfgangzhu commented Apr 2, 2020

Reason Description
When using nacos as dubbo's registry center, dubbo-registry-nacos module will contact following part as nacos' serviceName: providers/consumers:serviceName::group

In dubbo, the group name will be validated by this pattern"[*,\\-._0-9a-zA-Z]+"
In nacos, service name can only have these characters: 0-9a-zA-Z-._, which validated by this pattern "[0-9a-zA-Z@\\.:_-]+", * is not in the pattern, so , exception happens.

Solution
Fix nacos' service-name-validation pattern
but i have a question, i don't know whether adding * to the nacos' service name will cause other problem or violate the design of nacos naming service.

Or

Fix Dubbo's dubbo-registry-nacos module, when group is "*", using "consumers/providers:serviceName::" as nacos' service name, not add * in the end.

if the solution is in the right position, i will fix it.
@i will solve it@

@chuntaojun
Copy link
Collaborator

@chuntaojun chuntaojun commented Apr 2, 2020

This should be discussed

@chuntaojun
Copy link
Collaborator

@chuntaojun chuntaojun commented Apr 2, 2020

@mercyblitz @nkorange What do you think

@richard1230
Copy link

@richard1230 richard1230 commented Aug 23, 2020

@DHBin Could you please provide more detailed steps to reproduce the issue??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.