risingwavelabs/risingwave · error · ConnectorError
credentials file does not exist: {}
Error message
credentials file does not exist: {} What it means
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.
Source
Thrown at src/connector/src/connector_common/common.rs:760
// Try parsing as URL first
if let Ok(url) = Url::parse(&oauth.credentials_url) {
return self
.handle_pulsar_credentials_url(&url, aws_auth_props)
.await;
}
// If not a valid URL, check if it's an absolute file path
let path = Path::new(&oauth.credentials_url);
if !path.is_absolute() {
bail!("credentials_url must be a valid URL (s3://, file://) or an absolute file path");
}
// Verify the file exists
if !tokio::fs::try_exists(&oauth.credentials_url)
.await
.unwrap_or(false)
{
bail!("credentials file does not exist: {}", oauth.credentials_url);
}
// Return absolute path with file:// prefix
Ok((format!("file://{}", oauth.credentials_url), None))
}
pub(crate) async fn handle_pulsar_credentials_url(
&self,
url: &Url,
aws_auth_props: &AwsAuthProps,
) -> ConnectorResult<(String, Option<NamedTempFile>)> {
match url.scheme() {
"s3" => {
let credentials = load_file_descriptor_from_s3(url, aws_auth_props).await?;
let temp_file = create_credential_temp_file(&credentials)
.context("failed to create temp file for pulsar credentials")?;
let temp_path = temp_fileView on GitHub (pinned to 6469eb736d)
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.
Example fix
// before credentials_url = "/etc/pulsar/credes.json" // typo // after credentials_url = "/etc/pulsar/creds.json" // file must exist
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
function assertCredentialsFileExists(p) {
if (!p.startsWith('/')) throw new Error('must be absolute');
if (!fs.existsSync(p)) throw new Error(`credentials file does not exist: ${p}`);
}
assertCredentialsFileExists('/etc/pulsar/creds.json'); Try / catch
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; } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Kubernetes volume/secret not mounted into the pod, path differs between environments, file removed by cleanup jobs, or typo in the filename.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- credentials_url must be a valid URL (s3://, file://) or an a
- invalid credentials_url scheme '{}', only file://, s3://, an
- {serde_json deserialization error for PulsarConfig from prop
- missing FORMAT ... ENCODE ...
- `startup_mode` must be `earliest`, `latest`, or empty
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/3c04a007a3805938.
Report an issue: GitHub.