{"record":{"id":"3ac8eb0731b0e3ab","repo":"appsmithorg/appsmith","slug":"redis-url-not-found-please-check-appsmith-redis-u","errorCode":null,"errorMessage":"Redis URL not found. Please check APPSMITH_REDIS_URL configuration.","messagePattern":"Redis URL not found\\. Please check APPSMITH_REDIS_URL configuration\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"app/client/packages/rts/src/ctl/enable_form_login.ts","lineNumber":15,"sourceCode":"import * as utils from \"./utils\";\n\nexport async function run() {\n  const dbUrl = utils.getDburl();\n  const redisUrl = utils.getRedisUrl();\n\n  // Validate required configuration\n  if (!dbUrl) {\n    throw new Error(\n      \"Database URL not found. Please check APPSMITH_DB_URL or APPSMITH_MONGODB_URI configuration.\",\n    );\n  }\n\n  if (!redisUrl) {\n    throw new Error(\n      \"Redis URL not found. Please check APPSMITH_REDIS_URL configuration.\",\n    );\n  }\n\n  await utils.ensureSupervisorIsRunning();\n\n  let organizationId: string;\n\n  try {\n    // First, check if the organization exists\n    const orgCheckResult = await utils.execCommandReturningOutput([\n      \"mongosh\",\n      dbUrl,\n      \"--eval\",\n      \"db.organization.findOne({slug:'default'},{_id:1,slug:1})\",\n      \"--json\",\n    ]);\n","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/client/packages/rts/src/ctl/enable_form_login.ts#L1-L33","documentation":"Thrown immediately after the DB-URL check in enable_form_login.ts run(). utils.getRedisUrl() must return a Redis URL (APPSMITH_REDIS_URL) because enabling form login coordinates with the supervisor/Redis-backed state; a falsy value aborts before any mongosh call.","triggerScenarios":"Running the enable-form-login ctl without APPSMITH_REDIS_URL exported in the environment.","commonSituations":"Same shell/env gaps as the DB-URL error: one-off exec without sourcing runtime.env; Redis not yet provisioned on a fresh install; env var dropped during a config migration.","solutions":["Set APPSMITH_REDIS_URL to a valid redis:// URL before running the ctl.","Source the runtime env: '. /appsmith-stacks/runtime.env' then re-run.","Confirm Redis is actually reachable at the configured URL ('redis-cli -u \"$APPSMITH_REDIS_URL\" ping') — by exit code, never by printing the value.","Re-run the ctl once both DB and Redis URLs resolve."],"exampleFix":"# before\n$ appsmith ctl enable-form-login\n# -> Redis URL not found...\n\n# after\n$ export APPSMITH_REDIS_URL='redis://...'\n$ appsmith ctl enable-form-login","handlingStrategy":"validation","validationCode":"if (!process.env.APPSMITH_REDIS_URL) throw new Error('Set APPSMITH_REDIS_URL before running the ctl.');","typeGuard":"const hasRedisUrl = (env: NodeJS.ProcessEnv): boolean => Boolean(env.APPSMITH_REDIS_URL);","tryCatchPattern":null,"preventionTips":["Source runtime.env in container shells before running ctls.","Add Redis reachability (exit-code) checks in health scripts.","Keep a single required-env validator shared across ctls."],"tags":["configuration","environment-variables","redis","rts","operations"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}