xgaxpp opened a new issue, #2474:
URL: https://github.com/apache/dubbo-go/issues/2474

   code:
     main: 
       ```
                userService := service.NewUserService()
   
        if err := config.Load(); err != nil {
                panic(err)
        }
       ```
     service:
       ```
         func init() {
        impl = new(api.GreeterClientImpl)
        config.SetConsumerService(impl)
         }
   
       ```
   error stack:
      ```
     2023-10-28 22:04:06        INFO    logger/logging.go:22    [init greeter 
client impl]
   2023-10-28 22:04:06  INFO    logger/logging.go:22    [new user service 
success]
   2023-10-28 22:04:06  INFO    logger/logging.go:42    The following profiles 
are active: [default]
   2023-10-28 22:04:06  INFO    nacos/impl.go:78        [Nacos ConfigCenter] 
New Nacos ConfigCenter with Configuration: &{BaseDynamicConfiguration:{} 
url:0xc00020b140 rootPath: wg:{noCopy:{} state:{_:{} _:{} v:0} sema:0} 
cltLock:{state:0 sema:0} done:0xc0000601e0 client:<nil> 
keyListeners:{mu:{state:0 sema:0} read:{_:[] _:{} v:<nil>} dirty:map[] 
misses:0} parser:<nil>}, url = 
nacos://43.138.176.234: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=&nacos.secret=&nacos.timeout=10s&nacos.username=&remote-client-name=dubbo.config-center-nacos-43.138.176.234%3A8848
   2023-10-28T22:04:06.291+0800 INFO    nacos_client/nacos_client.go:65 
logDir:</var/folders/7d/78jzq61s7ms0nsxm6wx27pjr0000gn/T/go-build3149119202/b001/exe/log>
 
cacheDir:</var/folders/7d/78jzq61s7ms0nsxm6wx27pjr0000gn/T/go-build3149119202/b001/exe/cache>
   2023-10-28 22:04:06  WARN    config/config_center_config.go:150      [Config 
Center] Dynamic config center has started, but got empty config with 
config-center configuration &{Protocol:nacos Address:43.138.176.234:8848 
DataId:admin-config-starter Cluster: Group: Username: Password: Namespace: 
AppID:dubbo Timeout:10s Params:map[] FileExtension:yaml}
   Please check if your config-center config is correct.
   panic: runtime error: index out of range [0] with length 0
   
   goroutine 1 [running]:
   dubbo.apache.org/dubbo-go/v3/config.(*ReferenceConfig).Refer(0xc000682d00, 
{0x1014e4bc0, 0xc0006dd0c0})
        
/Users/google/go/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/config/reference_config.go:276
 +0x985
   dubbo.apache.org/dubbo-go/v3/config.(*ConsumerConfig).Load(0xc0004200b0)
        
/Users/google/go/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/config/consumer_config.go:146
 +0x27f
   dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start.func1()
        
/Users/google/go/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/config/root_config.go:211
 +0x2d
   sync.(*Once).doSlow(0x100012f65?, 0xa8?)
        /usr/local/Cellar/go/1.21.3/libexec/src/sync/once.go:74 +0xbf
   sync.(*Once).Do(...)
        /usr/local/Cellar/go/1.21.3/libexec/src/sync/once.go:65
   dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start(0x1016503e0?)
        
/Users/google/go/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/config/root_config.go:209
 +0x45
   dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Init(0xc000420160)
        
/Users/google/go/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/config/root_config.go:204
 +0x525
   dubbo.apache.org/dubbo-go/v3/config.Load({0x0?, 0xc0006dd210?, 
0xc00071df30?})
        
/Users/google/go/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/config/config_loader.go:65
 +0xa8
   main.main()
        /Users/google/workspace/dumbo-go/internal/admin/cmd/admin.go:17 +0x91
   exit status 2
      ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to