TCP proxy binds to the wrong port
pernydev
HOBBYOP

a year ago

Hey! I am trying to use https://railway.com/template/clickhouse with the ClickHouse TCP interface, but when I create a proxy and map it to 9000 it still responds with the HTTP interface. Then for testing, I mapped it to a port that should not be listened to by anyone, but it still returns with what the HTTP interface would return with.

Service: 7136ed17-8cec-4000-bd3a-b35c088256b8
Project: a0cd7638-5f0d-4b32-abfa-f25b7278c815

5 Replies

brody
EMPLOYEE

a year ago

Hello,

This is because ClickHouse has a PORT variable set, thus no matter what you have your TCP Proxy set to it will always point to PORT

You can work around this by -

  1. Updating the domain's target port to what is set via the PORT variable (in this case its 8123) - (You don't currently have a domain so you can skip this)

  2. Remove the PORT environment variable

  3. Deploy the changes so that ClickHouse redeploys


pernydev
HOBBYOP

a year ago

aha alright, thank you for this! That behavior should probably be labeled in the UI, no? I'll switch it though, ty!


brody
EMPLOYEE

a year ago

We are likely just going to fix it so that the TCP Proxy actually forwards traffic to its set port regardless of what PORT is set to, since that is the behavior everyone would and should expect


brody
EMPLOYEE

a year ago

TCP Proxy traffic being forwarded to PORT is a bug in my eyes


pernydev
HOBBYOP

10 months ago

!s


Loading...