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

Bigtable client connection issue from GKE #1837

Open
Naidile-P-N opened this issue Jul 12, 2023 · 3 comments
Open

Bigtable client connection issue from GKE #1837

Naidile-P-N opened this issue Jul 12, 2023 · 3 comments
Labels
api: bigtable Issues related to the googleapis/java-bigtable API.

Comments

@Naidile-P-N
Copy link

Naidile-P-N commented Jul 12, 2023

What version of gRPC-Java are you using?
1.55.1

What is your environment?
OS -On GKE - Linux[gke-os-distribution - cos]
JDK 15 with maven

What did you expect to see?
Connect to Bigtable instance in the same GCP project from the application.
I'm able to connect to Bigtable using my account running in local environment.

What did you see instead?
Connection to bigtable fails with exception at this line

val settings: BigtableDataSettings =
                BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId).build()
val client = BigtableDataClient.create(settings)

Dependency used

<dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-bigtable</artifactId> <version>2.24.1</version> </dependency>

Steps to reproduce the bug

  1. Deploy the service in GKE
  2. Attempt to connect to Bigtable

Caused by: java.lang.IllegalStateException: Default config is invalid: Status{code=UNKNOWN, description=None of [grpclb] specified by Service Config are available., cause=null} at com.google.common.base.Preconditions.checkState(Preconditions.java:590) at io.grpc.internal.ManagedChannelImpl.<init>(ManagedChannelImpl.java:642) at io.grpc.internal.ManagedChannelImplBuilder.build(ManagedChannelImplBuilder.java:631) at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:297) at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:391) at com.google.api.gax.grpc.ChannelPool.<init>(ChannelPool.java:107) at com.google.api.gax.grpc.ChannelPool.create(ChannelPool.java:85) at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:237) at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:231) at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:201) at com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub.create(EnhancedBigtableStub.java:175) at com.google.cloud.bigtable.data.v2.BigtableDataClient.create(BigtableDataClient.java:165)

Note : Error still persists after modifications to service account and workload identity setup

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Jul 12, 2023
@Naidile-P-N
Copy link
Author

grpc/grpc-java#10377

@Naidile-P-N
Copy link
Author

  • tried adding the below service configurations and the issue still persists
META-INF/services/
META-INF/services/io.grpc.LoadBalancerProvider
META-INF/services/io.grpc.NameResolverProvider

@Naidile-P-N
Copy link
Author

Naidile-P-N commented Jul 15, 2023

I finally resolved the error by modifying the files as below and enabling attemptDirectPathXds during Bigtable client creation.

Is this approach right to use in production ? Or will there be any fixes or updates made in the google-cloud-bigtable package ?


io.grpc.LoadBalancerProvider

io.grpc.internal.PickFirstLoadBalancerProvider
io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider
io.grpc.util.OutlierDetectionLoadBalancerProvider
io.grpc.grpclb.GrpclbLoadBalancerProvider
io.grpc.xds.ClusterManagerLoadBalancerProvider
io.grpc.xds.ClusterResolverLoadBalancerProvider
io.grpc.xds.CdsLoadBalancerProvider
io.grpc.xds.PriorityLoadBalancerProvider
io.grpc.xds.ClusterImplLoadBalancerProvider
io.grpc.xds.WrrLocalityLoadBalancerProvider
io.grpc.xds.WeightedTargetLoadBalancerProvider
io.grpc.xds.WeightedRoundRobinLoadBalancerProvider
io.grpc.xds.RingHashLoadBalancerProvider
io.grpc.xds.LeastRequestLoadBalancerProvider
io.grpc.rls.RlsLoadBalancerProvider
io.grpc.protobuf.services.internal.HealthCheckingRoundRobinLoadBalancerProvider

io.grpc.NameResolverProvider

io.grpc.googleapis.GoogleCloudToProdExperimentalNameResolverProvider
io.grpc.googleapis.GoogleCloudToProdNameResolverProvider
io.grpc.xds.XdsNameResolverProvider
io.grpc.internal.DnsNameResolverProvider
io.grpc.grpclb.SecretGrpclbNameResolverProvider$Provider
io.grpc.netty.shaded.io.grpc.netty.UdsNameResolverProvider

gcf-owl-bot bot added a commit that referenced this issue Jul 27, 2023
…p/templates/java_library/.kokoro (#1837)

build(deps): bump certifi

Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22.
- [Commits](certifi/python-certifi@2023.05.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@d85e1d6
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:3a95f1b9b1102865ca551b76be51d2bdb850900c4db2f6d79269e7af81ac8f84
kolea2 pushed a commit that referenced this issue Jul 27, 2023
…p/templates/java_library/.kokoro (#1837) (#1864)

build(deps): bump certifi

Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.5.7 to 2023.7.22.
- [Commits](certifi/python-certifi@2023.05.07...2023.07.22)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: indirect
...



Source-Link: googleapis/synthtool@d85e1d6
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:3a95f1b9b1102865ca551b76be51d2bdb850900c4db2f6d79269e7af81ac8f84

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API.
Projects
None yet
Development

No branches or pull requests

1 participant