diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 6d59e5898..d4cb9bdb3 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1669,7 +1669,7 @@ func (s *Service) Validate() error { for _, c := range s.Checks { if s.PortLabel == "" && c.RequiresPort() { - mErr.Errors = append(mErr.Errors, fmt.Errorf("check %s invalid: check requires a port but the service %+q has no port", c.Name)) + mErr.Errors = append(mErr.Errors, fmt.Errorf("check %s invalid: check requires a port but the service %+q has no port", c.Name, s.Name)) continue }