Fix: use separate env var for ClickHouse native port - #3
Open
mpont91 wants to merge 1 commit into
Open
Conversation
The analytics service talks to ClickHouse over two protocols but both read CLICKHOUSE_PORT. The Dockerfile pins it to 8123 (HTTP), so the clickhouse_driver clients hit the HTTP port and fail with "Code: 102. Unexpected packet from server", leaving NAV calculated for 0 funds. Those three call sites now read CLICKHOUSE_NATIVE_PORT (default 9000). Verified locally: NAV goes from 0 to 7 funds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The analytics service talks to ClickHouse over two protocols, but both read
CLICKHOUSE_PORT:clickhouse_connectover HTTP (8123)clickhouse_driverover native TCP (9000) — innav_calculator.py,scheduler.pyandrun_all.pyThe Dockerfile pins
CLICKHOUSE_PORT=8123, so the native clients hit the HTTP port and fail:No single value works for both, so this adds
CLICKHOUSE_NATIVE_PORT(default 9000) for the three native call sites.CLICKHOUSE_PORTkeeps its HTTP meaning.Verified locally: NAV goes from 0 to 7 funds, no errors. Also applies to
deploy/docker-compose.prod.yaml, which had the same setting.