Exception: "Unable to complete file import." v2.7.1

84 views
Skip to first unread message

Bryan Vasquez

unread,
Apr 18, 2023, 5:43:55 PM4/18/23
to AtoM Users
Greetings from Costa Rica,

We recently upgraded our AtoM version from 2.6.4 to 2.7.1, as part of the test of this upgrade we ran a file importation test of  a CSV. However, once we start this process we get the following message:

"Unable to complete file import. CsvName could not be moved to /usr/share/nginx/atom/uploads/tmp"

MicrosoftTeams-image (2).png

Thanks in advance for you help.
Bryan Vásquez.


Dan Gillean

unread,
Apr 19, 2023, 9:13:30 AM4/19/23
to ica-ato...@googlegroups.com
Hi Bryan, 

At first glance, this sounds like it could be an issue with properly setting the filesystem permissions. AtoM expects all files and directories below the root installation directory to be owned by the www-data user. You can try resetting the permissions with: 
You may want to clear the application cache, and restart PHP-FPM after making this change. Assuming you are using PHP 7.4 and have followed the recommended installation instructions, try: 
  • php symfony cc
  • sudo systemctl restart php7.4-fpm
Let us know if that helps! If not, please tell us more about your installation, such as the full version number listed in Admin > Settings, any changes you made from the recommended installation instructions, whether you have a custom theme or other local changes in place, etc.

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/9af26d2a-8bbb-4ca3-b95f-229fbf0cf97cn%40googlegroups.com.

Bryan Vasquez

unread,
Apr 19, 2023, 2:27:11 PM4/19/23
to AtoM Users
Thanks for your quick answer Mr. Dan,

That first solution related to permissions seems to worked, we can now import images to the records, but now everytime we try to import a CSV we get the 500 internal server error message, looking into the logs we find out that it is a problem related to the Atom Worker, following older conversations i ran the command sudo journalctl -f -u atom-worker showing an issue with the php version, but once we checked the actual php version it seems to be on the required 7.4 instead of 7.2.

MicrosoftTeams-image (1).png

We truly appreciate your help in order to find a solution.

Cheers.
Bryan Vásquez.

Dan Gillean

unread,
Apr 19, 2023, 3:21:08 PM4/19/23
to ica-ato...@googlegroups.com
Hello Bryan, 

I am not sure about the error message you are seeing with the PHP version, but if you are certain you are using PHP 7.4 as recommended for version 2.7, then let's ignore that for now. 

As for the atom-worker: 

The job scheduler includes some logic so that if a job fails, it will automatically retry the process. However, to avoid getting caught in an infinite loop, the configuration file includes a limit of 3 retry attempts in 24 hours. After that, the atom-worker will not restart unless you manually reset the fail limit counter again. See: 
You can reset this fail counter with: 
  • sudo systemctl reset-failed atom-worker
Then you can try starting or restarting the atom-worker as usual: 
  • sudo systemctl restart atom-worker
You can also double-check that it is running as expected with:
  • sudo systemctl status atom-worker 
Hopefully that will resolve the issue and allow you to import normally again! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


Bryan Vasquez

unread,
Apr 19, 2023, 4:01:08 PM4/19/23
to AtoM Users
Hello Mr. Dan,

I did the steps mentioned above, but unfortunately the result is an exception that I don't quite understand, 

MicrosoftTeams-image (1).png

We appreciate your enlightment in this matter.

Greetings.
Bryan Vásquez.

Dan Gillean

unread,
Apr 20, 2023, 9:23:04 AM4/20/23
to ica-ato...@googlegroups.com
Hi Bryan, 

Hmm, this is getting complex. I don't know that this will work, but first we can try to make sure there is not some stalled job that is causing the process to immediately fail, retry 3 times, and quit again as soon as you restart. You can try running the following command first to clear ALL queued jobs: 
  • php symfony jobs:clear
Then repeat the steps to reset the fail counter, restart the worker, and check the status. 

If it is still failing, then I suspect that the root cause may be related to this PHP version mismatch, as I can see 7.2 mentioned in part of the error message. 

Can you check what value is configured for the ExecStart parameter in the worker configuration file we create during installation at /usr/lib/systemd/system/atom-worker.service? See this section of the documentation: 
Basically, if you have otherwise followed our recommended installation instructions, then your configuration file should match the example above - in particular, make sure the ExecStart parameter is referencing PHP 7.4.

You might also want to double-check what version of PHP you have installed - see for example: 
If you do change the worker service config file, remember to clear the application cache and restart PHP-FPM after:
  • php symfony cc
  • sudo systemctl restart php7.4-fpm
Then you can try repeating the steps to reset the fail counter, restart the service, etc. 

Let us know what you find! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


Bryan Vasquez

unread,
Apr 20, 2023, 3:38:43 PM4/20/23
to AtoM Users
Hello Mr Dan,

We followed your recommedations, once we checked /usr/lib/systemd/system/atom-worker.service file and changed the php version from 7.2 to 7.4 on this file, it worked correctly after that, then we tried the importation again without any erros at the moment.

We truly appreciate your help.

Greetings, and thanks again for your support.

Bryan Vásquez.
Archivo Nacional de Costa Rica.
Reply all
Reply to author
Forward
0 new messages