cube icon indicating copy to clipboard operation
cube copied to clipboard

Error: Socket hang up

Open timurkh-devstark opened this issue 3 years ago • 4 comments

Problem

Hi! I have app with Cube.js version 0.33.58 and ClickHouse 23 with two environments, production and development. Recently I faced with an error when I try to query at production env:

Dropping Cache: e7d389bd-b74e-484e-aa27-046cb355cfa9-span-1

Error: socket hang up
    at QueryQueue.parseResult (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:368:13)
    at QueryQueue.executeInQueue (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:340:19)
    at /app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryCache.ts:745:17
    at QueryOrchestrator.fetchQuery (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryOrchestrator.ts:302:20)
    at OrchestratorApi.executeQuery (/app/client/node_modules/@cubejs-backend/server-core/src/core/OrchestratorApi.ts:98:20)
    at /app/client/node_modules/@cubejs-backend/api-gateway/src/gateway.ts:1434:21
    at async Promise.all (index 0)
    at ApiGateway.getSqlResponseInternal (/app/client/node_modules/@cubejs-backend/api-gateway/src/gateway.ts:1432:31)
    at /app/client/node_modules/@cubejs-backend/api-gateway/src/gateway.ts:1610:28
    at async Promise.all (index 0)
Dropping Cache: e7d389bd-b74e-484e-aa27-046cb355cfa9-span-1

Error: socket hang up
    at QueryQueue.parseResult (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:368:13)
    at QueryQueue.executeInQueue (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:340:19)
    at /app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryCache.ts:745:17
Error while renew cycle: e7d389bd-b74e-484e-aa27-046cb355cfa9-span-1
--

Error: socket hang up
    at QueryQueue.parseResult (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:368:13)
    at QueryQueue.executeInQueue (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:340:19)
    at /app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryCache.ts:745:17
Error querying db: e7d389bd-b74e-484e-aa27-046cb355cfa9-span-1
--

Error: socket hang up
    at QueryQueue.parseResult (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:368:13)
    at QueryQueue.executeInQueue (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryQueue.js:340:19)
    at /app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryCache.ts:745:17
    at QueryOrchestrator.fetchQuery (/app/client/node_modules/@cubejs-backend/query-orchestrator/src/orchestrator/QueryOrchestrator.ts:302:20)
    at OrchestratorApi.executeQuery (/app/client/node_modules/@cubejs-backend/server-core/src/core/OrchestratorApi.ts:98:20)
    at /app/client/node_modules/@cubejs-backend/api-gateway/src/gateway.ts:1434:21
    at async Promise.all (index 0)
    at ApiGateway.getSqlResponseInternal (/app/client/node_modules/@cubejs-backend/api-gateway/src/gateway.ts:1432:31)
    at /app/client/node_modules/@cubejs-backend/api-gateway/src/gateway.ts:1610:28
    at async Promise.all (index 0)

Also there are no related logs at /var/log/clickhouse-server/clickhouse-server.log and /var/log/clickhouse-server/clickhouse-server.err.log

But at development environment query is ok. Also when I try to start this query in Clickhouse native client on server its work good too.

Is it possible to get more details about this error?

timurkh-devstark avatar Sep 25 '23 11:09 timurkh-devstark

@timurkhakhalev You should check if your clickhouse restarts.

paveltiunov avatar Sep 28 '23 04:09 paveltiunov

@timurkhakhalev You should check if your clickhouse restarts.

No its not. I checked it via this function https://clickhouse.com/docs/en/sql-reference/functions/other-functions#uptime

timurkh-devstark avatar Sep 28 '23 08:09 timurkh-devstark

Btw yesterday we discuss at Slack with Igor Lukanin about this failure and I has concluded that error "socket hang up" maybe related with 5 sec timeout. Any thoughts?

timurkh-devstark avatar Sep 28 '23 08:09 timurkh-devstark

@timurkhakhalev It's misconfiguration on the Clickhouse side. There's no such setting on Cube side.

paveltiunov avatar Oct 03 '23 00:10 paveltiunov