Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing CLICKHOUSE_PORT configuration #414

Open
gajus opened this issue Jun 2, 2022 · 4 comments · Fixed by #415
Open

Missing CLICKHOUSE_PORT configuration #414

gajus opened this issue Jun 2, 2022 · 4 comments · Fixed by #415
Labels
bug Something isn't working

Comments

@gajus
Copy link

gajus commented Jun 2, 2022

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 gajus added the bug Something isn't working label Jun 2, 2022
@gajus
Copy link
Author

gajus commented Jun 2, 2022

Related PostHog/posthog#9399

@macobo
Copy link
Contributor

macobo commented Jun 2, 2022

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.

@StijnZanders
Copy link

@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.

@macobo
Copy link
Contributor

macobo commented Aug 23, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants