grpc-ecosystem / grpc-ecosystem/polyglot

Polyglot just exits without any error

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
535
Forks
59
PR merge metrics
No merged PRs in 30d

Description

I've tried both polyglot version 1.6.0 and 2.0.0
I'm on Windows 10, and am using git-bash (shell).
I can't seem for the life of me to get polyglot to work at all, it just exits without any error.

The server I am running this against works just fine and is able to receive and respond to grpc calls from a golang process and also receive curl calls through a grpc-gateway.

Here are some examples:
In git-bash shell with 1.6.0:
```bash
MinGW 11:19:31 ~/workspace/go/src/xxx/xxx$ echo '{"rid":"abc123"}' | java -jar "C:\\Users\\xxx\\programs\\bin\\polyglot.jar" --add_protoc_includes=./include,./vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis,./vendor/github.com/grpc-ecosystem/grpc-gateway --proto_discovery_root=./services/proto --command=call --endpoint=127.0.0.1:25051 --full_method=xxx.XXX/GetBlah
[main] INFO me.dinowernli.grpc.polyglot.Main - Polyglot version: 1.6.0
[main] INFO me.dinowernli.grpc.polyglot.Main - Loaded configuration:
[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Creating channel to: 127.0.0.1:25051
[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Using proto descriptors fetched by reflection
[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Creating dynamic grpc client
MinGW 11:19:57 ~/workspace/go/src/xxx/xxx$
```
Here with 2.0.0:
```bash
MinGW 10:35:49 ~/workspace/go/src/xxx/xxx$ echo '{"rid":"abc123"}' | java -Dorg.slf4j.simpleLogger.defaultLogLevel=debug -jar "C:\\Users\\xxx\\programs\\bin\\polyglot.jar" --add_protoc_includes="./include,./vendor/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis,./vendor/github.com/grpc-ecosystem/grpc-gateway" --proto_discovery_root="./services/proto" --use_reflection=false call --endpoint="127.0.0.1:25051" --full_method="xxx.XXX/GetStuff"
[main] INFO me.dinowernli.grpc.polyglot.Main - Polyglot version: 2.0.0
[main] INFO me.dinowernli.grpc.polyglot.Main - Loaded configuration:
[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Creating channel to: 127.0.0.1:25051
[main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework
[main] DEBUG io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 16
[main] DEBUG io.netty.util.internal.PlatformDependent - Platform: Windows
[main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
[main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 8
[main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - direct buffer constructor: available
[main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
[main] DEBUG io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
[main] DEBUG io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.(long, int): available
[main] DEBUG io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\xxx\AppData\Local\Temp (java.io.tmpdir)
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 32 (sun.arch.data.model)
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: 259522560 bytes
[main] DEBUG io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
[main] DEBUG io.netty.util.internal.CleanerJava6 - java.nio.ByteBuffer.cleaner(): available
[main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
[main] DEBUG io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
[main] DEBUG io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Using proto descriptors obtained from protoc
[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Creating dynamic grpc client
MinGW 10:35:54 ~/workspace/go/src/xxx/xxx$ echo $?
1
MinGW 10:35:58 ~/workspace/go/src/xxx/xxx$
```

The server itself doesn't show any logs or calls received/attempted when polyglot has reflection turned off.
When polyglot is using reflection, the server does show reflection grpc calls, but still doesn't show the actual grpc call I am trying to make.

What on earth am I doing wrong?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided `java -jar polyglot.jar` `call` commands on Windows 10 with git-bash, comparing versions 1.6.0 and 2.0.0 and both reflection modes. Use the reported endpoint, full methods, and input, then trace the command from `call` through the dynamic gRPC client; done means the invocation no longer exits silently and reports or completes the attempted call.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, java, shell
Domain
api, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.