artefactual / automation-tools

Tools to aid automation of Archivematica and AtoM.
GNU Affero General Public License v3.0
46 stars 33 forks source link

Problem: processing hangs because UUID for ingest is missing in the Sqlite database #110

Closed ThomasEdvardsen closed 5 years ago

ThomasEdvardsen commented 5 years ago

From time to time the UUID is missing in the Sqlite database. Automation Tools will never get an update on the status for this unit since the UUID is missing and then constructs an api-call which is not valid.

When running the API call manually, I got status "Completed" so updating the uuid field finishes this unit in the database.

It seems to me that something gets wrong when updating the db, when changing from transfer to ingest as unit type.

sqlite> select * from unit where id > 33;
id          uuid        path                                unit_type   status      microservice  current   
----------  ----------  ----------------------------------  ----------  ----------  ------------  ----------
34          7c7a75b5-9  auto/pliktmusikk_EAN_7071245336653  ingest      COMPLETE                  0         
35                      auto/pliktmusikk_EAN_7071245339920  ingest      PROCESSING                1 

From the log: INFO 2019-05-15 09:51:01 transfer.py:579 Automation tools waking up INFO 2019-05-15 09:51:01 transfer.py:69 Configuration values read for pidfile: /var/archivematica/automation-tools/transfers-pid.lck INFO 2019-05-15 09:51:01 transfer.py:69 Configuration values read for databasefile: /var/archivematica/automation-tools/transfers.db INFO 2019-05-15 09:51:01 transfer.py:618 Current unit: <Unit(id=35, uuid=None, unit_type=ingest, path=auto/pliktmusikk_EAN_7071245339920, status=PROCESSING, current=True)> WARNING 2019-05-15 09:51:01 utils.py:56 GET Request to http://xxxxx:81/api/ingest/status/None/ returned 404 NOT FOUND INFO 2019-05-15 09:51:01 transfer.py:632 Status info: Invalid response from server, check amclient log ERROR 2019-05-15 09:51:01 transfer.py:641 Cannot read response from server for <Unit(id=35, uuid=None, unit_type=ingest, path=auto/pliktmusikk_EAN_7071245339920, status=PROCESSING, current=True)>: 'str' object has no attribute 'get' INFO 2019-05-15 09:51:01 transfer.py:49 Running post-execution clean-up. Exiting script

ross-spencer commented 5 years ago

Hi @ThomasEdvardsen, thanks for reporting this. We're currently maintaining all new issues in the Archivematica issues repository, so I have migrated this over there: https://github.com/archivematica/Issues/issues/690 I'll provide some additional commentary there and close this one out for now.