charts-clickhouse icon indicating copy to clipboard operation
charts-clickhouse copied to clipboard

Missing CLICKHOUSE_PORT configuration

Open gajus opened this issue 3 years ago • 4 comments

Our service provider is running Clickhouse under a non-standard port (23893).

Because port configuration is missing and it defaults to 9000, at the moment we cannot configure external Clickhouse intances.

logs -n contra pod/contra-posthog-events-557f897bf6-2grrg --all-containers
contra-posthog-pgbouncer.contra.svc.cluster.local (10.8.12.49:6543) open
contra-posthog-posthog-redis-master.contra.svc.cluster.local (10.8.1.122:6379) open
contra-posthog-posthog-kafka.contra.svc.cluster.local (10.8.2.62:9092) open
Failed to connect to posthog-contra.aivencloud.com:9000

gajus avatar Jun 02 '22 00:06 gajus

Related https://github.com/PostHog/posthog/issues/9399

gajus avatar Jun 02 '22 00:06 gajus

The merged fix didn't quite work - the app is connecting to clickhouse on different ports:

  • App is using 9000 or 9443 by default depending on whether connection is secured
  • Plugin-server uses ports 8443 or 8123

We should unify those approaches first to solve this.

macobo avatar Jun 02 '22 08:06 macobo

@macobo are there any plans on getting this resolved? We're also hoping to use Clickhouse with an external provider that's not using the common Clickhouse ports. I'd be happy to help, though it's probably not the easiest task contribute to.

StijnZanders avatar Aug 23 '22 05:08 StijnZanders

cc @ellie @guidoiaquinti

I think we'll need 2 (up to 4) env variables introduced into the app:

  • CLICKHOUSE_HTTP_PORT
  • CLICKHOUSE_TCP_PORT

The defaults would depend on whether CLICKHOUSE_SECURE

See also https://altinity.com/blog/2019/3/15/clickhouse-networking-part-1

macobo avatar Aug 23 '22 06:08 macobo