dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
600 stars 278 forks source link

RedFish API returns 500 #203

Closed arun2arunraj closed 2 years ago

arun2arunraj commented 2 years ago

hi Team,

We are using the following request to the IDRAC server. But it returns 500 as a response. Looking for help to understand this issue in detail.

Controller Version --> 9 Firmware Version --> 5.00.10

curl -gk -X POST -H 'Content-Type: application/json' -H 'Authorization: Basic cm9vdDpjYWx2aW4=' -i 'http://root:calvin@[ipv6]/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ImportSystemConfiguration [[ipv6]]' --data '{
    "ShareParameters": {
        "Target": "ALL"
    },
    "ImportBuffer": "<SystemConfiguration><Component FQDD=\"iDRAC.Embedded.1\"><Attribute Name=\"ServerBoot.1#BootOnce\">Enabled</Attribute><Attribute Name=\"ServerBoot.1#FirstBootDevice\">VCD-DVD</Attribute></Component></SystemConfiguration>"
}'

curl -gk -X POST -H 'Content-Type: application/json' -H 'Authorization: Basic cm9vdDpjYWx2aW4=' -i 'http:// [ipv6]/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ImportSystemConfiguration' --data '{ "ShareParameters": { "Target": "ALL" }, "ImportBuffer": "<SystemConfiguration><Component FQDD=\"iDRAC.Embedded.1\"><Attribute Name=\"ServerBoot.1#BootOnce\">Enabled</Attribute><Attribute Name=\"ServerBoot.1#FirstBootDevice\">VCD-DVD</Attribute></Component></SystemConfiguration>" }'

both curl command giving exactly same response.

Status Code: 500, Returns: {'_content': b'{"error":{"@Message.ExtendedInfo":[{"Message":"Unable to complete the operation because the provider is not ready.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"IDRAC.2.4.RAC0508","RelatedProperties":[],"RelatedProperties@odata.count":0,"Resolution":"Wait for few minutes, refresh the page and retry. If the problem persists, reset the iDRAC and retry the operation.","Severity":"Critical"}],"code":"Base.1.7.GeneralError","message":"A general error has occurred. See ExtendedInfo for more information"}}', '_content_consumed': True, '_next': None, 'status_code': 500, 'headers': {'Date': 'Tue, 01 Feb 2022 18:33:59 GMT', 'Server': 'Apache', 'OData-Version': '4.0', 'Access-Control-Allow-Origin': '*', 'Cache-Control': 'no-cache', 'X-Frame-Options': 'DENY', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload', 'Content-Length': '517', 'Connection': 'close', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8'}, 'raw': <urllib3.response.HTTPResponse object at 0x7f969fb746a0>, 'url': 'https://root:calvin@[IPV6]/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ImportSystemConfiguration [[ipv6]]', 'encoding': 'utf-8', 'history': [], 'reason': 'Internal Server Error', 'cookies': <RequestsCookieJar[]>, 'elapsed': datetime.timedelta(microseconds=228673), 'request': <PreparedRequest [POST]>, 'connection': <requests.adapters.HTTPAdapter object at 0x7f969fb74370>}

{'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to complete the operation because the provider is not ready.', 'MessageArgs': [], 'MessageArgs@odata.count': 0, 'MessageId': 'IDRAC.2.4.RAC0508', 'RelatedProperties': [], 'RelatedProperties@odata.count': 0, 'Resolution': 'Wait for few minutes, refresh the page and retry. If the problem persists, reset the iDRAC and retry the operation.', 'Severity': 'Critical'}], 'code': 'Base.1.7.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information'}

texroemer commented 2 years ago

Hi @arun2arunraj

Both curl commands show using http for the URI, should be https but when you pass in http, you should be getting a 404 error code, not 500.

Are other Redfish commands working? Can you try this command to see if it passes or also fails? If fails, can you reboot the iDRAC and once back up, try again?

curl -gk -X POST -H 'Content-Type: application/json' 'https://192.168.0.120/redfish/v1/Dell/Managers/iDRAC.Embedded.1/DellLCService/Actions/DellLCService.GetRemoteServicesAPIStatus' --data '{}' -i --insecure -u root:calvin

Thanks Tex

texroemer commented 2 years ago

Can you also update your iDRAC to 5.10.00 which is the latest posted. 5.00.10 was removed from Dell support site due to known issues and replaced with 5.00.10.20.

Thanks Tex