Error "HTTP Error 404: Not Found" when Configuring DNS Settings on iDRAC Using Ansible

Hello everyone,

I am encountering an issue while trying to configure DNS settings on iDRAC using Ansible. My playbook uses the dellemc.openmanage.idrac_attributes module to set DNS attributes. However, I’m receiving an error related to the /api/SessionService/Sessions resource not being found.

Here is the relevant part of my playbook:

name: Configure iDRAC attributes and network settings
hosts: all
tasks:
name: Configure DNS settings on iDRAC
dellemc.openmanage.ome_application_network_address:
hostname: "My-ip"
username: "user"
password: "mypass"
validate_certs: false
enable_nic: false
ipv4_configuration:
enable: true
use_dhcp_for_dns_server_names: false
static_preferred_dns_server: 8.8.8.8
static_alternate_dns_server: 9.9.9.9
dns_configuration:
register_with_dns: true
use_dhcp_for_dns_domain_name: false
dns_name: "MX-SVCTAG"
dns_domain_name: "dnslocaldomain"

When running the playbook, I receive the following error:

error": {“@Message.ExtendedInfo”: [{“Message”: “Unable to complete the operation because the resource /api/SessionService/Sessions entered is not found.”, “MessageArgs”: [“/api/SessionService/Sessions”], “MessageId”: “IDRAC.2.2.SYS403”, “RelatedProperties”: [], “Resolution”: “Enter the correct resource and retry the operation. For resources with numeric ID in the URI, enable the “Redfish.1#NumericDynamicSegmentsEnable” attribute and retry the operation. For information about valid resource, see the Redfish Users Guide available on the support site.”, “Severity”: “Critical”}, {“Message”: “The resource at the URI ‘/api/SessionService/Sessions’ was not found.”, “MessageArgs”: [“/api/SessionService/Sessions”], “MessageId”: “Base.1.12.1.ResourceMissingAtURI”, “RelatedProperties”: [], “Resolution”: “Place a valid resource at the URI or correct the URI and resubmit the request.”, “Severity”: “Critical”}], “code”: “Base.1.7.GeneralError”, “message”: “A general error has occurred. See ExtendedInfo for more information”}}, “msg”: “HTTP Error 404: Not Found”}

I have verified the IP address and credentials and can log into the iDRAC web interface without any issues. Also, the deprecated module is working correctly “dellemc.openmanage.idrac_network”

Has anyone else encountered a similar issue or had any suggestions on resolving this? Any guidance would be greatly appreciated.

Thank you!

It sounds like the API endpoint the module is expecting, /api/SessionService/Sessions cannot be found.

Im not familiar with iDRAC, so maybe theres some setting that disables the api or changes the base path of the api? Maybe your version of iDRAC does not have that API endpoint (it looks like it came out like 3+ years ago so i doubt this is the issue)

Based on this doc, you should be able to do

curl -X GET https://username:password@ip/api/SessionService/Sessions

and get some response from the server

Hello , thank you for your answer. It was a problem with the module.
Here is the solution:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.