-
Notifications
You must be signed in to change notification settings - Fork 3.9k
ComputeEngineChannelBuilder fails on App Engine #7604
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I'm not that familiar with Direct Path or App Engine, but my reading of this is that it sounds like it's a problem with the change in java-bigtable and not with gRPC itself. cc @dapengzhang0, who might have more knowledge of gRPC + Direct Path. |
I think the issue would be the same if another client library activated DirectPath by calling If I read the code path correctly, the following will be done: // from com.google.api.gax.grpc.InstantiatingGrpcChannelProvider#createSingleChannel
if (isDirectPathEnabled(serviceAddress) && credentials instanceof ComputeEngineCredentials) {
// It is now assumed we run on Compute Engine because we have an instance of ComputeEngineCredentials
// but these appear on App Engine, too.
// from io.grpc.alts.ComputeEngineChannelBuilder
if (!CheckGcpEnvironment.isOnGcp()) {
status = Status.INTERNAL.withDescription("Compute Engine Credentials can only be used on Google Cloud Platform");
}
} I think the fault here is to assume that the presence of |
Thanks for the additional info (and the very detailed original report as well). I think I understand the issue better now: the gax + java-bigtable changes now default to directly using @WeiranFang Is the change to |
For client to use @apolcyn WDYT? |
I agree it sounds like the decision to use ComputeEngineChannelBuilder may be overly aggressive in this case. Note that |
I'll note that gRPC originally wanted the client libraries to use |
Hey Jan, the fix PR has been merged and gax-java 1.60.1 has been released. Can you test if the bug is fixed? Thanks! @janhicken |
Perfect, I'm going to do that on Monday and give you a heads up |
I first tested with gax-java at When still using google-cloud-bigtable at I think it's safe to close this issue then, thanks to everyone for the quick responses! |
Hey Jan, thanks for the tests! Since release is frozen because of thanksgiving this week, we will try to have a new release of bigtable next week. |
What version of gRPC-Java are you using?
I'm using version
1.33.1
.What is your environment?
App Engine Standard Environment using Java 11.
What did you expect to see?
I am using the Java Bigtable client which sets up a gRPC connection to the Bigtable service. In GAE Java 11, the application default credentials are an instance of
ComputeEngineCredentials
, which talk to the project's metadata server to obtain auth tokens. This works fine for many client libraries, however the Bigtable client uses DirectPath since version 1.17.0 by default. This code path includes the usage of gRPC'sComputeEngineChannelBuilder
. I would expect this to work on App Engine.What did you see instead?
As the file
/sys/class/dmi/id/product_name
is not available on App Engine Standard instances, an internal error will be produced resulting in an exception when making gRPC calls.Steps to reproduce the bug
Use the Bigtable Java client with version
>= 1.17.0
. Create a client and read an example row:This results in the following stack trace:
Moreover, the following warning will be printed to the log:
The text was updated successfully, but these errors were encountered: