You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "ssfyn (via GitHub)" <gi...@apache.org> on 2023/08/28 14:18:55 UTC
[GitHub] [dubbo-go] ssfyn opened a new issue, #2403: 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value
ssfyn opened a new issue, #2403:
URL: https://github.com/apache/dubbo-go/issues/2403
### 问题
* go调用go的服务能能跑通,但是go调用java的服务时报错
* 通过看zk内容发现go的服务的`dubbo.metadata-service.url-params`中`proto`是`dubbo`,但java的服务是`tri`,不确定和这个有没有关系。
### 错误讯息
```
panic: reflect: call of reflect.Value.MethodByName on zero Value
goroutine 130 [running]:
reflect.Value.MethodByName({0x0?, 0x0?, 0x1400066ad58?}, {0x103d55724?, 0x14000181740?})
/usr/local/go/src/reflect/value.go:2026 +0x114
github.com/dubbogo/triple/pkg/triple.getInvoker({0x0?, 0x0?}, 0x15?)
/Users/me/go/pkg/mod/github.com/dubbogo/triple@v1.2.2-rc3/pkg/triple/dubbo3_conn.go:79 +0x194
github.com/dubbogo/triple/pkg/triple.NewTripleClient({0x0, 0x0}, 0x6?)
/Users/me/go/pkg/mod/github.com/dubbogo/triple@v1.2.2-rc3/pkg/triple/dubbo3_client.go:117 +0x764
dubbo.apache.org/dubbo-go/v3/protocol/dubbo3.NewDubboInvoker(0x1400053e300)
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/protocol/dubbo3/dubbo3_invoker.go:128 +0x898
dubbo.apache.org/dubbo-go/v3/protocol/dubbo3.(*DubboProtocol).Refer(0x14000346580, 0x1400053e300)
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/protocol/dubbo3/dubbo3_protocol.go:137 +0x28
dubbo.apache.org/dubbo-go/v3/metadata/service/local.createProxy({0x10454de80?, 0x1400069a8c0})
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/metadata/service/local/metadata_service_proxy_factory.go:69 +0x128
dubbo.apache.org/dubbo-go/v3/metadata/service.(*BaseMetadataServiceProxyFactory).GetProxy(0x103d4f1e7?, {0x10454de80?, 0x1400069a8c0?})
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/metadata/service/local_service.go:119 +0x34
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.GetMetadataInfo({0x10454de80, 0x1400069a8c0}, {0x1400037cc40, 0x20})
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/servicediscovery/service_instances_changed_listener_impl.go:209 +0x118
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceInstancesChangedListenerImpl).OnEvent(0x140002ca360, {0x104539f60?, 0x14000376190})
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/servicediscovery/service_instances_changed_listener_impl.go:91 +0x5e0
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).SubscribeURL(0x140001ec870, 0x14000650b40, {0x1045356f0, 0x14000650fc0}, 0x14000199200)
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/servicediscovery/service_discovery_registry.go:236 +0x56c
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceMappingChangedListenerImpl).OnEvent(0x14000276080, {0x104539f90?, 0x14000791ef8?})
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/servicediscovery/service_mapping_change_listener_impl.go:84 +0x13c
dubbo.apache.org/dubbo-go/v3/registry/servicediscovery.(*ServiceDiscoveryRegistry).Subscribe(0x140000a42d0, 0x14000650b40, {0x1045356f0?, 0x14000650fc0})
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/servicediscovery/service_discovery_registry.go:216 +0x2e4
dubbo.apache.org/dubbo-go/v3/registry/directory.(*RegistryDirectory).Subscribe(0x14000650fc0, 0x14000650b40)
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/directory/directory.go:107 +0xd0
created by dubbo.apache.org/dubbo-go/v3/registry/protocol.(*registryProtocol).Refer
/Users/me/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.1.0/registry/protocol/protocol.go:164 +0x1f4
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1851615956
@ssfyn in java server side,set application.metadataServiceProtocol=dubbo to avoid this problem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks closed issue #2403: 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value
URL: https://github.com/apache/dubbo-go/issues/2403
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "DMwangnima (via GitHub)" <gi...@apache.org>.
DMwangnima commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1851548689
> > > 已经找到了问题链路,java侧的配置也能发一下么?
> >
> >
> > 配置文件是这个
> > ```yaml
> > dubbo:
> > application:
> > name: dubbo-springboot-demo-provider
> > protocol:
> > name: tri
> > port: -1
> > registry:
> > address: zookeeper://127.0.0.1:2181
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > java这块儿起的服务是直接使用的这个demo: https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-triple-unary
>
> 404 - page not found, is 3.2 branch ?
应该是这个https://github.com/apache/dubbo-samples/tree/3.2/1-basic/dubbo-samples-triple-unary
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] DMwangnima commented on issue #2403: 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value
Posted by "DMwangnima (via GitHub)" <gi...@apache.org>.
DMwangnima commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1739599890
@ssfyn 可以给一份go侧的配置内容吗?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "ssfyn (via GitHub)" <gi...@apache.org>.
ssfyn commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1751666989
> @ssfyn 可以给一份go侧的配置内容吗?
```yaml
dubbo:
application:
name: go-example
module: example
organization: example
owner: me
environment: local
registries:
demoZK:
protocol: zookeeper
timeout: 3s
address: 127.0.0.1:2181
registry-type: all
metadata-report:
protocol: zk
address: 127.0.0.1:32181
protocols:
triple:
name: tri
port: 20000
provider:
services:
GreeterServerImpl:
protocol: tri
interface: "com.goexample.Greeter"
consumer:
references:
GreeterClientImpl:
interface: "org.apache.dubbo.samples.tri.unary.Greeter"
protocol: "tri"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] chickenlj commented on issue #2403: 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value
Posted by "chickenlj (via GitHub)" <gi...@apache.org>.
chickenlj commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1703742026
> 通过看zk内容发现go的服务的dubbo.metadata-service.url-params中proto是dubbo,但java的服务是tri,不确定和这个有没有关系。
请问使用的 dubbo-go 版本是? 3.1.0 吗?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1851587375
reproduced success,in dubbo-go tri depens on some stub method in generated pb.go file,
like that
```go
func (c *GreeterClientImpl) GetDubboStub(cc *triple.TripleConn) GreeterClient {
return NewGreeterClient(cc)
}
```
in metadata module it use low level api to invoke rpc, no GetDubboStub method generated
https://github.com/apache/dubbo-go/blob/d204c4ef491dd22c58c4fd2e0a30e0f9d4e57715/metadata/service/local/service_proxy.go#L175-L190
in fact tri protocol not supported in metadata service rpc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "FoghostCn (via GitHub)" <gi...@apache.org>.
FoghostCn commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1851530506
> > 已经找到了问题链路,java侧的配置也能发一下么?
>
> 配置文件是这个
>
> ```yaml
> dubbo:
> application:
> name: dubbo-springboot-demo-provider
> protocol:
> name: tri
> port: -1
> registry:
> address: zookeeper://127.0.0.1:2181
> ```
>
> java这块儿起的服务是直接使用的这个demo: https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-triple-unary
404 - page not found
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "DMwangnima (via GitHub)" <gi...@apache.org>.
DMwangnima commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1751895691
已经找到了问题链路,java侧的配置也能发一下么?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value [dubbo-go]
Posted by "ssfyn (via GitHub)" <gi...@apache.org>.
ssfyn commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1751978975
> 已经找到了问题链路,java侧的配置也能发一下么?
配置文件是这个
```yaml
dubbo:
application:
name: dubbo-springboot-demo-provider
protocol:
name: tri
port: -1
registry:
address: zookeeper://127.0.0.1:2181
```
java这块儿起的服务是直接使用的这个demo:
https://github.com/apache/dubbo-samples/tree/master/1-basic/dubbo-samples-triple-unary
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go] ssfyn commented on issue #2403: 调用java服务报错reflect: call of reflect.Value.MethodByName on zero Value
Posted by "ssfyn (via GitHub)" <gi...@apache.org>.
ssfyn commented on issue #2403:
URL: https://github.com/apache/dubbo-go/issues/2403#issuecomment-1705014542
> > 通过看zk内容发现go的服务的dubbo.metadata-service.url-params中proto是dubbo,但java的服务是tri,不确定和这个有没有关系。
>
> 请问使用的 dubbo-go 版本是? 3.1.0 吗?
是的
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org