首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gPRC java:‘流的窗口大小溢出: 0’

gPRC java:‘流的窗口大小溢出: 0’
EN

Stack Overflow用户
提问于 2020-10-05 04:27:21
回答 1查看 171关注 0票数 0

我的gPRC客户端应用程序收到一个'Window size overflow for stream: 0‘错误。我不能控制服务器。我尝试过使用.newStub()和.newBlockingStub()。我的Python客户端应用程序可以成功地与服务器一起工作,所以可能是Netty配置问题?

Gradle:

代码语言:javascript
复制
compile 'io.grpc:grpc-all:1.32.1'

通道/存根设置(此处无错误):

代码语言:javascript
复制
channel = NettyChannelBuilder.forAddress(hostname, port)
.usePlaintext()
.maxInboundMessageSize(32000000)
.build();
blockingStub = AuthenticationServiceGrpc.newBlockingStub(channel);

调用存根方法时出错:

代码语言:javascript
复制
15:19:33.563 [grpc-default-executor-0] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
15:19:33.563 [grpc-default-executor-0] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.targetRecords: 4
15:19:33.568 [grpc-default-executor-0] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkAccessible: true
15:19:33.569 [grpc-default-executor-0] DEBUG io.netty.buffer.AbstractByteBuf - -Dio.netty.buffer.checkBounds: true
15:19:33.569 [grpc-default-executor-0] DEBUG io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@60485942
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 32
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 32
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: true
15:19:33.612 [grpc-default-executor-0] DEBUG io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
15:19:33.636 [grpc-default-executor-0] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.processId: 3628515 (auto-detected)
15:19:33.638 [grpc-default-executor-0] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
15:19:33.638 [grpc-default-executor-0] DEBUG io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
15:19:33.639 [grpc-default-executor-0] DEBUG io.netty.util.NetUtil - Loopback interface: lo (lo, 0:0:0:0:0:0:0:1%lo)
15:19:33.640 [grpc-default-executor-0] DEBUG io.netty.util.NetUtil - /proc/sys/net/core/somaxconn: 128
15:19:33.641 [grpc-default-executor-0] DEBUG io.netty.channel.DefaultChannelId - -Dio.netty.machineId: 00:0c:29:ff:fe:64:b1:92 (auto-detected)
15:19:33.660 [grpc-default-executor-0] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
15:19:33.661 [grpc-default-executor-0] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0
15:19:33.661 [grpc-default-executor-0] DEBUG io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
15:19:33.676 [grpc-default-executor-0] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096
15:19:33.677 [grpc-default-executor-0] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2
15:19:33.677 [grpc-default-executor-0] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16
15:19:33.677 [grpc-default-executor-0] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
15:19:33.677 [grpc-default-executor-0] DEBUG io.netty.util.Recycler - -Dio.netty.recycler.delayedQueue.ratio: 8
15:19:33.704 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] OUTBOUND SETTINGS: ack=false settings={ENABLE_PUSH=0, MAX_CONCURRENT_STREAMS=0, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=8192}
15:19:33.713 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] OUTBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041
15:19:33.720 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] INBOUND SETTINGS: ack=false settings={MAX_CONCURRENT_STREAMS=2147483647, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=8192}
15:19:33.721 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] OUTBOUND SETTINGS: ack=true
15:19:33.722 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] INBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041
15:19:33.722 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] INBOUND SETTINGS: ack=true
15:19:33.723 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] INBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=2147418112
15:19:33.724 [grpc-nio-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] OUTBOUND GO_AWAY: lastStreamId=0 errorCode=3 length=34 bytes=<snip>
15:19:33.726 [grpc-nio-worker-ELG-1-2] DEBUG io.netty.handler.codec.http2.Http2ConnectionHandler - [id: 0x894fae21, L:/10.0.96.48:55684 - R:/208.92.121.158:50051] Sent GOAWAY: lastStreamId '0', errorCode '3', debugData 'Window size overflow for stream: 0'. Forcing shutdown of the connection.
Request to grpc server failed
io.grpc.StatusRuntimeException: INTERNAL: http2 exception
  at io.grpc.Status.asRuntimeException(Status.java:533)
  at io.grpc.stub.ClientCalls$BlockingResponseStream.hasNext(ClientCalls.java:648)
EN

回答 1

Stack Overflow用户

发布于 2020-10-16 10:58:20

如果您怀疑Netty配置有问题,那么您一定是尝试过Netty配置,对吧?

您是否使用与服务器相同的gRPC版本?

您是否遵循了服务器控制者的配置指令?

P.S. Scala编译成Java字节码并使用Java库。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64199564

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档