hashicorp/nomad · error

method type %q not supported in Nomad http check

Error message

method type %q not supported in Nomad http check

What it means

validateNomad rejected an HTTP check that specifies a `method`; Nomad-native service checks do not support custom HTTP methods (a temporary limitation vs Consul checks).

Source

Thrown at nomad/structs/services.go:384

	// below are temporary limitations on checks in nomad
	// https://github.com/hashicorp/team-nomad/issues/354

	// check_restart.ignore_warnings is not a thing in Nomad (which has no warnings in checks)
	if sc.CheckRestart != nil {
		if sc.CheckRestart.IgnoreWarnings {
			return errors.New("ignore_warnings on check_restart only supported for Consul service checks")
		}
	}

	// address_mode="driver" not yet supported on nomad
	if sc.AddressMode == "driver" {
		return errors.New("address_mode = driver may only be set for Consul service checks")
	}

	if sc.Type == "http" {
		if sc.Method != "" && !helper.IsMethodHTTP(sc.Method) {
			return fmt.Errorf("method type %q not supported in Nomad http check", sc.Method)
		}
	}

	// success_before_passing is consul only
	if sc.SuccessBeforePassing != 0 {
		return errors.New("success_before_passing may only be set for Consul service checks")
	}

	// failures_before_critical is consul only
	if sc.FailuresBeforeCritical != 0 {
		return errors.New("failures_before_critical may only be set for Consul service checks")
	}

	// failures_before_warning is consul only
	if sc.FailuresBeforeWarning != 0 {
		return errors.New("failures_before_warning may only be set for Consul service checks")
	}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Remove the `method` field from Nomad (non-Consul) service checks
  2. Use a Consul service check if a custom method is required
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at nomad/structs/services.go:384 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/c81e018a3f5162ee. Report an issue: GitHub.