theforeman/foreman · error · ProxyException
Unable to obtain IP address for subnet %{subnet} in External
Error message
Unable to obtain IP address for subnet %{subnet} in External IPAM. What it means
Error "Unable to obtain IP address for subnet %{subnet} in External IPAM." thrown in theforeman/foreman.
Source
Thrown at app/services/proxy_api/external_ipam.rb:238
# Response if subnet not exists:
# {"error": "Subnet not found in External IPAM"}
# Response if groups not supported(only checked if a group is specified):
# {"error": "Groups are not supported"}
# Response if can't connect to External IPAM server
# {"error": "Unable to connect to External IPAM server"}
def ip_exists(ip, subnet, group = "")
raise "subnet cannot be nil" if subnet.nil?
raise "ip cannot be nil" if ip.nil?
response = parse get("/subnet/#{subnet}/#{ip}", query: { group: group })
raise(response['error']) if response.is_a?(Hash) && response['error'].present?
if response.is_a?(Hash)
raise(response['error']) if response['error'].present?
response['result']
else # Foreman Proxy < 3.3 support
response
end
rescue => e
raise ProxyException.new(url, e, N_("Unable to obtain IP address for subnet %{subnet} in External IPAM."), subnet: subnet)
end
# Deletes an IP address from a given subnet in External IPAM.
#
# Inputs: 1. ip: IP address to be freed up
# 2. subnet: The IPv4 or IPv6 subnet CIDR. (Examples: IPv4 - "100.10.10.0/24",
# IPv6 - "2001:db8:abcd:12::/124")
# 3. group(optional): The name of the External IPAM group containing the subnet.
#
# Responses:
# Response if success:
# 200
# Response if subnet error:
# {"error": "The specified subnet does not exist in External IPAM."}
# Response if IP already deleted:
# {"error": "Unable to delete IP from External IPAM"}
# Response if groups not supported(only checked if a group is specified):
# {"error": "Groups are not supported"}View on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/proxy_api/external_ipam.rb:238 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/243804947e1fbb2b.
Report an issue: GitHub.