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

Intermittent Issues in using polyglot with reflection #125

Open
sowmyasharmas opened this issue Jun 8, 2022 · 0 comments
Open

Intermittent Issues in using polyglot with reflection #125

sowmyasharmas opened this issue Jun 8, 2022 · 0 comments

Comments

@sowmyasharmas
Copy link

sowmyasharmas commented Jun 8, 2022

I am experiencing intermittent issues when using reflection, the same call fails within seconds of each other. The request does not make it to the service. Without reflection, it works great.

Successful Call
`C:\Users...\Downloads\beatswithcustom>java -jar C:\Users...\programs\polyglot.jar --use_reflection=true call --endpoint=localhost:8082 --full_method=com.api.alpha.template.grpc.StringUtilityService/ConvertToUpperCase --use_tls=false
[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: localhost:8082
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/.../programs/polyglot.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[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
{"value":"Hello"}

[main] INFO me.dinowernli.grpc.polyglot.command.ServiceCall - Making rpc with 1 request(s) to endpoint [localhost:8082]
[main] INFO me.dinowernli.grpc.polyglot.grpc.DynamicGrpcClient - Making unary call
[grpc-default-executor-1] INFO me.dinowernli.grpc.polyglot.io.LoggingStatsWriter - Got response message
{
"result": "HELLO"
}

[grpc-default-executor-1] INFO me.dinowernli.grpc.polyglot.io.LoggingStatsWriter - Completed rpc with 1 response(s)`

Failed Call
`

C:\Users...\Downloads\beatswithcustom>java -jar C:\Users...\programs\polyglot.jar --use_reflection=true call --endpoint=localhost:8082 --full_method=com.api.alpha.template.grpc.StringUtilityService/ConvertToUpperCase --use_tls=false
[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: localhost:8082
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/.../programs/polyglot.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[main] WARN me.dinowernli.grpc.polyglot.Main - Caught top-level exception during command execution
java.lang.RuntimeException: Unable to resolve service by invoking protoc
at me.dinowernli.grpc.polyglot.command.ServiceCall.callEndpoint(ServiceCall.java:88)
at me.dinowernli.grpc.polyglot.Main.main(Main.java:63)
Caused by: java.lang.IllegalArgumentException: A proto discovery root is required for proto analysis
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at me.dinowernli.grpc.polyglot.protobuf.ProtocInvoker.forConfig(ProtocInvoker.java:37)
at me.dinowernli.grpc.polyglot.command.ServiceCall.callEndpoint(ServiceCall.java:85)
... 1 more
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to resolve service by invoking protoc
at me.dinowernli.grpc.polyglot.Main.main(Main.java:79)
Caused by: java.lang.RuntimeException: Unable to resolve service by invoking protoc
at me.dinowernli.grpc.polyglot.command.ServiceCall.callEndpoint(ServiceCall.java:88)
at me.dinowernli.grpc.polyglot.Main.main(Main.java:63)
Caused by: java.lang.IllegalArgumentException: A proto discovery root is required for proto analysis
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at me.dinowernli.grpc.polyglot.protobuf.ProtocInvoker.forConfig(ProtocInvoker.java:37)
at me.dinowernli.grpc.polyglot.command.ServiceCall.callEndpoint(ServiceCall.java:85)
... 1 more`

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

1 participant