{"record":{"id":"3c04a007a3805938","repo":"risingwavelabs/risingwave","slug":"credentials-file-does-not-exist","errorCode":null,"errorMessage":"credentials file does not exist: {}","messagePattern":"credentials file does not exist: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/common.rs","lineNumber":760,"sourceCode":"        // Try parsing as URL first\n        if let Ok(url) = Url::parse(&oauth.credentials_url) {\n            return self\n                .handle_pulsar_credentials_url(&url, aws_auth_props)\n                .await;\n        }\n\n        // If not a valid URL, check if it's an absolute file path\n        let path = Path::new(&oauth.credentials_url);\n        if !path.is_absolute() {\n            bail!(\"credentials_url must be a valid URL (s3://, file://) or an absolute file path\");\n        }\n\n        // Verify the file exists\n        if !tokio::fs::try_exists(&oauth.credentials_url)\n            .await\n            .unwrap_or(false)\n        {\n            bail!(\"credentials file does not exist: {}\", oauth.credentials_url);\n        }\n\n        // Return absolute path with file:// prefix\n        Ok((format!(\"file://{}\", oauth.credentials_url), None))\n    }\n\n    pub(crate) async fn handle_pulsar_credentials_url(\n        &self,\n        url: &Url,\n        aws_auth_props: &AwsAuthProps,\n    ) -> ConnectorResult<(String, Option<NamedTempFile>)> {\n        match url.scheme() {\n            \"s3\" => {\n                let credentials = load_file_descriptor_from_s3(url, aws_auth_props).await?;\n                let temp_file = create_credential_temp_file(&credentials)\n                    .context(\"failed to create temp file for pulsar credentials\")?;\n\n                let temp_path = temp_file","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/common.rs#L742-L778","documentation":"Thrown by `resolve_pulsar_credentials_url` when the credentials_url was accepted as an absolute file path, but the file does not exist on disk at connector-build time. The check uses `tokio::fs::try_exists` before returning the file:// URL.","triggerScenarios":"Passing an absolute path (e.g. `/etc/pulsar/creds.json`) as `oauth.credentials_url` when the file is absent — wrong path, file not mounted, or deleted after deployment.","commonSituations":"Kubernetes volume/secret not mounted into the pod, path differs between environments, file removed by cleanup jobs, or typo in the filename.","solutions":["Verify the path with `ls` and fix any typo in the credentials_url value.","Mount the credentials file (secret volume) into the RisingWave container at the configured path.","Alternatively store the file in S3 and use an `s3://` credentials_url instead."],"exampleFix":"// before\ncredentials_url = \"/etc/pulsar/credes.json\"  // typo\n// after\ncredentials_url = \"/etc/pulsar/creds.json\"   // file must exist","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction assertCredentialsFileExists(p) {\n  if (!p.startsWith('/')) throw new Error('must be absolute');\n  if (!fs.existsSync(p)) throw new Error(`credentials file does not exist: ${p}`);\n}\nassertCredentialsFileExists('/etc/pulsar/creds.json');","typeGuard":null,"tryCatchPattern":"try { await createPulsarSource(cfg); } catch (e) { if (String(e).includes('credentials file does not exist')) { checkVolumeMounts(); throw new Error(`Mount the OAuth credentials file at ${cfg.oauth.credentials_url}`); } throw e; }","preventionTips":["Mount credentials via a Kubernetes secret volume and verify mountPath matches credentials_url.","Run a pre-start readiness check that stat()s the credentials file.","Prefer s3:// credentials_url when files cannot be reliably mounted on all nodes."],"tags":["pulsar","oauth","file","config"],"backgroundTag":"file-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}