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

Channel closed while performing protocol negotiation #2962

Closed
prvsousa opened this issue May 1, 2017 · 4 comments
Closed

Channel closed while performing protocol negotiation #2962

prvsousa opened this issue May 1, 2017 · 4 comments

Comments

@prvsousa
Copy link

prvsousa commented May 1, 2017

Please answer these questions before submitting your issue.

What version of gRPC are you using?

What JVM are you using (java -version)?

java version "1.8.0_131"

What did you do?

If possible, provide a recipe for reproducing the error.
If I do:
➔ ./run-test-server.sh
and then,
➔ ./run-test-client.sh --server_port=8080

Gradle is no longer run automatically. Make sure to run
'./gradlew installDist -PskipCodegen=true' or
'./gradlew :grpc-interop-testing:installDist -PskipCodegen=true' after any
changes. -PskipCodegen=true is optional, but requires less setup.
Running test empty_unary
Exception in thread "main" io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:227)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:208)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:141)
at io.grpc.testing.integration.TestServiceGrpc$TestServiceBlockingStub.emptyCall(TestServiceGrpc.java:463)
at io.grpc.testing.integration.AbstractInteropTest.emptyUnary(AbstractInteropTest.java:273)
at io.grpc.testing.integration.TestServiceClient.runTest(TestServiceClient.java:209)
at io.grpc.testing.integration.TestServiceClient.run(TestServiceClient.java:197)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:81)
Shutting down

What did you expect to see?

What did you see instead?

The error:

Gradle is no longer run automatically. Make sure to run
'./gradlew installDist -PskipCodegen=true' or
'./gradlew :grpc-interop-testing:installDist -PskipCodegen=true' after any
changes. -PskipCodegen=true is optional, but requires less setup.
Running test empty_unary
Exception in thread "main" io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:227)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:208)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:141)
at io.grpc.testing.integration.TestServiceGrpc$TestServiceBlockingStub.emptyCall(TestServiceGrpc.java:463)
at io.grpc.testing.integration.AbstractInteropTest.emptyUnary(AbstractInteropTest.java:273)
at io.grpc.testing.integration.TestServiceClient.runTest(TestServiceClient.java:209)
at io.grpc.testing.integration.TestServiceClient.run(TestServiceClient.java:197)
at io.grpc.testing.integration.TestServiceClient.main(TestServiceClient.java:81)
Shutting down

@ejona86
Copy link
Member

ejona86 commented May 1, 2017

The server-side says:

Using fake CA for TLS certificate. Test clients should expect host
*.test.google.fr and our test CA. For the Java test client binary, use:
--server_host_override=foo.test.google.fr --use_test_ca=true

Running ./run-test-client.sh --server_port=8080 --server_host_override=foo.test.google.fr --use_test_ca=true succeeds.

I'm not sure why there isn't more error information included.

@prvsousa
Copy link
Author

prvsousa commented May 1, 2017

Ok I got this. Thanks.

Can I test a script from a true CA? Instead of localhost a self-signed certificate in this library?

I would like to establish a communication between server-client validating the certificates (which I already have and generated based on easypki by google) in a CA. Does this library support this? If so, how can I do it?

Thank you.

@prvsousa
Copy link
Author

prvsousa commented May 1, 2017

I ask this because this library only generates traffic in localhost, so, means that it does not test on a true CA in the network.

@ejona86
Copy link
Member

ejona86 commented May 2, 2017

The default host is simply localhost. You can change the hostname via --server_host. If you don't use --use_test_ca=true, then it will use the default root CAs.

To use a publicly-trusted certificate, you would need to modify the server or use grpc-test.sandbox.googleapis.com: ./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_port=443 .

@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants