Using:
Archivematica Storage Service
0.18.1
Archivematica
1.13.2
On CentOS 7.9 (same server for both services)
While ingesting a folder, my colleague reported seeing an error and after some digging, I've got it down to the shutil.copytree python3 module. It's during the "Prepare AIP" microservice where it fails. The logs weren't very helpful though they did point me to the file - just not why it's failing (Invalid argument):
I've checked to make sure those directories exist, and they do. I even pulled out just this portion of the script, creating a simple python script, and it fails with the same error.
Script (test.py):
import os
import shutil
from optparse import OptionParser
import traceback
src = '/var/archivematica/sharedDirectory/currentlyProcessing/01_Annual_Reports_JLM-aacadaa3-633d-4197-a926-4fc723af87af/logs/bulk-e99f8dc8-2af2-4934-bdfe-7ff6cca714f7/'
dst = '/var/archivematica/sharedDirectory/watchedDirectories/workFlowDecisions/metadataReminder/01_Annual_Reports_JLM-70adce2b-1b33-4678-b7d6-2f9f172ebeb0/logs/transfers/01_Annual_Reports_JLM-aacadaa3-633d-4197-a926-4fc723af87af/logs/bulk-e99f8dc8-2af2-4934-bdfe-7ff6cca714f7/'
shutil.copytree(src, dst)
-------- ERROR REPORT ----------
Traceback (most recent call last):
File "test.py", line 10, in <module>
shutil.copytree(src, dst)
File "/usr/lib64/python3.6/shutil.py", line 365, in copytree
raise Error(errors)
shutil.Error: [('/var/archivematica/sharedDirectory/currentlyProcessing/01_Annual_Reports_JLM-aacadaa3-633d-4197-a926-4fc723af87af/logs/bulk-e99f8dc8-2af2-4934-bdfe-7ff6cca714f7/telephone_histogram.txt', '/var/archivematica/sharedDirectory/watchedDirectories/workFlowDecisions/metadataReminder/01_Annual_Reports_JLM-70adce2b-1b33-4678-b7d6-2f9f172ebeb0/logs/transfers/01_Annual_Reports_JLM-aacadaa3-633d-4197-a926-4fc723af87af/logs/bulk-e99f8dc8-2af2-4934-bdfe-7ff6cca714f7/telephone_histogram.txt', "[Errno 22] Invalid argument: '/var/archivematica/sharedDirectory/currentlyProcessing/01_Annual_Reports_JLM-aacadaa3-633d-4197-a926-4fc723af87af/logs/bulk-e99f8dc8-2af2-4934-bdfe-7ff6cca714f7/telephone_histogram.txt'")