We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What happened:
基于 JSON-PRC 改造入参出参,同 #1582 ,在此代码基础上,Server 同时暴露 dubbo 和 jsonrpc协议,Client 消费使用 dubbo协议时,Server 报错如下:
dubbo
jsonrpc
Server Error Log:
2021-11-11T15:14:28.086+0800 ERROR dubbo/dubbo_codec.go:196 pkg.Unmarshal(len(@data):0) = error:get wrong attachments: dubbo.apache.org/dubbo-go/v3/protocol/dubbo/impl.unmarshalRequestBody /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/impl/hessian.go:267 dubbo.apache.org/dubbo-go/v3/protocol/dubbo/impl.HessianSerializer.Unmarshal /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/impl/hessian.go:56 dubbo.apache.org/dubbo-go/v3/protocol/dubbo/impl.(*ProtocolCodec).Decode /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/impl/codec.go:186 dubbo.apache.org/dubbo-go/v3/protocol/dubbo/impl.(*DubboPackage).Unmarshal /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/impl/package.go:93 dubbo.apache.org/dubbo-go/v3/protocol/dubbo.(*DubboCodec).decodeRequest /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/dubbo_codec.go:189 dubbo.apache.org/dubbo-go/v3/protocol/dubbo.(*DubboCodec).Decode /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/dubbo_codec.go:165 dubbo.apache.org/dubbo-go/v3/remoting/getty.(*RpcServerPackageHandler).Read /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/remoting/getty/readwriter.go:104 github.com/apache/dubbo-getty.(*session).handleTCPPackage /Users/phil/go/pkg/mod/github.com/apache/dubbo-getty@v1.4.5/session.go:627 github.com/apache/dubbo-getty.(*session).handlePackage /Users/phil/go/pkg/mod/github.com/apache/dubbo-getty@v1.4.5/session.go:549 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1371 dubbo.apache.org/dubbo-go/v3/protocol/dubbo.(*DubboCodec).decodeRequest /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/dubbo_codec.go:196 dubbo.apache.org/dubbo-go/v3/protocol/dubbo.(*DubboCodec).Decode /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/protocol/dubbo/dubbo_codec.go:165 dubbo.apache.org/dubbo-go/v3/remoting/getty.(*RpcServerPackageHandler).Read /Users/phil/go/pkg/mod/dubbo.apache.org/dubbo-go/v3@v3.0.0-rc3.0.20211109121610-2ebc38bed562/remoting/getty/readwriter.go:104 github.com/apache/dubbo-getty.(*session).handleTCPPackage /Users/phil/go/pkg/mod/github.com/apache/dubbo-getty@v1.4.5/session.go:627 github.com/apache/dubbo-getty.(*session).handlePackage /Users/phil/go/pkg/mod/github.com/apache/dubbo-getty@v1.4.5/session.go:549
Client dubbogo.yml
dubbo: consumer: references: UserProvider: # protocol: jsonrpc protocol: dubbo interface: com.ikurento.user.UserProvider
What you expected to happen: Server正常处理请求
The text was updated successfully, but these errors were encountered:
@PhilYue
Sorry, something went wrong.
dubbo-go/protocol/dubbo/impl/hessian.go#unmarshalRequestBody
attachments, err := decoder.Decode() if err != nil { return perrors.WithStack(err) } //if attachments == nil { if attachments == nil || attachments == "" { // || attachments == "" attachments = map[interface{}]interface{}{constant.InterfaceKey: target} } if v, ok := attachments.(map[interface{}]interface{}); ok { v[DUBBO_VERSION_KEY] = dubboVersion req[6] = ToMapStringInterface(v) buildServerSidePackageBody(p) return nil } return perrors.Errorf("get wrong attachments: %+v", attachments)
try to fix it by yourself?
PhilYue
No branches or pull requests
What happened:
基于 JSON-PRC 改造入参出参,同 #1582 ,在此代码基础上,Server 同时暴露
dubbo
和jsonrpc
协议,Client 消费使用dubbo
协议时,Server 报错如下:Server Error Log:
Client dubbogo.yml
What you expected to happen:
Server正常处理请求
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
The text was updated successfully, but these errors were encountered: