Archivematica @ Wellcome Collection
  • Introduction
  • High-level design
  • Storing born-digital files
    • Creating a transfer package
    • Upload a transfer package to S3
    • Check a package was stored successfully
    • Downloading a package from the storage service
    • Following a package in the dashboard
  • Service architecture
    • How does Archivematica work?
      • The Archivematica apps
      • Microservices, tasks and jobs
      • Gearman, ElastiCache, and the MCP server/client
    • How is our deployment unusual?
      • What are our extra services?
      • ECS containers on EC2, not Fargate
      • Why we forked Archivematica
    • How it fits into the wider platform
  • About our deployment
    • Using Wellcome catalogue identifiers
    • Different environments
    • Working storage: MySQL, Redis, and EBS
  • Administering Archivematica
    • Bootstrapping a new Archivematica stack
    • User management
      • How to add or remove users
      • Authentication with Azure AD
    • Upgrading to a new version of Archivematica
    • Running an end-to-end test
    • Clearing old transfers from the dashboard
  • Debugging Archivematica
    • Where to find application logs
    • Troubleshooting known errors
      • Timeout waiting for network interface provisioning to complete
      • 401 Unauthorized when the s3_start_transfer Lambda tries to run
      • "pull access denied" when running containers (and other ECS agent issues)
      • "Unauthorized for url" when logging in
      • "gearman.errors.ExceededConnectionAttempts: Exceeded 1 connection attempt(s)" in MCP server
      • NotADirectoryError in the Extract zipped transfer stage
    • Restarting services if a task is stuck
    • SSH into the Archivematica container hosts
Powered by GitBook
On this page
  1. Debugging Archivematica
  2. Troubleshooting known errors

NotADirectoryError in the Extract zipped transfer stage

If you have to retry a transfer, you may see a "not a directory" error in the "Extract zipped transfer stage", for example:

[Errno 20] Not a directory: '/var/archivematica/sharedDirectory/currentlyProcessing/WT_C_6_2_9_3.zip'Traceback (most recent call last):
  File "/src/src/MCPClient/lib/job.py", line 103, in JobContext
    yield
  File "/src/src/MCPClient/lib/clientScripts/failed_transfer_cleanup.py", line 70, in call
    main(job, args.fail_type, args.transfer_uuid, args.transfer_path)
  File "/src/src/MCPClient/lib/clientScripts/failed_transfer_cleanup.py", line 33, in main
    for item in os.listdir(mets_dir):
NotADirectoryError: [Errno 20] Not a directory: '/var/archivematica/sharedDirectory/currentlyProcessing/WT_C_6_2_9_3.zip'

If this is the case, it means there's an old version of the transfer package lying around somewhere on the Archivematica disk. The way to fix this is to SSH into the Archivematica container host, and remove any versions of the transfer package from the currentlyProcessing folder.

For example, to fix WT_C_6_2_9_3.zip:

[root@ip-10-50-3-25 /]# cd /ebs
[root@ip-10-50-3-25 ebs]# find . -name '*WT_C_6_2_9_3*'
./pipeline-data/failed/WT_C_6_2_9_3.zip
./pipeline-data/tmp/tmpvrw7hglu/WT_C_6_2_9_3.zip.success.2023-07-24_11-14-51.log
./pipeline-data/tmp/tmpia_x8g31/WT_C_6_2_9_3.zip.success.2023-07-25_10-52-26.log
./pipeline-data/tmp/tmpia_x8g31/WT_C_6_2_9_3.zip.success.2023-07-25_11-31-34.log
./pipeline-data/tmp/tmpia_x8g31/WT_C_6_2_9_3.zip.success.2023-07-25_10-28-52.log
./pipeline-data/tmp/tmpia_x8g31/WT_C_6_2_9_3.zip.success.2023-07-24_11-14-51.log
./pipeline-data/tmp/tmpuv33syk2/WT_C_6_2_9_3.zip.success.2023-07-25_10-28-52.log
./pipeline-data/tmp/tmpuv33syk2/WT_C_6_2_9_3.zip.success.2023-07-24_11-14-51.log
./pipeline-data/tmp/tmpihlcvk6l/WT_C_6_2_9_3.zip.success.2023-07-25_10-52-26.log
./pipeline-data/tmp/tmpihlcvk6l/WT_C_6_2_9_3.zip.success.2023-07-25_10-28-52.log
./pipeline-data/tmp/tmpihlcvk6l/WT_C_6_2_9_3.zip.success.2023-07-24_11-14-51.log
./pipeline-data/currentlyProcessing/WT_C_6_2_9_3
[root@ip-10-50-3-25 ebs]# rm -rf ./pipeline-data/currentlyProcessing/WT_C_6_2_9_3
Previous"gearman.errors.ExceededConnectionAttempts: Exceeded 1 connection attempt(s)" in MCP serverNextRestarting services if a task is stuck

Last updated 1 year ago