-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
I am trying to make a request to a server that is started using the grpcio Python package.
The server starts an insecure channel at "localhost:8888".
I can successfully make requests using client code in Python.
When I run gRPCClient.generate on my .proto file and try to do the same in Julia I get the following exception:
gRPCServiceCallException: 0, HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
I guess it happens around here
Reproduce
- Obtain the python example code from [this repo].(https://github.com/grpc/grpc/tree/v1.38.0/examples/python/route_guide)
- In downloaded folder
grpc/examples/protoscallgRPCClient.generateonroute_guide.proto. - Using Python (with
grpcioinstalled) startgrpc/examples/python/route_guide/route_guide_server.py - In the folder with the outputs from step 2 do
using .RouteguideClients: Point, GetFeature
p = Point(;longitude = 1, latitude = 1)
client = RouteGuideBlockingClient("localhost:50051")
feature, status = GetFeature( client, p )
gRPCCheck(status)This gives me
error: loaderror: grpcservicecallexception: 0, http/2 stream 0 was not closed cleanly: internal_error (err 2)
stacktrace:
[1] grpccheck(status::grpcstatus; throw_error::bool)
@ grpcclient ~/.julia/packages/grpcclient/v6sar/src/grpc.jl:61
[2] grpccheck(status_future::task; throw_error::bool)
@ grpcclient ~/.julia/packages/grpcclient/v6sar/src/grpc.jl:57
[3] grpccheck
@ ~/.julia/packages/grpcclient/v6sar/src/grpc.jl:57 [inlined]
[4] call_method(channel::grpcchannel, service::protobuf.servicedescriptor, method::protobuf.methoddescriptor, controller::grpccontroller, input::channel{point}, #unused#::type{main.routeguideclients.routeguide.feature})
@ grpcclient ~/.julia/packages/grpcclient/v6sar/src/grpc.jl:186
[5] call_method(channel::grpcchannel, service::protobuf.servicedescriptor, method::protobuf.methoddescriptor, controller::grpccontroller, input::channel{point})
@ grpcclient ~/.julia/packages/grpcclient/v6sar/src/grpc.jl:177
[6] call_method
@ ~/.julia/packages/grpcclient/v6sar/src/grpc.jl:175 [inlined]
[7] call_method(stub::protobuf.protoserviceblockingstub, meth::protobuf.methoddescriptor, controller::grpccontroller, request::point)
@ protobuf ~/.julia/packages/protobuf/tyedo/src/svc.jl:100
[8] getfeature
@ ~/project_dir/grpc/examples/julia/route_guide_pb.jl:236 [inlined]
[9] getfeature(client::routeguideblockingclient, inp::point)
@ main.routeguideclients ~/project_dir/grpc/examples/julia/routeguideclients.jl:49
[10] top-level scope
@ ~/project_dir/grpc/examples/julia/test_client.jl:11
in expression starting at ~/project_dir/grpc/examples/julia/test_client.jl:11
caused by: InvalidStateException("Channel is closed.", :closed)
Stacktrace:
[1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
@ Base ./task.jl:710
[2] wait
@ ./task.jl:769 [inlined]
[3] wait(c::Base.GenericCondition{ReentrantLock})
@ Base ./condition.jl:106
[4] take_unbuffered(c::Channel{Main.RouteguideClients.routeguide.Feature})
@ Base ./channels.jl:405
[5] take!
@ ./channels.jl:383 [inlined]
[6] call_method(channel::gRPCChannel, service::ProtoBuf.ServiceDescriptor, method::ProtoBuf.MethodDescriptor, controller::gRPCController, input::Channel{Point}, #unused#::Type{Main.RouteguideClients.routeguide.Feature})
@ gRPCClient ~/.julia/packages/gRPCClient/V6sAr/src/grpc.jl:184
[7] call_method(channel::gRPCChannel, service::ProtoBuf.ServiceDescriptor, method::ProtoBuf.MethodDescriptor, controller::gRPCController, input::Channel{Point})
@ gRPCClient ~/.julia/packages/gRPCClient/V6sAr/src/grpc.jl:177
[8] call_method
@ ~/.julia/packages/gRPCClient/V6sAr/src/grpc.jl:175 [inlined]
[9] call_method(stub::ProtoBuf.ProtoServiceBlockingStub, meth::ProtoBuf.MethodDescriptor, controller::gRPCController, request::Point)
@ ProtoBuf ~/.julia/packages/ProtoBuf/TYEdo/src/svc.jl:100
[10] GetFeature
@ ~/project_dir/grpc/examples/julia/route_guide_pb.jl:236 [inlined]
[11] GetFeature(client::RouteGuideBlockingClient, inp::Point)
@ Main.RouteguideClients ~/project_dir/grpc/examples/julia/RouteguideClients.jl:49
[12] top-level scope
@ ~/project_dir/grpc/examples/julia/test_client.jl:11
Output of ]st is:
Status `~/.julia/environments/v1.6/Project.toml`
[6e4b80f9] BenchmarkTools v1.1.0
[d96e819e] Parameters v0.12.2
[3349acd9] ProtoBuf v0.11.2
[295af30f] Revise v3.1.17
[aaca4a50] gRPCClient v0.1.1
Metadata
Metadata
Assignees
Labels
No labels