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

When using multi active profiles, NacosException: dataId invalid #13030

Open
beanww opened this issue Jan 10, 2025 · 0 comments
Open

When using multi active profiles, NacosException: dataId invalid #13030

beanww opened this issue Jan 10, 2025 · 0 comments

Comments

@beanww
Copy link

beanww commented Jan 10, 2025

Describe the bug
When using multi active profiles and starting springcloud, nacos throws Exception like below
for ',' is not valid char, but we need active multi profile like local,postgres etc..

invalid dataId:
dataId='service-local,postgres.yaml'

Expected behavior
No exception is throwed

Actually behavior
Error getting properties from nacos: NacosConfigDataResource{properties=NacosConfigProperties{serverAddr='null', encode='null', group='DEFAULT_GROUP', prefix='null', fileExtension='properties', timeout=3000, maxRetry='null', configLongPollTimeout='null', configRetryTime='null', enableRemoteSyncConfig=false, endpoint='null', namespace='null', accessKey='null', secretKey='null', ramRoleName='null', contextPath='null', clusterName='null', name='null'', shares=null, extensions=null, refreshEnabled=true}, optional=true, profiles=[Profiles@45673f68 active = '[local, postgres]', default = '[default]', accepted = '[local, postgres]'], config=NacosItemConfig{group='DEFAULT_GROUP', dataId='service-local,postgres.yaml', suffix='yaml', refreshEnabled=true, preference=null}}

com.alibaba.nacos.api.exception.NacosException: dataId invalid
at com.alibaba.nacos.client.config.utils.ParamUtils.checkKeyParam(ParamUtils.java:102) ~[nacos-client-2.4.2.jar:na]

How to Reproduce
Steps to reproduce the behavior:

active multi profile when starting springcloud application, like local,postgres

Desktop (please complete the following information):

  • OS: win10
  • Version nacos-client 2.3.2
  • Module config
  • SDK spring-cloud-alibaba-nacos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant