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

Closed
beanww opened this issue Jan 10, 2025 · 1 comment
Closed

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

beanww opened this issue Jan 10, 2025 · 1 comment
Labels
area/Spring Cloud Related to Spring Cloud status/invalid This doesn't seem right

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
@KomachiSion
Copy link
Collaborator

multi active profiles is spring cloud/ spring boot feature, please submit to spring cloud alibaba community.

according to exception information, there are some configuration error for your application, which cause you app input an invalid dataid to nacos-client.

Also suggest you get more information logs and submit issue to spring cloud alibaba community.

@KomachiSion KomachiSion added status/invalid This doesn't seem right area/Spring Cloud Related to Spring Cloud labels Jan 13, 2025
@KomachiSion KomachiSion closed this as not planned Won't fix, can't repro, duplicate, stale Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Spring Cloud Related to Spring Cloud status/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants