a year ago
I'm trying to set up weaviate on railway. Since their migration to the v4 client, I cannot instantiate a python client. This seems to be because it requires both a grpc and an http host and port.
import weaviate
client = weaviate.connecttocustom(
httphost=, httpport=,
httpsecure=True, grpchost=,
grpcport=, grpcsecure=True,
)
This times out. I've tried using a TCP proxy as per the advice here. https://www.answeroverflow.com/m/1178132082157961367
But it only exposes one host and port, so I can't figure out how to provide both http and grpc ports. Weaviate enforces that they be different.
18 Replies
a year ago
I think so? The deployment logs of the service itself show
grpc server listening at [::]:50051
Serving weaviate at http://[::]:8080
And the railway tcp proxy shows:
:port => another_port
I'm not sure where to go from here, I've tried all possible combinations of the 4 ports and the TCP host.
a year ago
Okay good to know, unfortunately you can't expose multiple ports publicly at the same time.
Your options would be to proxy one of those ports out into another service, or if possible use the private network to connect to them.
a year ago
Ah gotcha - thank you Brody! Is there a recommended straight forward way to spin up a second service as a proxy, connecting to the same underlying DB? Do you know if it's on the roadmap to expose multiple ports at the same time?
I believe the private network wouldn't quite work since i need to connect to it locally for debugging etc (unless I set up a vpn for the railway private network? i haven't investigated deeply if that's easily feasible).
Thank you again! Saves me a lot of headaches, it's very appreciated.
a year ago
I'm not sure why the proxy would need to connect to the database.
But this template will get you most of the way there, you will need to tweak the Caddyfile slightly -
https://railway.app/template/7uDSyj
Do you know if it's on the roadmap to expose multiple ports at the same time?
Yes this would be on the verbal only roadmap, so no ETA there.
7 months ago
Hello,
I’m in the same situation
—I need to connect to Weaviate locally for debugging, but I can’t seem to connect to the gRPC service.
I've even configured Caddy as a proxy, but it's still not working.
Do you have any suggestions on how to resolve this?
7 months ago
gRPC is HTTP/2.
Both our proxy, and Caddy will demux down to HTTP/1.1 thus breaking gRPC.
brody
gRPC is HTTP/2.Both our proxy, and Caddy will demux down to HTTP/1.1 thus breaking gRPC.
4 months ago
I’m coming back to this bug, how can I call Weaviate locally then?
brody
gRPC is HTTP/2.Both our proxy, and Caddy will demux down to HTTP/1.1 thus breaking gRPC.
4 months ago
are you planing to support HTTP/2 to HTTP/2 in near future?
avgust13
are you planing to support HTTP/2 to HTTP/2 in near future?
4 months ago
We have no immediate plans.
brody
We have no immediate plans.
4 months ago
any rough estimations?
4 months ago
No sorry, I don't think we have it in our roadmap.
You can always use the TCP Proxy, TCP Proxy just forwards TCP packets and doesn't have any concept of HTTP.
Since the 10 months ago, you can now have a TCP Proxy and a domain on the same service, and you can now also have multiple domains on the same service that all point to different ports.
4 months ago
yes, but pointing different domain to gRPC port, I get this error when trying to connect to it
upstreamProto:"HTTP/1.1"
downstreamProto:"HTTP/2.0"
responseDetails:"failed to forward request to upstream: received an unexpected or malformed response from the upstream server"
or, there is another workaround I don't see?
4 months ago
I mentioned previously that you would have to use the TCP Proxy for gRPC.
I should also mention, if the service that connects via gRPC is deployed into the same environment, you can use the private network as there are no protocol limitations on the private network.
4 months ago
with TCP proxy I get this error:
AioRpcError: <AioRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "failed to connect to all addresses; last error: UNIMPLEMENTED: ipv4:35.213.179.112:45985: Trying to connect an http1.x server (HTTP status 404)" debug_error_string = "UNKNOWN:Error received from peer {created_time:"2025-01-22T05:35:29.0605967+00:00", grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNIMPLEMENTED: ipv4:35.213.179.112:45985: Trying to connect an http1.x server (HTTP status 404)"}" >
...
- Please check that the server address and port (autorack.proxy.rlwy.net:45985) are correct.
4 months ago
I recreated container telnet was able to connect to it, but its http/1
junction.proxy.rlwy.net:55946