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

Failed to extract ServerMetadata from context #167

Open
fi0 opened this issue Mar 13, 2019 · 2 comments
Open

Failed to extract ServerMetadata from context #167

fi0 opened this issue Mar 13, 2019 · 2 comments

Comments

@fi0
Copy link
Contributor

fi0 commented Mar 13, 2019

I've created a new project and generated 1 service.
when I run grpcurl -plaintext 0.0.0.0:3000 list, the server shows Failed to extract ServerMetadata from context

grapi 0.3.2

@onsd
Copy link

onsd commented Feb 22, 2021

To receive gRPC request, I add grapiserver.WithGrpcAddr like below.

@@ -12,6 +12,7 @@ func run() error {

        s := grapiserver.New(
                grapiserver.WithDefaultLogger(),
+               grapiserver.WithGrpcAddr("tcp","localhost:3001"),
                grapiserver.WithServers(
                // TODO
                ),

and logs

$ grapi server    
  ➜  server
  ▸  Building...
  ▸  Starting...
WARNING: Package "github.com/golang/protobuf/protoc-gen-go/generator" is deprecated.
        A future release of golang/protobuf will delete this package,
        which has long been excluded from the compatibility promise.

INFO: 2021/02/22 15:04:15 [core] parsed scheme: ""
INFO: 2021/02/22 15:04:15 gRPC server is starting 127.0.0.1:3001
INFO: 2021/02/22 15:04:15 [core] scheme "" not registered, fallback to default scheme
INFO: 2021/02/22 15:04:15 gRPC server is starting tmp/server.sock
INFO: 2021/02/22 15:04:15 [core] ccResolverWrapper: sending update to cc: {[{tmp/server.sock  <nil> 0 <nil>}] <nil> <nil>}
INFO: 2021/02/22 15:04:15 [core] ClientConn switching balancer to "pick_first"
INFO: 2021/02/22 15:04:15 [core] Channel switches to new LB policy "pick_first"
INFO: 2021/02/22 15:04:15 [core] Subchannel Connectivity change to CONNECTING
INFO: 2021/02/22 15:04:15 [core] Subchannel picks a new address "tmp/server.sock" to connect
INFO: 2021/02/22 15:04:15 [core] Channel Connectivity change to CONNECTING
INFO: 2021/02/22 15:04:15 grpc-gateway server is starting [::]:3000

then I can make request via grpcurl :)

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

3 participants
@fi0 @onsd and others