Unable to configure new installation of Atom 2.6 due to symfony issues

388 views
Skip to first unread message

Patrick Goetz

unread,
Aug 1, 2020, 12:37:55 PM8/1/20
to AtoM Users

Hi -

I discovered something odd in the middle of writing this post (see below), so am amending my text here if not the title of the post.

This is my 3rd time installing AtoM, and I haven't run into this issue previously.  I followed the installation instructions given here:


precisely in a freshly installed Ubuntu 18.04 instance.

When I go to execute the initial configuration using a web browser, as soon as I navigate to the URL associated with AtoM (in my case, localhost:8084) I get the following nginx error log:

2020/08/01 10:16:39 [error] 20136#20136: *72 FastCGI sent in stderr: "PHP message: No connection information in your runtime configuration file for datasource [propel]" 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: "localhost:8084"

Continuing with Check system shows no errors, but if one fills in the DB information and clicks on Save one gets 504 Gateway Timeout with the following nginx error log:

2020/08/01 11:24:30 [error] 20136#20136: *97 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /index.php/sfInstallPlugin/insertSql HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock", host: "localhost:8084", referrer: "http://localhost:8084/index.php/sfInstallPlugin/configureDatabase"

Since symfony is installed as part of AtoM, I'm not sure if it should be system visible, but it's not:

root@atom:/etc/systemd/system# php symfony cc
Could not open input file: symfony

Now, here is where it gets weird:
If I follow the same installation steps, but on the "Configure database" screen fail to enter a database password, so that the following error occurs:

Unable to open PDO connection [wrapped: SQLSTATE[HY000] [1045] Access denied for user 'atom'@'localhost' (using password: NO)]

If I now enter a database password and click Save and continue, the installation proceeds without further error! So, the post title is somewhat misleading; one can configure AtoM, just not as prescribed.


Patrick Goetz

unread,
Aug 2, 2020, 9:11:55 AM8/2/20
to AtoM Users
Addendum: The trick of attempting to configure the database without entering a password also fails intermittently, however eventually works.  In between, I have to:

  # rm /usr/share/nginx/atom/config/config.php
  # systemctl restart php7.2-fpm

José Raddaoui

unread,
Aug 2, 2020, 10:36:27 AM8/2/20
to AtoM Users
Hi Patrick,

I think you're seeing an old issue that we tried to improve in the latest releases ...

Addendum: The trick of attempting to configure the database without entering a password also fails intermittently, however eventually works.  In between, I have to:

  # rm /usr/share/nginx/atom/config/config.php
  # systemctl restart php7.2-fpm
2020/08/01 10:16:39 [error] 20136#20136: *72 FastCGI sent in stderr: "PHP message: No connection information in your runtime configuration file for datasource [propel]" 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: "localhost:8084"

This error is expected when config.php doesn't exist and it's part of the web installer mechanism.

Continuing with Check system shows no errors, but if one fills in the DB information and clicks on Save one gets 504 Gateway Timeout with the following nginx error log:

2020/08/01 11:24:30 [error] 20136#20136: *97 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /index.php/sfInstallPlugin/insertSql HTTP/1.1", upstream: "fastcgi://unix:/run/php7.2-fpm.atom.sock", host: "localhost:8084", referrer: "http://localhost:8084/index.php/sfInstallPlugin/configureDatabase"

This looks to be the web installer issue from the ticket above. In that ticket, we split the process in various web requests but as you can see, it's not a permanent solution and it can still timeout in one of those requests. We're studying to move all the process to a CLI installer in following versions to fully address this problem.

Since symfony is installed as part of AtoM, I'm not sure if it should be system visible, but it's not:

root@atom:/etc/systemd/system# php symfony cc
Could not open input file: symfony

The symfony executable is located in the AtoM folder so you need to run these commands from there.
 
Now, here is where it gets weird:
If I follow the same installation steps, but on the "Configure database" screen fail to enter a database password, so that the following error occurs:

Unable to open PDO connection [wrapped: SQLSTATE[HY000] [1045] Access denied for user 'atom'@'localhost' (using password: NO)]

If I now enter a database password and click Save and continue, the installation proceeds without further error! So, the post title is somewhat misleading; one can configure AtoM, just not as prescribed.

This is expected and I think it's sporadically working due to the timeout issue. For a more solid solution you may want to change the Nginx and PHP-FPM timeouts and execution time configurations to give a little more time to the install process. Also, I wonder what are your system specs. and if there is something that could be done in that regard to improve the performance of this process.

Best regards and sorry for all the troubles,
Radda. 

Patrick Goetz

unread,
Aug 3, 2020, 8:54:20 AM8/3/20
to AtoM Users
Hi Radda -

Thanks for the response.  In our case, AtoM is installed in an LXD container running on a relatively fast workstation with plenty of memory (32GB).  Because LXD containers run at bare metal speed, I'm not sure what can be done to improve the performance there, but (I've now gone through the initial configuration steps at least a dozen times for this release) it appears I can usual get the initial configuration to complete in around 3 attempts, so it's mostly just a bit of an inconvenience.  I glanced at https://projects.artefactual.com/issues/13051  and yes: it is absolutely an awful idea to interlace table structure alterations and record insertions.  I can't think of a single reason this would ever be necessary.  Get you DB tables set up the way you want them, then start adding data.  Beyond this, I've never understood the popularity of PHP web-based initial configuration systems and would much prefer a CLI option.

José Raddaoui

unread,
Aug 3, 2020, 9:59:48 AM8/3/20
to AtoM Users
Thanks Patrick, I really appreciate the feedback.

Does the installer always timeout in the load data step? Could it be that the timeout configuration is lower than 60 seconds in your web server or PHP-FPM configuration? Also, I don't understand what do you mean with 3 attempts, do you reload the failing URL and in one of them it works? Even if you get a web server timeout, the PHP process could still be running (based on the PHP-FPM max. execution time). So, if you get a timeout in the load data step, the workaround could just be to wait for that process to end and load the "configureSite" URL to complete the installation.

Bests,
Radda.

Reply all
Reply to author
Forward
0 new messages