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

metadata report doesn't work without service-discovery #939

Closed
beiwei30 opened this issue Dec 15, 2020 · 1 comment
Closed

metadata report doesn't work without service-discovery #939

beiwei30 opened this issue Dec 15, 2020 · 1 comment
Assignees

Comments

@beiwei30
Copy link
Member

What happened:

Use https://github.com/apache/dubbo-go-samples/tree/master/general/dubbo/go-server as an example:

  1. edit "conf/server.yml":
diff --git a/general/dubbo/go-server/cmd/server.go b/general/dubbo/go-server/cmd/server.go
index 8c12a69..8913fb7 100644
--- a/general/dubbo/go-server/cmd/server.go
+++ b/general/dubbo/go-server/cmd/server.go
@@ -35,6 +35,7 @@ import (
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/report/zookeeper"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
diff --git a/general/dubbo/go-server/conf/server.yml b/general/dubbo/go-server/conf/server.yml
index af90434..faa8853 100644
--- a/general/dubbo/go-server/conf/server.yml
+++ b/general/dubbo/go-server/conf/server.yml
@@ -7,6 +7,17 @@ application:
   module: "dubbo-go user-info server"
   version: "0.0.1"
   environment: "dev"
+  metadataType: "remote"
+
+metadata_report:
+  protocol: "zookeeper"
+  remote_ref: "zookeeper"
+
+remote:
+  "zookeeper":
+    protocol: "zookeeper"
+    address: "127.0.0.1:2181"
+
 
 # registry config
 registries:
  1. edit "cmd/server.go":
diff --git a/general/dubbo/go-server/cmd/server.go b/general/dubbo/go-server/cmd/server.go
index 8c12a69..8913fb7 100644
--- a/general/dubbo/go-server/cmd/server.go
+++ b/general/dubbo/go-server/cmd/server.go
@@ -35,6 +35,7 @@ import (
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/report/zookeeper"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper
  1. start general/dubbo/go-server in IDE, make sure ”working directory" points to "general/dubbo/go-server", and config "environment" to "CONF_PROVIDER_FILE_PATH=conf/server.yml" in Intellij Idea's "Run/Debug Configurations"

  2. Observe https://github.com/apache/dubbo-go/blob/master/config/config_loader.go#L318, zookeeper's metadata reporter can be initialized successfully.

  3. However, breakpoint at https://github.com/apache/dubbo-go/blob/master/metadata/report/zookeeper/report.go#L55 will not stop, that means metadata report doesn't work.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

@beiwei30 beiwei30 changed the title metadata report doesn't work metadata report doesn't work without service-discovery Dec 15, 2020
@Patrick0308
Copy link
Contributor

Fixed by #948

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

3 participants