hashicorp/nomad · error
http type must have http path
Error message
http type must have http path
What it means
An HTTP-type service check was defined without a `path`; validateCommon requires a request path for http checks.
Source
Thrown at nomad/structs/services.go:269
if sc.OnUpdate == "" {
sc.OnUpdate = OnUpdateRequireHealthy
}
}
// 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 {View on GitHub (pinned to 482b49bf1a)
Solutions
- Add a path such as "/health" to the check definition
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at nomad/structs/services.go:269 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/49cb0c6ba686e21d.
Report an issue: GitHub.