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

**URL:** <https://forum.weaviate.io/t/client-v4-not-instantiating-with-railway-template-several-ports-not-supported/1889>\
**Category:** Support\
**Tags:** developer-experience\
**Created:** [April 3, 2024, 7:18am UTC](https://forum.weaviate.io/t/client-v4-not-instantiating-with-railway-template-several-ports-not-supported/1889 "2024-04-03T07:18:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baptiste\_Cumin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/baptiste_cumin/32/1231_2.png) [@Baptiste\_Cumin](https://forum.weaviate.io/u/Baptiste_Cumin)\
**Post date:** [April 3, 2024, 7:18am UTC](https://forum.weaviate.io/t/client-v4-not-instantiating-with-railway-template-several-ports-not-supported/1889/1 "2024-04-03T07:18:28Z")

</div>

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](https://help.railway.app/questions/how-to-support-both-grpc-and-http-for-a-5dbb7109)

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

```auto
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

```auto
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:

```auto
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?

```auto
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](https://railway.canny.io/feature-requests/p/allow-non-http-port-forwarding)

---

<div class="post-metadata">

**Author:** ![sebawita](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sebawita/32/5_2.png) [@sebawita](https://forum.weaviate.io/u/sebawita)\
**Post date:** [April 4, 2024, 11:03am UTC](https://forum.weaviate.io/t/client-v4-not-instantiating-with-railway-template-several-ports-not-supported/1889/2 "2024-04-04T11:03:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Baptiste\_Cumin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/baptiste_cumin/32/1231_2.png) [@Baptiste\_Cumin](https://forum.weaviate.io/u/Baptiste_Cumin)\
**Post date:** [April 5, 2024, 4:46pm UTC](https://forum.weaviate.io/t/client-v4-not-instantiating-with-railway-template-several-ports-not-supported/1889/3 "2024-04-05T16:46:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sebawita](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sebawita/32/5_2.png) [@sebawita](https://forum.weaviate.io/u/sebawita)\
**Post date:** [April 8, 2024, 10:56am UTC](https://forum.weaviate.io/t/client-v4-not-instantiating-with-railway-template-several-ports-not-supported/1889/4 "2024-04-08T10:56:40Z")

</div>

Hi @Baptiste_Cumin,

I am not sure I understand your question.

> [@Baptiste\_Cumin](#):
>
> Is there a way to instantiate the V4 client with grpc only?

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
