theforeman/foreman · error · ArgumentError

#{desc} port must be between 1 and 65535, got: #{value.inspe

Error message

#{desc} port must be between 1 and 65535, got: #{value.inspect}

What it means

Error "#{desc} port must be between 1 and 65535, got: #{value.inspect}" thrown in theforeman/foreman.

Source

Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:265

          def check_host
            raise HostUnknown if host.nil?
          end

          def check_host_param(name)
            check_host
            raise HostParamUndefined.new(name: name, host: host) unless host.params.key?(name)
          end

          def validate_port(value, desc = 'This')
            return nil if value.blank?

            unless value.to_s.match?(/^\d+$/)
              raise ArgumentError, "#{desc} port must be an integer, got: #{value.inspect}"
            end
            port = value.to_i
            if port < 1 || port > 65535
              raise ArgumentError, "#{desc} port must be between 1 and 65535, got: #{value.inspect}"
            end
            port
          end
        end
      end
    end
  end
end

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/services/foreman/renderer/scope/macros/host_template.rb:265 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23). Data as JSON: /api/errors/891b3638898c84a5. Report an issue: GitHub.