PhilYue opened a new issue #1583: URL: https://github.com/apache/dubbo-go/issues/1583
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! --> **What happened**: 基于 [JSON-PRC](https://github.com/apache/dubbo-go-samples/tree/master/rpc/jsonrpc) 改造入参出参,同 #1582 ,在此代码基础上,Server 同时暴露 `dubbo` 和 `jsonrpc`协议,Client 消费使用 `dubbo`协议时,Server 报错如下: 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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/remoting/getty/readwriter.go:104 github.com/apache/dubbo-getty.(*session).handleTCPPackage /Users/phil/go/pkg/mod/github.com/apache/[email protected]/session.go:627 github.com/apache/dubbo-getty.(*session).handlePackage /Users/phil/go/pkg/mod/github.com/apache/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/remoting/getty/readwriter.go:104 github.com/apache/dubbo-getty.(*session).handleTCPPackage /Users/phil/go/pkg/mod/github.com/apache/[email protected]/session.go:627 github.com/apache/dubbo-getty.(*session).handlePackage /Users/phil/go/pkg/mod/github.com/apache/[email protected]/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正常处理请求 **How to reproduce it (as minimally and precisely as possible)**: - **Anything else we need to know?**: - -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
