VictoriaMetrics/VictoriaMetrics · error
cannot parse proxy auth config: %w
Error message
cannot parse proxy auth config: %w
What it means
Analogous to error 938 but for the proxy credentials: ProxyClientConfig.NewConfig(baseDir) fails while building the Vultr client when proxy auth options are invalid (unreadable files, conflicting options), so discovery aborts before contacting api.vultr.com.
Source
Thrown at lib/promscrape/discovery/vultr/api.go:47
port := sdc.Port
if port == 0 {
port = 80
}
// See: https://www.vultr.com/api/
apiServer := "https://api.vultr.com"
if sdc.HTTPClientConfig.BearerToken == nil {
return nil, fmt.Errorf("missing `bearer_token` option")
}
ac, err := sdc.HTTPClientConfig.NewConfig(baseDir)
if err != nil {
return nil, fmt.Errorf("cannot parse auth config: %w", err)
}
proxyAC, err := sdc.ProxyClientConfig.NewConfig(baseDir)
if err != nil {
return nil, fmt.Errorf("cannot parse proxy auth config: %w", err)
}
c, err := discoveryutil.NewClient(apiServer, ac, sdc.ProxyURL, proxyAC, &sdc.HTTPClientConfig)
if err != nil {
return nil, fmt.Errorf("cannot create client for %q: %w", apiServer, err)
}
// Prepare additional query params for list instance API.
// See https://www.vultr.com/api/#tag/instances/operation/list-instances
var qp url.Values
if sdc.Label != "" {
qp.Set("label", sdc.Label)
}
if sdc.MainIP != "" {
qp.Set("main_ip", sdc.MainIP)
}
if sdc.Region != "" {
qp.Set("region", sdc.Region)View on GitHub (pinned to 5079fb58f1)
Solutions
- Inspect the wrapped cause to find the failing proxy option.
- Fix the proxy auth file paths/permissions or inline credentials.
- Remove proxy auth if the proxy needs none.
- Re-validate the config after changes.
Example fix
# before
proxy_client_config:
basic_auth:
password_file: /gone/proxy_pass
# after
proxy_client_config:
basic_auth:
password_file: /run/secrets/proxy_pass Defensive patterns
Strategy: validation
Validate before calling
if sdc.ProxyClientConfig.HasAuth() {
for _, p := range sdc.ProxyClientConfig.AuthFilePaths() {
if _, err := os.Stat(p); err != nil { return fmt.Errorf("missing proxy auth file: %s", p) }
}
} Try / catch
labels, err := sdc.GetLabels(baseDir)
if err != nil && strings.Contains(err.Error(), "cannot parse proxy auth config") { /* fix proxy auth options */ } Prevention
- Keep proxy secret files on the same mounted volume in every environment
- Remove proxy auth options when the proxy is unauthenticated
- Validate proxy connectivity separately from Vultr connectivity
- Version-control a config-check step that resolves all file references
When it happens
Trigger: vultr SDConfig with `proxy_client_config` containing an invalid basic_auth/bearer/tls option, e.g. password_file that does not exist.
Common situations: Corporate proxy environments where proxy secret files are not present in the scrape agent's container or paths changed after a migration.
Related errors
- cannot parse proxy auth config for `job_name` %q: %w
- cannot parse proxy auth config: %w
- cannot parse proxy auth config: %w
- cannot parse proxy auth config: %w
- cannot parse proxy auth config: %w
AI-assisted analysis of VictoriaMetrics/VictoriaMetrics@5079fb58f1 (2026-09-03).
Data as JSON: /api/errors/85db6fc3309a6107.
Report an issue: GitHub.