PluginBench
Skill
Official
Pass
Audit score 90

clickhouse-js-node-troubleshooting

clickhouse/agent-skills

Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client).

What is clickhouse-js-node-troubleshooting?

This skill diagnoses and fixes problems specific to the ClickHouse Node.js client (@clickhouse/client) running in Node.js environments. Use it when encountering socket errors, connection drops, data type mismatches, TLS issues, compression problems, or other client-specific failures—including in Next.js Node runtime, React Server Components, and standard Node processes.

  • Diagnose socket hang-up, ECONNRESET, and connection timeout issues
  • Resolve data type mismatches (large integers as strings, decimal precision, UUID insertion)
  • Fix read-only user errors with response compression
  • Troubleshoot proxy and pathname URL configuration problems
  • Debug TLS/certificate handshake and mutual TLS setup
  • Enable and verify GZIP compression for requests and responses

How to install clickhouse-js-node-troubleshooting

npx skills add https://github.com/clickhouse/agent-skills --skill clickhouse-js-node-troubleshooting
Prerequisites
  • @clickhouse/client package installed in a Node.js runtime (not browser or Edge runtime)
  • Access to ClickHouse server logs and client error messages
  • Knowledge of your ClickHouse server configuration (TLS, compression, user permissions)
Claude Code
Cursor
Windsurf
Cline

How to use clickhouse-js-node-troubleshooting

  1. 1.Identify your symptom in the Issue Index (socket errors, data type problems, TLS issues, etc.)
  2. 2.Read the corresponding reference file for detailed diagnosis and steps
  3. 3.Check if the fix requires a minimum client version; ask the user for their version if needed
  4. 4.Apply the recommended configuration or code changes
  5. 5.Test the fix with a simple query or operation to verify resolution

Use cases

Good for
  • Fixing intermittent connection drops or socket hang-up errors in production Node.js services
  • Resolving data insertion failures when types don't match expected formats
  • Debugging TLS certificate verification failures in secure ClickHouse connections
  • Enabling compression for large query responses to reduce bandwidth
  • Configuring ClickHouse client behind a proxy with path prefixes
Who it's for
  • Node.js backend developers
  • Next.js API route and Server Component developers
  • DevOps engineers troubleshooting ClickHouse client connectivity
  • Full-stack developers integrating ClickHouse into Node.js applications

clickhouse-js-node-troubleshooting FAQ

Does this skill work with the browser client (@clickhouse/client-web)?

No. This skill covers @clickhouse/client in Node.js runtime only. For browser, Web Workers, Next.js Edge runtime, or Cloudflare Workers, use @clickhouse/client-web instead.

What if my error isn't listed in the Issue Index?

Check the ClickHouse JS client source code and examples at https://github.com/ClickHouse/clickhouse-js/tree/main/examples, or consult the official ClickHouse JavaScript integration docs.

How do I know which version of @clickhouse/client I have?

Run `npm list @clickhouse/client` in your project directory to see the installed version. Some fixes are version-dependent, so this may be needed for troubleshooting.

Can this skill help with browser or Edge runtime issues?

No. This skill is for Node.js runtime only. For browser, Next.js Edge runtime, or Cloudflare Workers, use @clickhouse/client-web and consult its documentation.

What should I do if compression or TLS setup is still failing after following the steps?

Check your ClickHouse server configuration (TLS certificates, compression settings, user permissions), verify network connectivity, and review server logs for corresponding errors.

Full instructions (SKILL.md)

Source of truth, from clickhouse/agent-skills.


name: clickhouse-js-node-troubleshooting description: > Troubleshoot and resolve common issues with the ClickHouse Node.js client (@clickhouse/client). Use this skill whenever a user reports errors, unexpected behavior, or configuration questions involving the Node.js client specifically — including socket hang-up errors, Keep-Alive problems, stream handling issues, data type mismatches, read-only user restrictions, proxy/TLS setup problems, or long-running query timeouts. Trigger even when the user hasn't precisely named the issue; vague symptoms like "my inserts keep failing" or "connection drops randomly" in a Node.js context are strong signals to use this skill. Do NOT use for browser/Web client issues.

ClickHouse Node.js Client Troubleshooting

Reference: https://clickhouse.com/docs/integrations/javascript

⚠️ Node.js runtime only. This skill covers the @clickhouse/client package running in a Node.js runtime exclusively — including Next.js Node runtime API routes, React Server Components, Server Actions, and standard Node.js processes. Do not apply this skill to browser client components, Web Workers, Next.js Edge runtime, Cloudflare Workers, or any usage of @clickhouse/client-web. For browser/edge environments, the correct package is @clickhouse/client-web.


How to Use This Skill

  1. Identify the issue — match symptoms to the Issue Index below and read the corresponding reference file.
  2. Lead with the diagnosis — explain what's likely causing the issue before giving the fix.
  3. Note version constraints — flag if a fix requires a minimum client version and check it against what the user provided.
  4. Ask only what's missing — if the fix is version-dependent and you don't know their version, ask; otherwise help immediately.

Issue Index

Identify the user's issue from the list below and read the corresponding reference file for detailed troubleshooting steps.

IssueSymptomsReference file
Socket Hang-Up / ECONNRESETsocket hang up, ECONNRESET, intermittent connection drops, long-running queries timing outreference/socket-hangup.md
Data Type MismatchesLarge integers returned as strings, decimal precision loss, Date/DateTime insertion failures, CANNOT_PARSE_INPUT_ASSERTION_FAILED inserting a UUID into a UInt128 columnreference/data-types.md
Read-Only User ErrorsErrors when using response compression with readonly=1 usersreference/readonly-users.md
Proxy / Pathname URL ConfusionWrong database selected, requests failing behind a proxy with a path prefixreference/proxy-pathname.md
TLS / Certificate ErrorsTLS handshake failures, certificate verification issues, mutual TLS setupreference/tls.md
Compression Not WorkingGZIP compression not activating for requests or responsesreference/compression.md
Logging Not Showing AnythingNo log output, need custom logger integrationreference/logging.md
Query Parameters Not InterpolatedParameterized queries not working, SQL injection concernsreference/query-params.md
FORMAT Clause / SHOW POLICIES ErrorsSyntax error from a duplicate FORMAT, or SHOW [ROW] POLICIES failing even with a format providedreference/query-format-clause.md

Still Stuck?