Closed ckirim1 closed 1 month ago
What's in your config file? Some things to check...
In SubscriptionDetails, you may need to remove options entirely. One of the errors I see is that the service is responding with a "property unknown" message (unfortunately it doesn't specify which property). At the very least, the "Destination" option is the only thing you need to specify; every other option is used to control what types of events you receive. You should also double check the "Destination" contains the address of the listener system (not the remote service).
You may also need to check the IP addresses you're using for the listener. The last error message looks like you're attempting to bind the listener using the service's IP address. The "ListenerIP" option is the IP address of the system running the tool (not the remote service).
@ckirim1 , the following config.ini file works fine (at least for me) against an HPE iLO 5:
[Information]
Updated = April 24, 2017
Description = Redfish Event Listener Tool
[SystemInformation]
# My laptop is listening on the following IPv4 address
ListenerIP = 10.124.98.175
ListenerPort = 443
UseSSL = on
[CertificateDetails]
certfile = cert.pem
keyfile = server.key
[SubscriptionDetails]
# The following is my laptop IPv4 address
Destination = https://10.124.98.175/
# The following has been commented out to work against HPE iLO Redfish service.
#EventTypes = [
# "Alert",
# "ResourceRemoved",
# "ResourceAdded" ,
# "ResourceUpdated",
# "StatusChange"]
Context = Public
Format = Event
Expand = false
# The following has been commented out to work against HPE iLO Redfish service.
#ResourceTypes = ["Chassis","Manager"]
#Registries = ["ResourceEvent"]
# The following has been added to work against HPE iLO Redfish service.
RegistryPrefixes = [
"NetworkDevice",
"iLOEvents",
"ResourceEvent",
"StorageDevice",
"iLOResourceEvents"
],
[ServerInformation]
# The following info corresponds to the remote Redfish service (HPE iLO)
ServerIPs = ["https://172.30.231.150"]
UserNames = ["Admin"]
Passwords = ["password"]
LoginType = ["Session"]
Closing; no updates from submitter
@mraineri I tried this tool for one of HPE ilo5 server. But I take the below outputs;
python3 RedfishEventListener_v1.py Redfish Event Listener v1.1.2 ServerIP:: https://10.254.254.2 UserName:: hpeadmin Attempt 1 of /redfish/v1/ Response Time for GET to /redfish/v1/: 0.6701809060004962 seconds. Attempt 1 of /redfish/v1/SessionService/Sessions/ Response Time for GET to /redfish/v1/SessionService/Sessions/: 0.06997425600002316 seconds. Attempt 1 of /redfish/v1/ Retrying /redfish/v1/ [('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))] Attempt 2 of /redfish/v1/ Response Time for GET to /redfish/v1/: 1.0960873180001727 seconds. Attempt 1 of /redfish/v1/EventService/ Retrying /redfish/v1/EventService/ [('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))] Attempt 2 of /redfish/v1/EventService/ Response Time for GET to /redfish/v1/EventService/: 0.4261891400001332 seconds. Attempt 1 of /redfish/v1/EventService/Subscriptions/ Retrying /redfish/v1/EventService/Subscriptions/ [('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))] Attempt 2 of /redfish/v1/EventService/Subscriptions/ Response Time for POST to /redfish/v1/EventService/Subscriptions/: 0.26587757899960707 seconds. Unable to subscribe for events with https://10.254.254.2 Traceback (most recent call last): File "RedfishEventListener_v1.py", line 263, in
response = redfish_utilities.create_event_subscription(my_ctx, config['destination'],
File "/home/cihat/.local/lib/python3.8/site-packages/redfish_utilities/event_service.py", line 212, in create_event_subscription
verify_response( response )
File "/home/cihat/.local/lib/python3.8/site-packages/redfish_utilities/messages.py", line 71, in verify_response
raise RedfishOperationFailedError( "Operation failed: HTTP {}\n{}".format( response.status, exception_string ) )
redfish_utilities.messages.RedfishOperationFailedError: Operation failed: HTTP 400
See @Message.ExtendedInfo for more information.
iLO.2.14.PropertyNotWritableOrUnknown
None
Continuing with Listener.
Listening on 10.254.254.2:443 via HTTP
Press Ctrl-C to close program
Traceback (most recent call last):
File "RedfishEventListener_v1.py", line 311, in
socket_server = socket.create_server(my_host, family=family)
File "/usr/lib/python3.8/socket.py", line 890, in create_server
raise error(err.errno, msg) from None
OSError: [Errno 99] Cannot assign requested address (while attempting to bind on address ('10.254.254.2', 443))