Scan never stops after system was rebooted by accident
Issue search
- [x] I have searched the existing issues and this bug has not been reported yet
Which component is affected?
Prowler UI
Cloud Provider (if applicable)
Azure
Steps to Reproduce
Start an Azure scan. During scan, reboot the system (here it happened by accident).
Result: scan never stops.
Expected behavior
Timeout, or option to stop.
Actual Result with Screenshots or Logs
How did you install Prowler?
Docker (docker pull toniblyx/prowler)
Environment Resource
Docker
OS used
Debian12
Prowler version
5.14.0
Python version
n/a
Pip version
n/a
Context
No response
I'd wait for Prowler team to actually address this, but, the feature you are referring to is already planned for implementation here: https://github.com/prowler-cloud/prowler/issues/6893
For the time being the workaround I am using is changing the scan state as cancelled via DB query (I actually don't know if that will cause collateral issues or not but YOLO):
-- Cancel a stuck scan (replace SCAN_ID with the actual scan UUID)
UPDATE scans
SET state = 'cancelled',
completed_at = NOW()
WHERE id = 'SCAN_ID'::uuid
AND state = 'executing';
-- Cancel all scans stuck in 'executing' for more than 4 hours
UPDATE scans
SET state = 'cancelled',
completed_at = NOW()
WHERE state = 'executing'
AND started_at < NOW() - INTERVAL '4 hours';
@Vombato , i checked and the crazy thing is that this table is empty. Even during new scan. Users table does contain records for example.
Hi @olsonnn,
The solution I was about to provide you is the one @Vombato gave you. Huge thanks for this.
Can you confirm that scans table is empty?
Hi, I have the same situation. One of my scans is stuck since yesterday. What are the recommended steps to fix it on my end as a user?
Hi, I have the same situation. One of my scans is stuck since yesterday. What are the recommended steps to fix it on my end as a user?
![]()
Hi @Argandov, The recommended solution would be the one proposed by @Vombato: https://github.com/prowler-cloud/prowler/issues/9401#issuecomment-3601742195.