kitex-contrib / kitexcall

A command line tool for sending requests using kitex
Apache License 2.0
18 stars 7 forks source link

bug(pb): return miss method when accessing multiple services #7

Open a631807682 opened 5 months ago

a631807682 commented 5 months ago

Describe the bug

Return miss method when accessing multiple services.

To Reproduce

idl

service ServiceA {
    rpc Method1 ...
}

service ServiceB {
    rpc Method2 ...
}

cmd

kitexcall  -idl-path  xxx.proto -m ServiceA/Method1 -d '{}' -e ...

return

[Status]: Failed
[ServerError]: RPC call failed: missing method: Method1 in service

Expected behavior

-

Screenshots

-

Kitex version:

v0.7.1

Environment:

GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/xx/Library/Caches/go-build"
GOENV="/Users/xx/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/xx/.gvm/pkgsets/go1.20.2/global/pkg/mod"
GOOS="darwin"
GOPATH="/Users/xx/.gvm/pkgsets/go1.20.2/global"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/Users/xx/.gvm/gos/go1.20.2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/xx/.gvm/gos/go1.20.2/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xd/4bn135c91vvdn52yvmq0m_r00000gn/T/go-build837636611=/tmp/go-build -gno-record-gcc-switches -fno-common"

Additional context

-

Zzhiter commented 5 months ago

@a631807682 Thanks for your feedback. Are there the full IDL and the generated server code? It is difficult to reproduce this error with the information you provided.

felix021 commented 5 months ago
  1. Make sure your Kitex server using github.com/cloudwego/kitex >= v0.9.0 which has full multiservice support on Thrift/KitexProtobuf (non-grpc)
  2. Remember to specify TTHeader or TTHeaderFramed as transport with kitexcall's -t argument
  3. Kitexcall will improve user experience as stated in https://github.com/kitex-contrib/kitexcall/issues/8