{"record":{"id":"e144cac83ae81b40","repo":"Dokploy/dokploy","slug":"internal-server-error-e144ca","errorCode":"INTERNAL_SERVER_ERROR","errorMessage":"Error on deploy redis${error}","messagePattern":"Error on deploy redis(.+?)","errorType":"exception","errorClass":"TRPCError","httpStatus":500,"severity":"critical","filePath":"packages/server/src/services/redis.ts","lineNumber":132,"sourceCode":"\t\t\t\t`docker pull ${quote([redis.dockerImage])}`,\n\t\t\t\tonData,\n\t\t\t);\n\t\t} else {\n\t\t\tawait pullImage(redis.dockerImage, onData);\n\t\t}\n\n\t\tawait buildRedis(redis);\n\t\tawait updateRedisById(redisId, {\n\t\t\tapplicationStatus: \"done\",\n\t\t});\n\t\tonData?.(\"Deployment completed successfully!\");\n\t} catch (error) {\n\t\tonData?.(`Error: ${error}`);\n\t\tawait updateRedisById(redisId, {\n\t\t\tapplicationStatus: \"error\",\n\t\t});\n\n\t\tthrow new TRPCError({\n\t\t\tcode: \"INTERNAL_SERVER_ERROR\",\n\t\t\tmessage: `Error on deploy redis${error}`,\n\t\t});\n\t}\n\treturn redis;\n};\n","sourceCodeStart":114,"sourceCodeEnd":139,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/packages/server/src/services/redis.ts#L114-L139","documentation":"deployRedis wraps the whole deployment pipeline (status update -> docker pull on local or remote server via execAsyncRemote -> buildRedis) in a try/catch. Any failure rethrows as INTERNAL_SERVER_ERROR with the raw error appended to 'Error on deploy redis'. The redis row is also marked applicationStatus 'error' before throwing.","triggerScenarios":"docker pull of redis.dockerImage failing (bad image tag, no network, registry auth), remote server unreachable via execAsyncRemote (SSH down, serverId stale), or buildRedis failing to create/start the redis container (port conflicts, name conflicts, invalid config).","commonSituations":"Custom dockerImage set to a nonexistent tag, remote server offline or SSH credentials rotated, port 6379 already bound on the host, or docker daemon not running on the target server.","solutions":["Read the appended error text and the onData stream ('Error: ...') — the real cause is embedded in the message","docker pull <dockerImage> manually on the target server to verify the image tag and connectivity","For remote deploys, confirm the server (serverId) is online and SSH from the Dokploy host works","Check for container name/port conflicts (docker ps, ss -ltnp | grep 6379) and adjust the redis config","Fix the issue and redeploy; the status resets from 'error' on the next run"],"exampleFix":"// before\nawait deployRedis(redisId);\n\n// after\nawait deployRedis(redisId, (data) => console.log(data)).catch((e) => {\n  if (e instanceof TRPCError && e.code === \"INTERNAL_SERVER_ERROR\") {\n    console.error(`Redis deploy failed: ${e.message}`);\n  }\n  throw e;\n});","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"const isDeployError = (e: unknown): e is TRPCError =>\n  e instanceof TRPCError && e.code === \"INTERNAL_SERVER_ERROR\";","tryCatchPattern":"try {\n  await deployRedis(redisId, (d) => logStream.write(String(d)));\n} catch (e) {\n  if (isDeployError(e)) {\n    // e.message contains the underlying docker/ssh error after the prefix\n    notify(`Redis deploy failed: ${e.message.replace(/^Error on deploy redis/, \"\").trim()}`);\n  }\n  throw e;\n}","preventionTips":["Pre-pull the docker image on the target server to validate tags/connectivity","Monitor via the onData callback; the root error is streamed there before the throw","Keep remote servers' SSH access and docker daemon healthy"],"tags":["dokploy","redis","docker","deployment","remote-server"],"backgroundTag":"docker-deployment-failed","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}