Skip to first unread message

Simo Slaoui

unread,
Mar 16, 2021, 3:27:44 PM3/16/21
to AtoM Users

Hi everyone,
I'm trying to install and test Atom 2.6.2 on Ubuntu 20. I have this 504 Gateway Timeout error. And cannot go directly to "http://localhost/index.php/sfInstallPlugin/configureSite" I have this Error 500!
I followed step by step the documentation, and installed everything twice.
Some users recommended to restart all tasks PHP, SQL, and Atom.worker!! In documentation I didn't find any information about this service. Maybe it's related to my bug.
If someone can help me to start the website ;-)
Many thanks

Dan Gillean

unread,
Mar 17, 2021, 10:46:59 AM3/17/21
to ICA-AtoM Users
Hi Simo, 

There are 2 recommendations for dealing 504 timeouts during installation in this thread: 
If the first method (skipping to the next page) is not working, then I would recommend that you try altering the fastcgi_read_timeout value in the nginx configuration file, as the second solution recommends. Don't forget to reload Nginx after making changes:
  • sudo systemctl reload nginx
Another thing you could try doing is increasing the PHP execution limits. We have a guide here: 
You mention that you have a 500 error, which is different than a 504 timeout. If in fact you have a separate 500 error, the first thing to do is to check the webserver error logs for more information. If you have followed our recommended installation guide and used Nginx as your webserver, you can check the error logs with: 
  • sudo tail -f /var/log/nginx/error.log
Feel free to share any message you find there. 

Finally, we come to the atom-worker. AtoM uses a job scheduler to execute some long-running tasks in the background, so they do not tie up the web browser with a synchronous request and potentially time out - most web browsers have a default timeout limit of about 1 minute. In AtoM, we use Gearman as the job scheduler, which can deploy workers to complete tasks in the queue. Examples of things we use the job scheduler to complete in AtoM include: imports and exports via the user interface, description move operations, updates to the search index triggered by user changes to records, DIP uploads from Archivematica, calculating description date ranges from lower levels, generating reports and finding aids, and more. 

You can find the installation and configuration instructions here: 
If you have already installed and configured Gearman, then it's possible that the job scheduler simply needs a restart. You will know this is the case if you look in the error logs and see a message like, "No Gearman worker available that can handle the job."

To restart the atom-worker, see:
These same details are found on the Gearman installation and configuration page. Some notes on restarting:
  • You can check the status of the atom-worker at any time with: sudo systemctl status atom-worker.This is useful to make sure the restart was successful.
  •  When the worker dies, AtoM will attempt to automatically restart it - however, to prevent the system from being caught in an endless loop, we added a restart limit - 3 retries every 24 hours. You can reset this fail limit with the following command:
  • sudo systemctl reset-failed atom-worker
  • Then run the restart command again if the previous attempts didn't work. 
Let us know if this helps you resolve the installation issues! 

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/4607be47-b11b-4c85-b1b8-8a27dcbc0f79n%40googlegroups.com.
Message has been deleted

Dan Gillean

unread,
Mar 22, 2021, 10:46:14 AM3/22/21
to ICA-AtoM Users
Hi Simo, 

For the job scheduler issue, I think you've hit the restart limit. Try: 
  • sudo systemctl reset-failed atom-worker
  • sudo systemctl start atom-worker
  • You can then check that it's running with: sudo systemctl status atom-worker
The other error is a bit less clear on how to proceed. One thing I will note, which I didn't catch in my first reply: AtoM 2.6 has been tested with PHP 7.2 and Ubuntu 18.04. While we will aim for 20.04 and newer PHP versions for the next major release, at this time using 20.04 with AtoM 2.6 is untested - so it could be causing issues! In any case, I will try to provide some suggestions below. 

Are you trying to load an older database and upgrade from a previous version, or is this a fresh install with no previous data to load?

The first thing I would double-check is that the filesystem permissions are correctly set. AtoM expects all files and directories to be owned by the www-data user. You can reset the permissions with the following command: 
Let's also ensure that you are using the correct SQL modes. AtoM 2.6 expects MySQL 8.0, and during the installation process we recommend making a configuration file that defines the SQL modes we want, near the end of this section: 
We can double-check these and change them if needed. We'll need access to the MySQL command prompt to do so. See: 
Make sure that the SQL modes in your file match those in the installation instructions linked above. Instructions on how to check and change them here: 
If you do make changes, remember to restart MySQL after. 

If you have tried to load an older database, make sure you have a backup outside of AtoM before proceeding! We're going to purge the database to see if it helps. If you need help making a backup, see: 
Now, let's try purging all data. This can help sometimes even if you don't think you have any data in the system. The following command will purge all data from AtoM's database:
  • php symfony tools:purge
The task will walk you through the process of giving the site a title and description, and creating a new admin user. You may want to try running some of the maintenance tasks after, such as clearing the application cache, restarting PHP-FPM, etc. before re-testing. 

Clear the application cache

Restart PHP-FPM

If you have memcached installed, it is good to clear that cache as well. This command should not have any ill effects if you don't have memcached installed, so you can always try it out: 

Repopulate the search index

If that STILL doesn't change anything....

Then I would guess that our original attempt to work around the 504 error didn't quite take. You may want to try returning to "http://localhost/index.php/sfInstallPlugin/loadData" and see if you can get it working, either by waiting longer before manually advancing to configureSite, or by increasing the execution limits in Nginx and PHP as I first suggested. 

 Let us know how it goes!

Cheers, 

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


On Mon, Mar 22, 2021 at 9:54 AM Simo Slaoui <icon...@gmail.com> wrote:
Hi Dan,
Thank you for your reply and your help.
I confirm that I have 500 Internal Server Error after filling the configuresite page and save.
I finally installed de atom.worker service but I got this message after  this command "sudo systemctl restart atom-worker":

atom-worker.service - AtoM worker
     Loaded: loaded (/usr/lib/systemd/system/atom-worker.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2021-03-17 21:57:39 CET; 14min ago
   Main PID: 5794 (code=exited, status=255/EXCEPTION)

mars 17 21:57:39 simo-MS-7851 systemd[1]: atom-worker.service: Scheduled restart job, restart counter is at 3.
mars 17 21:57:39 simo-MS-7851 systemd[1]: Stopped AtoM worker.
mars 17 21:57:39 simo-MS-7851 systemd[1]: atom-worker.service: Start request repeated too quickly.
mars 17 21:57:39 simo-MS-7851 systemd[1]: atom-worker.service: Failed with result 'exit-code'.
mars 17 21:57:39 simo-MS-7851 systemd[1]: Failed to start AtoM worker.

I also launched the "sudo tail -f /var/log/nginx/error.log" command and I got this:

 /usr/share/nginx/atom/lib/filter/QubitSettingsFilter.class.php(24): QubitCache::getInstance()
#3 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(1045): QubitSettingsFilter->execute(Object(sfFilterChain))
#4 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(1009): sfFilterChain->execute()
#5 /usr/share/nginx/atom/cache/qubit/prod/config/config_core_compile.yml.php(1045): sfRenderingFilter->execute(Object(sfFilterChain))
#6 /usr/share/nginx/atom/plugins/sfHistoryPlugin/lib/sfHistoryPluginFilter.class.php(18): sfFilterChain->execute()
#7 /usr/share/nginx/ato" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "127.0.0.1"
2021/03/17 21:50:24 [error] 1066#1066: *20 FastCGI sent in stderr: "PHP message: Unable to execute INSERT statement. [wrapped: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.setting' doesn't exist]" while reading response header from upstream, client: 127.0.0.1, server: _, request: "POST /index.php/sfInstallPlugin/configureSite HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/index.php/sfInstallPlugin/configureSite"
2021/03/17 21:54:44 [error] 1066#1066: *30 FastCGI sent in stderr: "PHP message: Unable to execute INSERT statement. [wrapped: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.setting' doesn't exist]" while reading response header from upstream, client: 127.0.0.1, server: _, request: "POST /index.php/sfInstallPlugin/configureSite HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/index.php/sfInstallPlugin/configureSite"
2021/03/17 21:55:07 [notice] 5679#5679: signal process started
2021/03/17 21:56:31 [error] 5680#5680: *33 FastCGI sent in stderr: "PHP message: Unable to execute INSERT statement. [wrapped: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'atom.setting' doesn't exist]" while reading response header from upstream, client: 127.0.0.1, server: _, request: "POST /index.php/sfInstallPlugin/configureSite HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock:", host: "127.0.0.1", referrer: "http://127.0.0.1/index.php/sfInstallPlugin/configureSite"

I feel that I'm almost there ...

Thank you for your help again

Simo Slaoui

unread,
Mar 23, 2021, 6:31:09 AM3/23/21
to AtoM Users
Thanks again Dan for your support.
I restart a fresh installation from scratch, step by step, with a special attention to Gearman server, and now everythings works fine now!! I'm back to Ubuntu 18 with PHP 7.2. and MySql8.
I Tried also to install it on a linux vserver online and on 4gb server I had some issues (timeout, elasticsearch...) randomly, but with 8gb RAM server, everything works a way better.
Now I can finnaly start discovering Atom.
Vielen Dank from Germany

Dan Gillean

unread,
Mar 23, 2021, 9:36:06 AM3/23/21
to ICA-AtoM Users
Glad to hear that you've gotten it working, Simo! Thanks for updating the thread. 


Cheers, 

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

Reply all
Reply to author
Forward
0 new messages