Operation halts with asyncio timeout exception in logs? #2707
-
Hi all, I have run into an issue where a Caldera operation will halt indefinitely. When I check the logs (via journalctl) I see a "asyncio.exceptions.TimeoutError" that is getting thrown on "File "/home/atadmin/caldera/app/service/event_svc.py", line 83, in fire_event". It is breaking on the websocket.connect method: "async with websockets.connect(uri) as websocket:". Quick Note: I am running on an Azure instance (Standard_D4s_v3: 16GB, 4 CPUs); Ubuntu 20.04 LTS; Caldera install is on the system itself and not using docker. Some investigation and thoughts:
My REAL questions are...
UPDATE
Thanks for the help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe I have found the issue and will post here to help any others who may run into the same issue. I am running Caldera against a target host that has non-blocking EP. https://github.com/mitre/caldera/blob/master/app/service/event_svc.py#L83 Which calls the websocket.connect(uri) command with default timeout (which is 10s). Not a "good" fix, but Caldera was crashing every time an operation was run without it. |
Beta Was this translation helpful? Give feedback.
I believe I have found the issue and will post here to help any others who may run into the same issue.
I am running Caldera against a target host that has non-blocking EP.
When the Caldera agent (sandcat in this case) runs through its battery of tests (i.e. operation), the host gets pinned at 100% CPU usage (the server being pinned at 100% usage seems to be a red herring). This is causing the websockets to time out because of this line:
https://github.com/mitre/caldera/blob/master/app/service/event_svc.py#L83
Which calls the websocket.connect(uri) command with default timeout (which is 10s).
Unfortunately I am unable to rectify the high CPU usage on the host, so my fix was to change the …