nacos作为配置中心,jar包部署服务,ide可以找到配置,jar包运行找不到,报错如下,怎么办?


APPLICATION FAILED TO START


Description:

Config data resource 'NacosConfigDataResource{properties=NacosConfigProperties{serverAddr='192.168.23.1:8848', encode='null', group='DEFAULT_GROUP', prefix='null', fileExtension='properties', timeout=5000, maxRetry='3', configLongPollTimeout='10000', configRetryTime='2000', enableRemoteSyncConfig=false, endpoint='null', namespace='421e99fc-7bcd-4003-bc48-bcfa20eac10f', accessKey='null', secretKey='null', ramRoleName='null', contextPath='null', clusterName='null', name='null'', shares=null, extensions=null, refreshEnabled=true}, optional=false, profiles=[Profiles@62150f9e active = '[]', default = '[default]', accepted = '[default]'], config=NacosItemConfig{group='DEFAULT_GROUP', dataId='CS-Base-Auth001.yaml', suffix='yaml', refreshEnabled=true, preference=null}}' via location 'nacos:CS-Base-Auth001.yaml' does not exist

Action:

Check that the value 'nacos:CS-Base-Auth001.yaml' at URL [file:application.yml] - 25:9 is correct, or prefix it with 'optional:'

15:59:49.547 [Thread-1] WARN com.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] Start destroying common HttpClient
15:59:49.547 [Thread-6] WARN com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Start destroying Publisher
15:59:49.547 [Thread-6] WARN com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Destruction of the end
15:59:49.547 [Thread-1] WARN com.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] Destruction of the end

展开
收起
游客75ujd4q2il6ea 2024-12-25 16:13:01 270 发布于广东 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 请确保您的NACOS_ADDRESS和DATA_ID等环境变量在JAR包运行时正确配置,并且与IDE中设置一致,可参考阿里云官方文档:https://help.aliyun.com/document_detail/100972.html。如果问题依旧,建议咨询一下阿里云的工作人员。如果对您有帮助的话,可以帮忙采纳一下。谢谢。

    2025-02-10 10:21:48 举报
    赞同 116 评论

    评论

    全部评论 (0)

    登录后可评论

为微服务建设降本增效,为微服务落地保驾护航。

还有其他疑问?
咨询AI助理
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等