Closed beiwei30 closed 3 years ago
What happened:
Use https://github.com/apache/dubbo-go-samples/tree/master/general/dubbo/go-server as an example:
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:
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
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"
Observe https://github.com/apache/dubbo-go/blob/master/config/config_loader.go#L318, zookeeper's metadata reporter can be initialized successfully.
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?:
Fixed by #948
What happened:
Use https://github.com/apache/dubbo-go-samples/tree/master/general/dubbo/go-server as an example:
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"
Observe https://github.com/apache/dubbo-go/blob/master/config/config_loader.go#L318, zookeeper's metadata reporter can be initialized successfully.
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?: