hashicorp/nomad · error
http type must have valid http path
Error message
http type must have valid http path
What it means
The http check's path failed url.Parse; validateCommon wraps the parse error because the configured path is not a valid URL path.
Source
Thrown at nomad/structs/services.go:273
// validateCommon validates the parts of ServiceCheck shared across providers.
func (sc *ServiceCheck) validateCommon(allowableTypes []string) error {
// validate the type is allowable (different between nomad, consul checks)
checkType := strings.ToLower(sc.Type)
if !slices.Contains(allowableTypes, checkType) {
s := strings.Join(allowableTypes, ", ")
return fmt.Errorf(`invalid check type (%q), must be one of %s`, checkType, s)
}
// validate specific check types
switch checkType {
case ServiceCheckHTTP:
if sc.Path == "" {
return fmt.Errorf("http type must have http path")
}
checkPath, pathErr := url.Parse(sc.Path)
if pathErr != nil {
return fmt.Errorf("http type must have valid http path")
}
if checkPath.IsAbs() {
return fmt.Errorf("http type must have relative http path")
}
case ServiceCheckScript:
if sc.Command == "" {
return fmt.Errorf("script type must have a valid script path")
}
}
// validate interval
if sc.Interval == 0 {
return fmt.Errorf("missing required value interval. Interval cannot be less than %v", minCheckInterval)
} else if sc.Interval < minCheckInterval {
return fmt.Errorf("interval (%v) cannot be lower than %v", sc.Interval, minCheckInterval)
}
// validate timeoutView on GitHub (pinned to 482b49bf1a)
Solutions
- Fix the path to be a syntactically valid relative URL path
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at nomad/structs/services.go:273 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/dc10a2ed413f4ba4.
Report an issue: GitHub.