{"record":{"id":"64cd1afb76a5707d","repo":"cube-js/cube","slug":"unable-to-find-name-from-path-value","errorCode":null,"errorMessage":"Unable to find ${name} from path: \"${value}\"","messagePattern":"Unable to find (.+?) from path: \"(.+?)\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cubejs-base-driver/src/BaseDriver.ts","lineNumber":254,"sourceCode":"      }, {\n        name: 'servername',\n        envKey: keyByDataSource('CUBEJS_DB_SSL_SERVERNAME', dataSource),\n      }];\n\n      const ssl: TLSConnectionOptions = sslOptions.reduce(\n        (agg, { name, envKey, canBeFile, validate }) => {\n          const value = process.env[envKey];\n          if (value) {\n            if (validate && validate(value)) {\n              return {\n                ...agg,\n                ...{ [name]: value }\n              };\n            }\n\n            if (canBeFile && isFilePath(value)) {\n              if (!fs.existsSync(value)) {\n                throw new Error(\n                  `Unable to find ${name} from path: \"${value}\"`,\n                );\n              }\n\n              const file = fs.readFileSync(value, 'utf8');\n              if (validate(file)) {\n                return {\n                  ...agg,\n                  ...{ [name]: file }\n                };\n              }\n\n              throw new Error(\n                `Content of the file from ${envKey} is not a valid SSL ${name}.`,\n              );\n            }\n\n            throw new Error(","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-base-driver/src/BaseDriver.ts#L236-L272","documentation":"getSslOptions() resolves SSL config values that may be given either as inline PEM content or as a file path. When a value looks like a file path (isFilePath) but no file exists at that location, the driver throws this error rather than silently passing an unusable cert/key.","triggerScenarios":"Setting an SSL env var or option (e.g. ssl_cert) to a path string like '/etc/ssl/cert.pem' where the file does not exist on disk.","commonSituations":"Typos in cert paths, certs not mounted into containers/K8s pods, running locally without the mounted secret, or relative paths resolved from an unexpected working directory.","solutions":["Verify the file exists at the exact path (check with ls/cat) and fix the path","Mount the certificate/key files into the runtime environment (volume mount, secret)","Pass the actual PEM content inline instead of a path","Ensure the process working directory makes relative paths resolve correctly"],"exampleFix":"// before\nssl: { cert: '/etc/certs/server.pem' } // file missing\n// after\nssl: { cert: fs.readFileSync('/etc/certs/server.pem', 'utf8') } // or fix path","handlingStrategy":"validation","validationCode":"const p = opts.cert;\nif (isFilePath(p) && !fs.existsSync(p)) throw new Error(`SSL cert path not found: ${p}`);","typeGuard":"const isFilePath = (v: string) => /\\.(pem|crt|cer|key|jks|p12|der)$/.test(v) || v.startsWith('/');","tryCatchPattern":null,"preventionTips":["Mount cert files into containers and verify at startup","Use absolute paths for SSL files","Fail fast with a health check that reads each SSL file","Prefer inline PEM via secrets managers when path mounting is risky"],"tags":["ssl","configuration","filesystem"],"backgroundTag":"ssl-certificate-file-not-found","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}