Dokploy/dokploy · critical · TRPCError

INTERNAL_SERVER_ERROR

INTERNAL_SERVER_ERROR

Error message

Error on deploy redis${error}

What it means

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.

Source

Thrown at packages/server/src/services/redis.ts:132

				`docker pull ${quote([redis.dockerImage])}`,
				onData,
			);
		} else {
			await pullImage(redis.dockerImage, onData);
		}

		await buildRedis(redis);
		await updateRedisById(redisId, {
			applicationStatus: "done",
		});
		onData?.("Deployment completed successfully!");
	} catch (error) {
		onData?.(`Error: ${error}`);
		await updateRedisById(redisId, {
			applicationStatus: "error",
		});

		throw new TRPCError({
			code: "INTERNAL_SERVER_ERROR",
			message: `Error on deploy redis${error}`,
		});
	}
	return redis;
};

View on GitHub (pinned to 546686ea35)

Solutions

  1. Read the appended error text and the onData stream ('Error: ...') — the real cause is embedded in the message
  2. docker pull <dockerImage> manually on the target server to verify the image tag and connectivity
  3. For remote deploys, confirm the server (serverId) is online and SSH from the Dokploy host works
  4. Check for container name/port conflicts (docker ps, ss -ltnp | grep 6379) and adjust the redis config
  5. Fix the issue and redeploy; the status resets from 'error' on the next run

Example fix

// before
await deployRedis(redisId);

// after
await deployRedis(redisId, (data) => console.log(data)).catch((e) => {
  if (e instanceof TRPCError && e.code === "INTERNAL_SERVER_ERROR") {
    console.error(`Redis deploy failed: ${e.message}`);
  }
  throw e;
});
Defensive patterns

Strategy: try-catch

Type guard

const isDeployError = (e: unknown): e is TRPCError =>
  e instanceof TRPCError && e.code === "INTERNAL_SERVER_ERROR";

Try / catch

try {
  await deployRedis(redisId, (d) => logStream.write(String(d)));
} catch (e) {
  if (isDeployError(e)) {
    // e.message contains the underlying docker/ssh error after the prefix
    notify(`Redis deploy failed: ${e.message.replace(/^Error on deploy redis/, "").trim()}`);
  }
  throw e;
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27). Data as JSON: /api/errors/e144cac83ae81b40. Report an issue: GitHub.