You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Worker session cleanup encounters an error on windows when trying to delete the session directory
Expected Behaviour
The worker session clean-up should complete with no error on removing folders. Or if it's unable to, it should be clear as to why it can't clean up those files.
Current Behaviour
INFO ==============================================
INFO --------- Session Cleanup
INFO ==============================================
INFO Deleting working directory: C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p
INFO Running command powershell -Command Remove-Item -Recurse -Force "C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\embedded_filespx71o14w, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp0m__4qks.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp18ls93eq.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp1mc0r0wh.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp5fmt4tnm.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp7lekhm28.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp7s2752oy.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp7yd2dznk.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmp88j9pq7r.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmphpdg2flf.json, C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p\tmptanj6h6p.json"
INFO Process failed to start: [WinError -2147024809] The parameter is incorrect.
ERROR Files within temporary directory C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p could not be deleted.
C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\site-packages\openjd\sessions\_session.py", line 438, in cleanup
self._working_dir.cleanup()
File "C:\Program Files\Python312\Lib\site-packages\openjd\sessions\_tempdir.py", line 151, in cleanup
raise RuntimeError(
RuntimeError: Files within temporary directory C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p could not be deleted.
C:\ProgramData\Amazon\OpenJD\session-5a318d14c9f246b099284f1904b7f8f7lie11m7p
Reproduction Steps
Launch a fleet with a Windows CMF worker
Submit a job to a queue used by that fleet that contains embedded files/folders
View session log and observe error
Possible Solution
At first we thought it was due to the way the paths were specified as a command separated string, but that command similar commands work locally. It's also does not appear to be a command-line length issue either. If the user doesn't have permissions to clean-up this folder (shouldn't be possible in normal operations), then you DO receive an Access to the path is denied. from the command.
If I had to guess, there might be something around files in the session directory still being open?
Exact version of the worker is unknown.
Package Version
0.27.X?
Language Version
Python 3.12
Dependencies
No response
Operating System
Windows
Other information
No response
The text was updated successfully, but these errors were encountered:
Describe Behaviour
Worker session cleanup encounters an error on windows when trying to delete the session directory
Expected Behaviour
The worker session clean-up should complete with no error on removing folders. Or if it's unable to, it should be clear as to why it can't clean up those files.
Current Behaviour
Reproduction Steps
Possible Solution
At first we thought it was due to the way the paths were specified as a command separated string, but that command similar commands work locally. It's also does not appear to be a command-line length issue either. If the user doesn't have permissions to clean-up this folder (shouldn't be possible in normal operations), then you DO receive an
Access to the path is denied.
from the command.If I had to guess, there might be something around files in the session directory still being open?
Exact version of the worker is unknown.
Package Version
0.27.X?
Language Version
Python 3.12
Dependencies
No response
Operating System
Windows
Other information
No response
The text was updated successfully, but these errors were encountered: