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

[QUESTION] Using chproxy with clickhouse-client with NodeJS #485

Open
asif-git-hub opened this issue Nov 16, 2024 · 1 comment
Open

[QUESTION] Using chproxy with clickhouse-client with NodeJS #485

asif-git-hub opened this issue Nov 16, 2024 · 1 comment

Comments

@asif-git-hub
Copy link

asif-git-hub commented Nov 16, 2024

Which feature your question relates to?
Using chproxy in a NodeJS application to run queries

Question details
I am looking for examples on using chproxy in my nodeJS application.

I am having trouble trying to query our clickhouse table via chproxy from a nodeJS (TS) server-side application:
This is how I form the client which passes the health check when I call .ping()

  client = createClient({
    url: getEnvVar("DB_URL"),
    pathname: "play",
    username: getEnvVar("DB_USERNAME"),
    password: getEnvVar("DB_PASSWORD"),
  }) 

When I try to query a table I always keep getting this error:
select * from DATABASE.TABLE LIMIT 2;

Error: There is no handle /play?query_id=c152ca33-ac4d-4288-810e-2577b45c9bfc

Use / or /ping for health checks.
Or /replicas_status for more sophisticated health checks.

Additional context/motivations
"@clickhouse/client": "^1.8.1",
The clickhouse version we are running is 24.3.5

@mga-chka
Copy link
Collaborator

mga-chka commented Feb 4, 2025

unfortunately, on the maintainer side, we're only using chproxy with scala, java and golang clients, which works well.
I don't understand what the pathname is supposed to be, did you try without it (leave it blank)?
Also, did you try directly using clickhouse, if yes, is it working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants