leapig opened a new issue, #2365: URL: https://github.com/apache/dubbo-go/issues/2365
- Server: Dubbo-go, v3.1.0 - Client: Dubbo-go, v3.1.0 - Protocol: Triple - Registry: Nacos, v2.1.0 ### Issue description dubbo-go由3.0.5升级到3.1.0后nacos配置中心获取不到配置,大概率应该是升级[nacos-sdk-go](https://github.com/nacos-group/nacos-sdk-go)到V2导致的 ### Logs <details><summary>报错日志</summary> ``` 2023-07-28 10:05:55 INFO logger/logging.go:42 The following profiles are active: [default] 2023-07-28 10:05:55 INFO nacos/impl.go:78 [Nacos ConfigCenter] New Nacos ConfigCenter with Configuration: &{BaseDynamicConfiguration:{} url:0xc0009ee540 rootPath: wg:{noCopy:{} state1:[0 0 0]} cltLock:{state:0 sema:0} done:0xc00047e660 client:<nil> keyListeners:{mu:{state:0 sema:0} read:{v:<nil>} dirty:map[] misses:0} parser:<nil>}, url = nacos://nacos:B4236BB549953C176552966406EDFC2E308BAC57@nacos:8848?config-center.appId=dubbo&config-center.cluster=&config-center.group=&config-center.namespace=&config-center.timeout=10s&nacos.access=&nacos.group=DEFAULT_GROUP&nacos.namespaceId=&nacos.password=B4236BB549953C176552966406EDFC2E308BAC57&nacos.secret=&nacos.timeout=10s&nacos.username=nacos&remote-client-name=dubbo.config-center-nacos-nacos%3A8848 2023-07-28T10:05:55.437+0800 INFO nacos_client/nacos_client.go:65 logDir:</app/log> cacheDir:</app/cache> 2023-07-28 10:06:04 WARN config/config_center_config.go:146 [Config Center] Dynamic config center has started, but config may not be initialized, because: read config from both server and cache fail, err=failed to read config cache file:/app/cache/config/client@@DEFAULT_GROUP@@, cacheDir:/app/cache/config, err:open /app/cache/config/client@@DEFAULT_GROUP@@: no such file or directory ,dataId=client, group=DEFAULT_GROUP, namespaceId= panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: dubbo.apache.org/dubbo-go/v3/config.(*ReferenceConfig).Refer(0xc0005ec1a0, {0x1d853a0, 0xc000ccc000}) /go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/config/reference_config.go:276 +0xc45 dubbo.apache.org/dubbo-go/v3/config.(*ConsumerConfig).Load(0xc0000ec580) /go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/config/consumer_config.go:146 +0x272 dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start.func1() /go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/config/root_config.go:211 +0x36 sync.(*Once).doSlow(0x40f4e7, 0xa8) /usr/local/go/src/sync/once.go:68 +0xd2 sync.(*Once).Do(...) /usr/local/go/src/sync/once.go:59 dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start(0x1f05000) /go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/config/root_config.go:209 +0x46 dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Init(0xc0000ec630) /go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/config/root_config.go:204 +0x565 dubbo.apache.org/dubbo-go/v3/config.Load({0x0, 0xc000c60680, 0x7ff213af5cc8}) /go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/config/config_loader.go:65 +0xaa main.main() /builds/fky/client/server/App.go:34 +0xc5 ``` </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org