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

应用级泛化调用 go client 调用 java service 调不通 [tag router] invokers from previous router is empty #772

Open
tuoxiebushuijiao opened this issue Jun 27, 2024 · 0 comments

Comments

@tuoxiebushuijiao
Copy link

1、go clinet 相关代码如下:
tripleRefConf := newRefConf("com.example.doubbo.dubbo.api.DemoService", tpconst.TRIPLE)
func newRefConf(iface, protocol string) config.ReferenceConfig {
registryConfig := &config.RegistryConfig{
Timeout: "3s",
Protocol: "nacos",
Address: "127.0.0.1:33366",
RegistryType: "service",
}
metadataConf := &config.MetadataReportConfig{
Protocol: "nacos",
Address: "127.0.0.1:33366",
}
refConf := config.ReferenceConfig{
InterfaceName: iface,
Cluster: "failover",
RegistryIDs: []string{"nacos"},
Protocol: protocol,
Generic: "true",
}

rootConfig := config.NewRootConfigBuilder().
	AddRegistry("nacos", registryConfig).
	  SetMetadataReport(metadataConf).
	Build()
if err := config.Load(config.WithRootConfig(rootConfig)); err != nil {
	panic(err)
}
_ = refConf.Init(rootConfig)
refConf.GenericLoad(appName)
return refConf

}
2、java springboot 配置文件如下:
dubbo:
application:
logger: slf4j
name: DoubboApplication
metadataServiceProtocol: dubbo
registry:
address: nacos://127.0.0.1:33366
registerMode: instance
protocol:
name: tri
port: 50052
serialization: hessian2
provider:
serialization: hessian2
metadata-report:
address: nacos://127.0.0.1:33366

3、调用结果信息如下:
2024-06-27 16:44:47 INFO config/root_config.go:137 [Config Center] Config center doesn't start
2024-06-27T16:44:47.388+0800 INFO nacos_client/nacos_client.go:65 logDir:<C:\Windows\TEMP\go-build1136790667\b001\exe\log> cacheDir:<C:\Windows\TEMP\go-build1136790667\b001\exe\cache>
2024-06-27 16:44:47 INFO nacos/builder.go:139 [Nacos Client] New nacos client with config = [{Scheme: ContextPath: IpAddr:127.0.0.1 Port:33366 GrpcPort:0}]
2024-06-27 16:44:47 INFO config/root_config.go:137 [Config Center] Config center doesn't start
2024-06-27 16:44:47 WARN tag/router.go:52 [tag router] invokers from previous router is empty
2024-06-27 16:44:47 WARN proxy/proxy.go:212 [CallProxy] received rpc err: Failed to invoke the method $invoke. No provider available for the service dubbo://:@:/?interface=com.example.doubbo.dubbo.api.DemoService&group=&version= from registry service-discovery-registry://127.0.0.1:33366?registry=nacos&registry.group=&registry.label=true&registry.namespace=&registry.preferred=false&registry.role=0&registry.timeout=3s&registry.ttl=15m&registry.weight=0&registry.zone=&remote-client-name=dubbo.registries-nacos-127.0.0.1%3A33366&simplified=false on the consumer 192.168.3.174 using the dubbo version 3.0.4 .Please check if the providers have been started and registered.
panic: Failed to invoke the method $invoke. No provider available for the service dubbo://:@:/?interface=com.example.doubbo.dubbo.api.DemoService&group=&version= from registry service-discovery-registry://127.0.0.1:33366?registry=nacos&registry.group=&registry.label=true&registry.namespace=&registry.preferred=false&registry.role=0&registry.timeout=3s&registry.ttl=15m&registry.weight=0&registry.zone=&remote-client-name=dubbo.registries-nacos-127.0.0.1%3A33366&simplified=false on the consumer 192.168.3.174 using the dubbo version 3.0.4 .Please check if the providers have been started and registered.

goroutine 1 [running]:
main.sayHello({0xc00046ee60, {0x251b3e4, 0x8}, {0x2558c2b, 0x28}, 0xc000882268, {0x0, 0x0}, {0x0, 0x0}, ...})
D:/goSpace/dubbo-go-samples-release-3.1/generic/default/go-client/cmd/client.go:91 +0x156
main.main()
D:/goSpace/dubbo-go-samples-release-3.1/generic/default/go-client/cmd/client.go:72 +0x118
exit status 2

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

1 participant