报错信息:
ERROR org.apache.dubbo.metadata.report.support.AbstractMetadataReport.storeProviderMetadataTask(AbstractMetadataReport.java:289) [TID: N/A] -- [DUBBO] Failed to put provider metadata org.apache.dubbo.metadata.report.identifier.MetadataIdentifier@3e1e3807 in FullServiceDefinition{parameters=org.apache.dubbo.common.url.component.URLParam$URLParamMap@df7036ad} ServiceDefinition [canonicalName=com.XXX, codeSource=XXX-SNAPSHOT.jar, methods=[MethodDefinition [name=getServantDetails, parameterTypes=[java.lang.String], returnType=com.XXX]]], cause: Failed to put org.apache.dubbo.metadata.report.identifier.MetadataIdentifier@3e1e3807 to nacos {"parameters":{"side":"provider","interface":"com.XXX","pid":"10249","metadata-type":"remote","application":"XXX,"dubbo":"2.0.2","release":"3.0.8","anyhost":"true","methods":"getServantDetails","logger":"slf4j","deprecated":"false","service-name-mapping":"true","register-mode":"all","qos.enable":"false","generic":"false","bind.port":"31001","revision":"2.1.1-SNAPSHOT","bind.ip":"XX.XX.XXX.XX","background":"false","dynamic":"true","service.filter":"-exception","timestamp":"1655786998155"},"canonicalName":"com.XXX","codeSource":"XXX-SNAPSHOT.jar","methods":[{"name":"getServantDetails","parameterTypes":["java.lang.String"],"returnType":"com.XXX","annotations":[]}],"types":[{"type":"java.util.Date"},{"type":"com.XXX","properties":{"serviceType":"java.lang.String","dtEmployment":"java.util.Date","gender":"java.lang.String","description":"java.lang.String","dtEnter":"java.util.Date","userName":"java.lang.String","servantId":"java.lang.String","skilled":"java.lang.String","feeAmt":"java.lang.Integer","duration":"java.lang.Integer","serviceCount":"java.lang.Integer","dtUpdate":"java.util.Date","dtServiceTime":"java.util.Date","userTag":"java.lang.String","aptitude":"java.lang.String","shortDesc":"java.lang.String","iconUrl":"java.lang.String","dtCreate":"java.util.Date","status":"java.lang.String"}},{"type":"java.lang.String"},{"type":"java.lang.Integer"}],"annotations":[]}, cause: publish nacos metadata failed, dubbo version: 3.0.8, current host: XX.XX.XXX.XX java.lang.RuntimeException: Failed to put org.apache.dubbo.metadata.report.identifier.MetadataIdentifier@3e1e3807 to nacos {"parameters":{"side":"provider","interface":"com.XXX","pid":"10249","metadata-type":"remote","application":"XXX","dubbo":"2.0.2","release":"3.0.8","anyhost":"true","methods":"getServantDetails","logger":"slf4j","deprecated":"false","service-name-mapping":"true","register-mode":"all","qos.enable":"false","generic":"false","bind.port":"31001","revision":"XXX-SNAPSHOT","bind.ip":"XX.XX.XXX.XX","background":"false","dynamic":"true","service.filter":"-exception","timestamp":"1655786998155"},"canonicalName":"com.XXX","codeSource":"XXX-SNAPSHOT.jar","methods":[{"name":"getServantDetails","parameterTypes":["java.lang.String"],"returnType":"com.XXX","annotations":[]}],"types":[{"type":"java.util.Date"},{"type":"com.XXX","properties":{"serviceType":"java.lang.String","dtEmployment":"java.util.Date","gender":"java.lang.String","description":"java.lang.String","dtEnter":"java.util.Date","userName":"java.lang.String","servantId":"java.lang.String","skilled":"java.lang.String","feeAmt":"java.lang.Integer","duration":"java.lang.Integer","serviceCount":"java.lang.Integer","dtUpdate":"java.util.Date","dtServiceTime":"java.util.Date","userTag":"java.lang.String","aptitude":"java.lang.String","shortDesc":"java.lang.String","iconUrl":"java.lang.String","dtCreate":"java.util.Date","status":"java.lang.String"}},{"type":"java.lang.String"},{"type":"java.lang.Integer"}],"annotations":[]}, cause: publish nacos metadata failed at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport.storeMetadata(NacosMetadataReport.java:343) at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport.doStoreProviderMetadata(NacosMetadataReport.java:178) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.storeProviderMetadataTask(AbstractMetadataReport.java:283) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.lambda$storeProviderMetadata$0(AbstractMetadataReport.java:270) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.RuntimeException: publish nacos metadata failed at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport.storeMetadata(NacosMetadataReport.java:339) ... 6 common frames omitted
依赖: nacos-client版本:2.1.0 <spring.boot.version>2.6.6</spring.boot.version> <spring.cloud.version>2021.0.1</spring.cloud.version> <spring.cloud.alibaba.version>2021.0.1.0</spring.cloud.alibaba.version> <dubbo.version>3.0.8</dubbo.version>
dubbo-registry-nacos排除间接依赖:log4j、dubbo-common、dubbo-remoting-api
spring-cloud-starter-alibaba-nacos-discovery排除间接依赖:HdrHistogram、nacos-client
spring-cloud-starter-alibaba-nacos-config
spring-cloud-starter-bootstrap
应用配置: spring: application: name: xxx profiles: active: '${profile}' cloud: nacos: username: nacos password: 123nacos456 config: server-addr: nacos-server:8848 group: '${spring.profiles.active}' namespace: ${nacos.namespace} file-extension: yaml shared-configs[0]: data-id: application.${spring.cloud.nacos.config.file-extension} refresh: false refresh-enabled: true discovery: enabled: true register-enabled: true group: '${spring.profiles.active}' namespace: ${nacos.namespace} server-addr: ${spring.cloud.nacos.config.server-addr} dubbo: registry: address: nacos://${spring.cloud.nacos.config.server-addr} group: '${spring.profiles.active}' namespace: ${nacos.namespace} username: ${spring.cloud.nacos.username} password: ${spring.cloud.nacos.password} protocol: name: dubbo port: 31003 application: logger: slf4j metadataType: remote register-mode: all qos: enable: false port: -1 accept: foreign: ip: false provider: filter: -exception consumer: cache: false timeout: 30000 retries: -1 check: false metadata-report: group: '${spring.profiles.active}' namespace: ${nacos.namespace} address: ${dubbo.registry.address} username: ${spring.cloud.nacos.username} password: ${spring.cloud.nacos.password}
nacos-server版本:2.1.0 nacos-server默认配置未修改,认证相关配置: management.metrics.export.elastic.enabled=false management.metrics.export.influx.enabled=false server.tomcat.accesslog.enabled=true server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i server.tomcat.basedir= nacos.security.ignore.urls=/,/error,//.css,//.js,/**/.html,//.map,//.svg,/**/.png,//*.ico,/console-ui/public/,/v1/auth/,/v1/console/health/,/actuator/,/v1/console/server/ nacos.core.auth.system.type=nacos nacos.core.auth.enabled=false nacos.core.auth.caching.enabled=true nacos.core.auth.enable.userAgentAuthWhite=false nacos.core.auth.server.identity.key=serverIdentity nacos.core.auth.server.identity.value=security
原提问者GitHub用户hyw520110
NacosMetadataReport#storeMetadata这里调的是nacos的
尝试降级一下nacos版本试试有这个问题吗
原回答者GitHub用户wangchengming666
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。