Client V4 not instantiating with Railway template - several ports not supported

EDIT: I investigated this. It seems railway does not support having multiple ports exposed publicly, and the weaviate client requires it. Until there is a way to support all ports in grpc, I will have to use the old client which is http only. Relevant thread: How to support both grpc and http for a railway service? - Railway Help Station

hey folks! Trying to create a weaviate DB using the railway template, I believe the new client isn’t supported out of the box (or, I may be making a mistake!).
I created it with the default image

Locally, I’m trying to instantiate a client with

client = weaviate.connect_to_custom(
    http_host=<my_url>,
    http_port=443,
    http_secure=True, 
    grpc_host=<my_url>
    grpc_port=50051, # Standard gRPC port
    grpc_secure=True,
)

But I get

WeaviateGRPCUnavailableError: gRPC health check could not be completed. This could have several reasons:
        - gRPC is not enabled or incorrectly configured on the server with version v1.24.5 or the client
        - your connection is unstable or has a high latency. In this case you can:
            - increase init-timeout in `weaviate.connect_to_local(additional_config=wvc.init.AdditionalConfig(timeout=wvc.init.Timeout(init=X)))`
            - disable startup checks by connecting using `skip_init_checks=True`

I understand this can happen if my connection is slow, but if I skip the initial checks and run:

client.is_ready(), client.is_live()
(True, False)

I’m able to instantiate the client with v3, so this must be something specific to the new client, and that template?

client = weaviate.Client(<my_url>)
client.is_ready(), client.is_live()
(True, True)

Is there a simpler fix in the short term if I’m ok to not use grpc? I believe the root cause may be that railway doesn’t support grpc? Allow non-HTTP port forwarding | Voters | Railway

Hi @Baptiste_Cumin,

Technically, you could use the v3 client, which should give you access to most of the functionality, with the idea to upgrade to the v4 client at a later stage.

Please note:

  1. you will miss out on the improved performance the v4 client brings in with the gRPC implementation.
  2. also, we are not adding support for the new Weaviate features to the v3 client (like named vectors),
  3. and we are planning to deprecate the v3 client this year.

I’ve just gone ahead and done that. Is there a way to instantiate the V4 client with grpc only? Is that on your roadmap?

Hi @Baptiste_Cumin,

I am not sure I understand your question.

In general, the v4 client will use the gRPC for all functionality we implemented with gRPC (mostly replacing GraphQL) like search. However, for everything else (like creating or deleting collections), it will call the REST endpoint.
So, there is no way to get the full functionality with gRPC only.

I hope this helps.

Thanks,
Sebastian