Closed seema-png closed 1 year ago
Why is the service expecting 200 OK specifically and not the full range of 2XX statuses that indicate the event was accepted by a listener? If there's no response body, 204 No Content is the proper status code to return.
Older versions of the listener were returning 200 OK with no response body, which is not correct behavior. This caused issues with other services where seeing a 200 OK would cause them to attempt to read in a response body. Since this listener returns no response body, we changed the status code to 204 No Content.
Thank you for the Quick clarification. We agree the code change is required from iLO side to accept 204 status code, as its the accurate return code. Will be closing this git hub ticket . Thanks again
Observing with Latest available DMTF event Listener , when Created the subscription with HPE iLO5 or iLO6 IP ... Initially only few events gets logged .And same single REST event is logged Multiple (around 3-4) times , No any further events getting logged in Listener even there are n-number of state changes. This issue was not observed with Previous DMTF event listener code RedfishEventListener_v1.py , build during 11/26/2021 Time Frame. In the debugging, Encountered Error as , resteven: Event dispatch failed. HTTP:204 for Payload:
{"@odata.context":"/redfish/v1/$metadata#Event.Event","@odata.type":"#Event.v1_2_9.Event","Events":[{"EventId":"8f924994-902e-695f-e40f-c64e4d1a6d5c","EventTimestamp":"2023-05-24T18:24:01Z","EventType":"ResourcFYI(W) resteven: Subscription: 6, Error: 9, HTTP code: 204 Response:
Observing the Event Listener code is returning 204 response. In our iLO code, iLO keeps on retrying till it received 200 OK from Listener . As the Event listener code is returning 204 response consistently for REST events dispatched to Event Listener with POST operation , Connection is getting closed after multiple retires (specified in "DeliveryRetryAttempts") , failing to log further upcoming n -number of REST events
Would need fix from DMTF Event Listener code for this issue, for receiving REST events/Alerts from HPE iLO successfully.
Sample few REST events logged in Listener before closing connection after multiple retries , Redfish Event Listener v1.1.3 No subscriptions are specified. Continuing with Listener. Listening on 16.242.165.180:443 via HTTPS Press Ctrl-C to close program .................................................. Socket connected:: headers: IOrderedDict([('HOST', '16.242.165.180'), ('TRANSFER-ENCODING', 'chunked'), ('CONTENT-TYPE', 'application/json'), ('CACHE-CONTROL', 'no-cache'), ('DATE', 'Wed, 24 May 2023 17:47:05 GMT'), ('CONNECTION', 'keep-alive'), ('SENDER-ADDRESS', 'ILOVL9CNP0151.asiapacific.hpqcorp.net')])
bodydata: {"@odata.context":"/redfish/v1/$metadata#Event.Event","@odata.type":"#Event.v1_2_9.Event","Events":[{"EventId":"0ead0a02-b6fa-c759-835c-cbdda6f307a5","EventTimestamp":"2023-05-24T17:47:03Z","EventType":"ResourceAdded","MemberId":"0","MessageId":"iLOEvents.3.9.ResourceAdded","Oem":{"Hpe":{"Hostname":"ILOVL9CNP0151.asiapacific.hpqcorp.net","@odata.context":"/redfish/v1/$metadata#HpeEvent.HpeEvent","@odata.type":"#HpeEvent.v2_2_0.HpeEvent","Resource":"/redfish/v1/EventService/Subscriptions/3"}},"OriginOfCondition":"/redfish/v1/EventService/Subscriptions/3","Severity":"OK"}],"Name":"Events","Context":"ILOVL9CNP0151.asiapacific.hpqcorp.net"}
Server IP Address is 15.119.211.10 Server PORT number is 49556 Listener IP is
Context (ILOVL9CNP0151.asiapacific.hpqcorp.net) does not match with the server (Public123). Event Counter for Host 15.119.211.10 = 1
.......... Socket connected:: headers: IOrderedDict([('HOST', '16.242.165.180'), ('TRANSFER-ENCODING', 'chunked'), ('CONTENT-TYPE', 'application/json'), ('CACHE-CONTROL', 'no-cache'), ('DATE', 'Wed, 24 May 2023 17:47:36 GMT'), ('CONNECTION', 'keep-alive'), ('SENDER-ADDRESS', 'ILOVL9CNP0151.asiapacific.hpqcorp.net')])
bodydata: {"@odata.context":"/redfish/v1/$metadata#Event.Event","@odata.type":"#Event.v1_2_9.Event","Events":[{"EventId":"0ead0a02-b6fa-c759-835c-cbdda6f307a5","EventTimestamp":"2023-05-24T17:47:03Z","EventType":"ResourceAdded","MemberId":"0","MessageId":"iLOEvents.3.9.ResourceAdded","Oem":{"Hpe":{"Hostname":"ILOVL9CNP0151.asiapacific.hpqcorp.net","@odata.context":"/redfish/v1/$metadata#HpeEvent.HpeEvent","@odata.type":"#HpeEvent.v2_2_0.HpeEvent","Resource":"/redfish/v1/EventService/Subscriptions/3"}},"OriginOfCondition":"/redfish/v1/EventService/Subscriptions/3","Severity":"OK"}],"Name":"Events","Context":"ILOVL9CNP0151.asiapacific.hpqcorp.net"}
Server IP Address is 15.119.211.10 Server PORT number is 54993 Listener IP is
Context (ILOVL9CNP0151.asiapacific.hpqcorp.net) does not match with the server (Public123). Event Counter for Host 15.119.211.10 = 2
.......... Socket connected:: headers: IOrderedDict([('HOST', '16.242.165.180'), ('TRANSFER-ENCODING', 'chunked'), ('CONTENT-TYPE', 'application/json'), ('CACHE-CONTROL', 'no-cache'), ('DATE', 'Wed, 24 May 2023 17:48:07 GMT'), ('CONNECTION', 'keep-alive'), ('SENDER-ADDRESS', 'ILOVL9CNP0151.asiapacific.hpqcorp.net')])
bodydata: {"@odata.context":"/redfish/v1/$metadata#Event.Event","@odata.type":"#Event.v1_2_9.Event","Events":[{"EventId":"0ead0a02-b6fa-c759-835c-cbdda6f307a5","EventTimestamp":"2023-05-24T17:47:03Z","EventType":"ResourceAdded","MemberId":"0","MessageId":"iLOEvents.3.9.ResourceAdded","Oem":{"Hpe":{"Hostname":"ILOVL9CNP0151.asiapacific.hpqcorp.net","@odata.context":"/redfish/v1/$metadata#HpeEvent.HpeEvent","@odata.type":"#HpeEvent.v2_2_0.HpeEvent","Resource":"/redfish/v1/EventService/Subscriptions/3"}},"OriginOfCondition":"/redfish/v1/EventService/Subscriptions/3","Severity":"OK"}],"Name":"Events","Context":"ILOVL9CNP0151.asiapacific.hpqcorp.net"}
Server IP Address is 15.119.211.10 Server PORT number is 52289 Listener IP is
Context (ILOVL9CNP0151.asiapacific.hpqcorp.net) does not match with the server (Public123). Event Counter for Host 15.119.211.10 = 3
.......... Socket connected:: headers: IOrderedDict([('HOST', '16.242.165.180'), ('TRANSFER-ENCODING', 'chunked'), ('CONTENT-TYPE', 'application/json'), ('CACHE-CONTROL', 'no-cache'), ('DATE', 'Wed, 24 May 2023 17:48:37 GMT'), ('CONNECTION', 'keep-alive'), ('SENDER-ADDRESS', 'ILOVL9CNP0151.asiapacific.hpqcorp.net')])
bodydata: {"@odata.context":"/redfish/v1/$metadata#Event.Event","@odata.type":"#Event.v1_2_9.Event","Events":[{"EventId":"0ead0a02-b6fa-c759-835c-cbdda6f307a5","EventTimestamp":"2023-05-24T17:47:03Z","EventType":"ResourceAdded","MemberId":"0","MessageId":"iLOEvents.3.9.ResourceAdded","Oem":{"Hpe":{"Hostname":"ILOVL9CNP0151.asiapacific.hpqcorp.net","@odata.context":"/redfish/v1/$metadata#HpeEvent.HpeEvent","@odata.type":"#HpeEvent.v2_2_0.HpeEvent","Resource":"/redfish/v1/EventService/Subscriptions/3"}},"OriginOfCondition":"/redfish/v1/EventService/Subscriptions/3","Severity":"OK"}],"Name":"Events","Context":"ILOVL9CNP0151.asiapacific.hpqcorp.net"}
Server IP Address is 15.119.211.10 Server PORT number is 51998 Listener IP is
Context (ILOVL9CNP0151.asiapacific.hpqcorp.net) does not match with the server (Public123). Event Counter for Host 15.119.211.10 = 4
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................