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

**URL:** <https://forum.ansible.com/t/error-http-error-404-not-found-when-configuring-dns-settings-on-idrac-using-ansible/7324>\
**Category:** Get Help\
**Tags:** dns, ansible\
**Created:** [July 17, 2024, 3:12pm UTC](https://forum.ansible.com/t/error-http-error-404-not-found-when-configuring-dns-settings-on-idrac-using-ansible/7324 "2024-07-17T15:12:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kou](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@kou](https://forum.ansible.com/u/kou)\
**Post date:** [July 17, 2024, 3:12pm UTC](https://forum.ansible.com/t/error-http-error-404-not-found-when-configuring-dns-settings-on-idrac-using-ansible/7324/1 "2024-07-17T15:12:20Z")

</div>

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:

```auto
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!

---

<div class="post-metadata">

**Author:** ![mikemorency](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mikemorency/32/2672_2.png) [@mikemorency](https://forum.ansible.com/u/mikemorency)\
**Post date:** [July 18, 2024, 3:17pm UTC](https://forum.ansible.com/t/error-http-error-404-not-found-when-configuring-dns-settings-on-idrac-using-ansible/7324/2 "2024-07-18T15:17:47Z")

</div>

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](https://dl.dell.com/content/manual67575577-dell-emc-openmanage-enterprise-3-8-restful-api-guide.pdf?language=en-us) doc, you should be able to do

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

```

and get some response from the server

---

<div class="post-metadata">

**Author:** ![kou](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@kou](https://forum.ansible.com/u/kou)\
**Post date:** [July 18, 2024, 3:35pm UTC](https://forum.ansible.com/t/error-http-error-404-not-found-when-configuring-dns-settings-on-idrac-using-ansible/7324/3 "2024-07-18T15:35:16Z")

</div>

Hello , thank you for your answer. It was a problem with the module.  
Here is the solution:  
[https://github.com/dell/dellemc-openmanage-ansible-modules/issues/700](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/700)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 17, 2024, 3:35pm UTC](https://forum.ansible.com/t/error-http-error-404-not-found-when-configuring-dns-settings-on-idrac-using-ansible/7324/4 "2024-08-17T15:35:33Z")

</div>

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