Connect to Weaviate instance WITHOUT grpc

I want to connect to my old weaviate instance. However, in its current settings, it doesn’t have a load balancer with grpc configured, so i want to do it without grpc.

I want to connect to it via “weaviate-client”: “^3.1.4”.

Is there a way to tell the client to connect WITHOUT grpc?

I tried doing this:

          this.client = await weaviate.connectToCustom({
            httpHost: config.weaviate.httpHost,
            httpPort: config.weaviate.httpPort,
            httpSecure: true,
            authCredentials: new weaviate.ApiKey(config.weaviate.apiKey),
          });

While it passes the health/live check, i get this error:
Query call with protocol gRPC failed with message: /weaviate.v1.Weaviate/Search UNKNOWN: extract auth: oidc auth is not configured, please try another auth scheme or set up weaviate with OIDC configured

I can confirm that config.weaviate.apiKey is the correct api key.

Hey, then you need to use the old typescript client (v2). V3 only works with GRPC

Thank you so much for the clarification.

For me it was not clear whether grpc was mandatory for the client, i thought it preferred grpc over http.

What mislead me was, the fact that grpcHost was optional in ConnectToCustomOptions and that with the configuration above, it passed the ready & live checks. (I am aware that ready and live checks are for the server, not client. But i said to myself, “if the client can initialize & connect & even do ready checks with this configuration, it should be good to go”.

In this case, wouldn’t it be semantically more correct to make the grpcHost parameter in ConnectToCustomOptions mandatory? Am i missing something? I’d be glad to send a pr for this. Moreover, httpHost parameter could be mandatory as well.

Another solution would be making a fallback mechanism. I’d be glad to help prepare a pr for that as well, but obviously that’d take more time.

For v3 GRPC is mandatory and most functionality does not work without it. It is a complete rewrite from v2 and it is not possible to fall back on http/REST/GQL.

I will pass on your feedback to the TS client dev :slight_smile:

1 Like