Grpc Server not working: Exception: "Received RST_STREAM with error code 8".

4,093 views
Skip to first unread message

matthia...@googlemail.com

unread,
Feb 15, 2017, 7:39:21 AM2/15/17
to grpc.io
Hi,
I am integrating currently gRPC C# into a program which uses several third party libraries.
Thus it is also forced to use x86/32 bit.
When calling even a trivial server implementation I receive "Received RST_STREAM with error code 8".
The full stack can be found below.

The used Nuget packages for gRPC are
  <package id="Google.Protobuf" version="3.2.0" targetFramework="net461" />
  <package id="Grpc.Core" version="1.1.0" targetFramework="net461" />
 <package id="System.Interactive.Async" version="3.1.1" targetFramework="net461" />


Could you point me into a direction to debug the issue?
I tried set 
[Environment]::SetEnvironmentVariable("GRPC_TRACE", "all", "User")
[Environment]::SetEnvironmentVariable("GRPC_VERBOSITY", "DEBUG", "User)
but it did not help.

The stack trace is...

Grpc.Core.RpcException was unhandled
  HResult=-2146233088
  Message=Status(StatusCode=Cancelled, Detail="Received RST_STREAM with error code 8")
  Source=mscorlib
  StackTrace:
       bei System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       bei Grpc.Core.Internal.AsyncCall`2.UnaryCall(TRequest msg)
       bei Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse](CallInvocationDetails`2 call, TRequest req)
       bei Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
       bei Grpc.Core.Internal.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
       bei ServiceDefinitionClient.Logout(LogoutRequest request, CallOptions options) in ServiceDefinitionGrpc.cs:Zeile 287.
       bei Logout(LogoutRequest request, Metadata headers, Nullable`1 deadline, CancellationToken cancellationToken) in C:\Users\Dell\Documents\GitHub\ServiceDefinitionGrpc.cs:Zeile 283.
       bei Program.Main(String[] args) in Program.cs:Zeile 17.
       bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       bei System.Threading.ThreadHelper.ThreadStart()


Carl Mastrangelo

unread,
Feb 21, 2017, 7:42:01 PM2/21/17
to grpc.io, matthia...@googlemail.com
What do you see server side?

matthia...@googlemail.com

unread,
Feb 28, 2017, 11:42:14 AM2/28/17
to grpc.io, matthia...@googlemail.com
Unfortunately I see nothing server side - I have unfortunately no idea what I can do.
I was first suspecting that the error was due to an overload as I am doing some CPU prone stuff, but now I am receiving the error in another service which is relatively small.
Could you advise me how I can trace the interop between C# and the native C library? 

matthia...@googlemail.com

unread,
Feb 28, 2017, 11:44:04 AM2/28/17
to grpc.io, matthia...@googlemail.com
The odd part is also that it works fine in my Windows 10 dev box, but does not work on my Windows Server 2012.

Craig Tiller

unread,
Feb 28, 2017, 11:54:43 AM2/28/17
to matthia...@googlemail.com, grpc.io
HTTP2 error code 8 is cancellation... it could be that we're botching application signalling/user messaging on this.

Are you cancelling requests server side?

On Tue, Feb 28, 2017 at 8:44 AM matthias.weiser via grpc.io <grp...@googlegroups.com> wrote:
The odd part is also that it works fine in my Windows 10 dev box, but does not work on my Windows Server 2012.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/dffbe931-aaa9-4fcd-ad76-bf58b860c9e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

matthia...@googlemail.com

unread,
Mar 1, 2017, 3:41:00 AM3/1/17
to grpc.io, matthia...@googlemail.com
No special processing on the server side.
It seems I can fix the issue if I bind both localhost and the machine IP when starting the gRPC server. 
In 1.0.0 it was sufficient to use only the machine IP.
I will need to do some further testing to confirm this.

matthia...@googlemail.com

unread,
Mar 1, 2017, 6:43:26 AM3/1/17
to grpc.io, matthia...@googlemail.com
I think that the issue was on my end. 
I did not realize that I need to propagate the assemblyBinding changes in the .exe.config.
Reply all
Reply to author
Forward
0 new messages