apache / dubbo-go

Go Implementation For Apache Dubbo .
https://dubbo.apache.org/
Apache License 2.0
4.72k stars 927 forks source link

dubbo-go的服务,在dubbo-admin中无法发现方法 #1262 #2588

Open ssfyn opened 9 months ago

ssfyn commented 9 months ago

Environment

go config

rootConfigBuilder := config.NewRootConfigBuilder()
cb := rootConfigBuilder.
    SetApplication(config.NewApplicationConfigBuilder().
        SetName(dubboName).
        Build(),
    ).
    AddRegistry("zk", config.NewRegistryConfigBuilder().
        SetProtocol("zookeeper").
        SetTimeout("3s").
        SetRegistryType("interface").
        SetAddress(zkAddress).
        Build(),
    ).
    SetMetadataReport(config.NewMetadataReportConfigBuilder().
        SetProtocol("zk").
        SetAddress(zkAddress).
        SetTimeout("3s").
        Build(),
    ).
    AddProtocol("triple", config.NewProtocolConfigBuilder().
        SetName("tri").
        SetPort(dubboPort).
        Build(),
    )
//.....register triple(grpc) service....
cb.Build().Init()

screenshot-20240124-190519

https://github.com/apache/dubbo-admin/issues/1262

DMwangnima commented 9 months ago

Can you check the metadata information in Zookeeper?

ssfyn commented 9 months ago

Can you check the metadata information in Zookeeper?

ListenServiceNodeEvent->listenSelf(zk path{/services/dubbo-go-demo/192.168.128.161:20000}) goroutine exit now
FoghostCn commented 9 months ago

dubbo go version: 3.3.1 ??

ssfyn commented 6 months ago

dubbo go version: 3.3.1 ??

sorry, is v3.1.1-rc1

FoghostCn commented 6 months ago

you should set metadata type to remote,otherwise it will not publish metadata to metadata center

rootConfigBuilder := config.NewRootConfigBuilder()
cb := rootConfigBuilder.
  SetApplication(config.NewApplicationConfigBuilder().
      SetName("dubb").
      SetMetadataType("remote"). // this line
      Build(),
  )
ssfyn commented 6 months ago

you should set metadata type to remote,otherwise it will not publish metadata to metadata center

rootConfigBuilder := config.NewRootConfigBuilder()
cb := rootConfigBuilder.
  SetApplication(config.NewApplicationConfigBuilder().
    SetName("dubb").
    SetMetadataType("remote"). // this line
    Build(),
  )

看代码MetadataType的remote,好像只有service_discovery时才被使用到,service_discovery好像在应用级服务发现中才生效,是这样么?

FoghostCn commented 6 months ago

you should set metadata type to remote,otherwise it will not publish metadata to metadata center

rootConfigBuilder := config.NewRootConfigBuilder()
cb := rootConfigBuilder.
  SetApplication(config.NewApplicationConfigBuilder().
      SetName("dubb").
      SetMetadataType("remote"). // this line
      Build(),
  )

看代码MetadataType的remote,好像只有service_discovery时才被使用到,service_discovery好像在应用级服务发现中才生效,是这样么?

The v3.1.1-rc1 version of metadata is also used in dubbo-admin. Part of it is used for application-level service discovery, and part of it is used by admin.

willcfyang commented 1 month ago

我这里zk里面注册了metadata,但是dubbo-admin依然无法识别