Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polaris registry not support Triple protocol? #2216

Open
wesleywu opened this issue Feb 17, 2023 · 4 comments
Open

Polaris registry not support Triple protocol? #2216

wesleywu opened this issue Feb 17, 2023 · 4 comments

Comments

@wesleywu
Copy link

wesleywu commented Feb 17, 2023

version 3.0.5
I'm running triple samples by using polaris registry.

What happened:

  1. modify dubbogo.yml files in rpc/triple/pb2/go-server/conf as
dubbo:
  registries:
    polarisMesh:
      protocol: polaris
      address: 127.0.0.1:8091
      namespace: dubbogo
  protocols:
    triple:
      name: tri
      port: 20000
  provider:
    services:
      GreeterProvider:
        # interface read from pb file
        interface: ""
  1. modify dubbogo.yml files in rpc/triple/pb2/go-client/conf as
dubbo:
  registries:
    polarisMesh:
      protocol: polaris
      address: 127.0.0.1:8091
      namespace: dubbogo
  consumer:
    references:
      GreeterClientImpl:
        protocol: tri
  metrics:
    enable: false
    path: /custom-metrics-path
    port: 9092
  1. run server command
    DUBBO_GO_CONFIG_PATH=$(pwd)/rpc/triple/pb2/go-server/conf/dubbogo.yml go run rpc/triple/pb2/go-server/cmd/server.go

output seems right:

# command-line-arguments
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: non-standard -pagezero_size is deprecated when targeting macOS 13.0 or later
2023-02-17T20:48:21.061+0800    INFO    config/config_loader_options.go:201     The following profiles are active: default
2023-02-17T20:48:21.062+0800    INFO    config/root_config.go:131       [Config Center] Config center doesn't start
2023-02-17T20:48:21.062+0800    WARN    prometheus/reporter.go:425      new prometheus reporter with error = listen tcp :9090: bind: address already in use
2023-02-17T20:48:21.062+0800    INFO    dubbo3/dubbo3_protocol.go:82    [Triple Protocol] Export service: tri://:20000/grpc.reflection.v1alpha.ServerReflection?accesslog=&app.version=&application=dubbo.io&auth=&bean.name=DubbogoServerReflectionServer&cluster=failover&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&interface=grpc.reflection.v1alpha.ServerReflection&loadbalance=random&message_size=4&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638101&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&warmup=
2023-02-17T20:48:21.062+0800    WARN    prometheus/reporter.go:425      new prometheus reporter with error = listen tcp :9090: bind: address already in use
2023-02-17T20:48:21.063+0800    INFO    dubbo3/dubbo3_protocol.go:82    [Triple Protocol] Export service: tri://:20000/org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter?accesslog=&app.version=&application=dubbo.io&auth=&bean.name=GreeterProvider&cluster=failover&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&interface=org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&loadbalance=random&message_size=4&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&registry=polaris&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638101&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&warmup=
2023-02-17T20:48:22.579+0800    WARN    common/rpc_service.go:373       method Resume of mtype func(*health.DubbogoHealthServer) has wrong number of in out parameters 0; needs exactly 1/2
2023-02-17T20:48:22.580+0800    WARN    common/rpc_service.go:373       method SetServingStatus of mtype func(*health.DubbogoHealthServer, string, triple_health_v1.HealthCheckResponse_ServingStatus) has wrong number of in out parameters 0; needs exactly 1/2
2023-02-17T20:48:22.580+0800    WARN    common/rpc_service.go:373       method Shutdown of mtype func(*health.DubbogoHealthServer) has wrong number of in out parameters 0; needs exactly 1/2
2023-02-17T20:48:22.580+0800    INFO    dubbo3/dubbo3_protocol.go:82    [Triple Protocol] Export service: tri://:20000/grpc.health.v1.Health?accesslog=&app.version=&application=dubbo.io&auth=&bean.name=DubbogoHealthServer&cluster=failover&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&interface=grpc.health.v1.Health&loadbalance=random&message_size=4&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638102&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&warmup=
2023-02-17T20:48:22.580+0800    INFO    dubbo/dubbo_protocol.go:84      [DUBBO Protocol] Export service: dubbo://:52486/org.apache.dubbo.metadata.MetadataService?accesslog=&app.version=&application=dubbo.io&auth=&bean.name=MetadataService&cluster=&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&group=dubbo.io&interface=org.apache.dubbo.metadata.MetadataService&loadbalance=&message_size=0&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638102&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&version=1.0.0&warmup=
2023-02-17T20:48:22.582+0800    INFO    configurable/exporter.go:80     [Metadata Service] The MetadataService exports urls : [dubbo://:52486/org.apache.dubbo.metadata.MetadataService?accesslog=&app.version=&application=dubbo.io&auth=&bean.name=MetadataService&cluster=&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&group=dubbo.io&interface=org.apache.dubbo.metadata.MetadataService&loadbalance=&message_size=0&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638102&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&version=1.0.0&warmup=] 

and I can see the provider listed in polaris console with name providers:org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter in namespace dubbogo

  1. run client command
    DUBBO_GO_CONFIG_PATH=$(pwd)/rpc/triple/pb2/go-client/conf/dubbogo.yml go run rpc/triple/pb2/go-client/cmd/client.go

the output:

# command-line-arguments
ld: warning: -no_pie is deprecated when targeting new OS versions
ld: warning: non-standard -pagezero_size is deprecated when targeting macOS 13.0 or later
2023-02-17T20:48:35.825+0800    INFO    config/config_loader_options.go:201     The following profiles are active: default
2023-02-17T20:48:35.826+0800    INFO    config/root_config.go:131       [Config Center] Config center doesn't start
2023-02-17T20:48:36.843+0800    INFO    directory/directory.go:253      [Registry Directory] selector add service url{dubbo://192.168.32.58:20000/org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter?DUBBOPATH=%2Forg.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&accesslog=&app.version=&application=dubbo.io&auth=&bean.name=GreeterProvider&cluster=failover&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&healthstatus=false&interface=org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&isolated=false&loadbalance=random&message_size=4&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&polaris.instanceID=17bcfa89f2143d815b98254c9a818418fc628143&protocol=dubbo&registry=polaris&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638101&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&warmup=}
2023-02-17T20:48:36.843+0800    INFO    polaris/registry.go:163 update begin, service event: ServiceEvent{Action{add}, Path{dubbo://192.168.32.58:20000/org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter?DUBBOPATH=%2Forg.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&accesslog=&app.version=&application=dubbo.io&auth=&bean.name=GreeterProvider&cluster=failover&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&healthstatus=false&interface=org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&isolated=false&loadbalance=random&message_size=4&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&polaris.instanceID=17bcfa89f2143d815b98254c9a818418fc628143&protocol=dubbo&registry=polaris&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638101&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&warmup=}, Key{}}
2023-02-17T20:48:36.844+0800    INFO    directory/directory.go:253      [Registry Directory] selector add service url{dubbo://192.168.32.58:20000/org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter?DUBBOPATH=%2Forg.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&accesslog=&app.version=&application=dubbo.io&auth=&bean.name=GreeterProvider&cluster=failover&config.tracing=&environment=&execute.limit=&execute.limit.rejected.handler=&export=true&healthstatus=false&interface=org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter&isolated=false&loadbalance=random&message_size=4&metadata-type=local&module=sample&name=dubbo.io&organization=dubbo-go&owner=dubbo-go&param.sign=&pid=99769&polaris.instanceID=17bcfa89f2143d815b98254c9a818418fc628143&protocol=dubbo&registry=polaris&registry.role=3&release=dubbo-golang-3.0.4&retries=&serialization=&service.filter=echo%2Cmetrics%2Ctoken%2Caccesslog%2Ctps%2Cgeneric_service%2Cexecute%2Cpshutdown&side=provider&timestamp=1676638101&tps.limit.interval=&tps.limit.rate=&tps.limit.rejected.handler=&tps.limit.strategy=&tps.limiter=&warmup=}
2023-02-17T20:48:40.357+0800    ERROR   config/consumer_config.go:158   No provider available of the service org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter.please check configuration.
dubbo.apache.org/dubbo-go/v3/config.(*ConsumerConfig).Load
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/consumer_config.go:158
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start.func1
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/root_config.go:205
sync.(*Once).doSlow
        /usr/local/go/src/sync/once.go:74
sync.(*Once).Do
        /usr/local/go/src/sync/once.go:65
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/root_config.go:203
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Init
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/root_config.go:198
dubbo.apache.org/dubbo-go/v3/config.Load
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/config_loader.go:57
main.main
        /Users/wumengye/Documents/GoProjects/dubbo-go-samples/rpc/triple/pb2/go-client/cmd/client.go:45
runtime.main
        /usr/local/go/src/runtime/proc.go:250
panic: No provider available of the service org.apache.dubbogo.samples.rpc.triple.pb2.api.Greeter.please check configuration.

goroutine 1 [running]:
dubbo.apache.org/dubbo-go/v3/config.(*ConsumerConfig).Load(0xc0003f8f00)
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/consumer_config.go:159 +0x8ac
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start.func1()
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/root_config.go:205 +0x36
sync.(*Once).doSlow(0x40108e7?, 0xa8?)
        /usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /usr/local/go/src/sync/once.go:65
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Start(0x55b5040?)
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/root_config.go:203 +0x46
dubbo.apache.org/dubbo-go/v3/config.(*RootConfig).Init(0xc0001b8e70)
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/root_config.go:198 +0x565
dubbo.apache.org/dubbo-go/v3/config.Load({0x0?, 0x69223f0?, 0xc0000061a0?})
        /Users/wumengye/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.5/config/config_loader.go:57 +0xb1
main.main()
        /Users/wumengye/Documents/GoProjects/dubbo-go-samples/rpc/triple/pb2/go-client/cmd/client.go:45 +0x25
exit status 2

What you expected to happen:
The client should output:

2023-02-17T20:50:52.932+0800    INFO    cmd/client.go:54        >>>>> Dubbo-go client is about to call to SayHelloStream
2023-02-17T20:50:52.933+0800    INFO    cmd/client.go:80        Receive 1 user = &User{ID:123456789,Name:hello laurence,Age:18,}

2023-02-17T20:50:52.934+0800    INFO    cmd/client.go:90        Receive 2 user = &User{ID:123456789,Name:hello laurence,Age:19,}

2023-02-17T20:50:52.934+0800    INFO    cmd/client.go:94        >>>>> Dubbo-go client is about to call to SayHello
2023-02-17T20:50:52.935+0800    INFO    cmd/client.go:107       Receive user = &User{ID:12345,Name:Hello laurence,Age:21,}

If I changed the protocol to "nacos" and address to "127.0.0.1:8848", all things went well.

How to reproduce it (as minimally and precisely as possible):
can be reproduced.

Anything else we need to know?:
OS: Mac Ventura 13.2
Go Version: 1.19

@AlexStocks
Copy link
Contributor

@jasondeng1997 负责该 issue 跟进

@chuntaojun
Copy link
Contributor

i'll try to resolve it

@jasondeng1997
Copy link
Member

目前感觉是polarisRegistry,在调用 notify 的时候出了问题

@chuntaojun
Copy link
Contributor

等等提交PR fix下这个问题

chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 5, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 8, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 16, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 16, 2023
justxuewei pushed a commit that referenced this issue Mar 16, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 21, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 21, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 29, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Mar 29, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Apr 7, 2023
chuntaojun added a commit to chuntaojun/dubbo-go that referenced this issue Apr 7, 2023
AlexStocks pushed a commit that referenced this issue May 11, 2023
* fix:issue #2216

* fix:issue #2216

* fix:注册服务信息不带前缀

* refactor:remove providers: prefix when use polaris

* refactor:remove providers: prefix when use polaris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants