0/ Since it is an error due to a timeout, the hard drive access time, reading and writing speeds may influence a lot the result.
1/ Run Docker image joomla:3.9 (https://github.com/joomla/docker-joomla)
2/ Put this image behind a basic apache HTTP proxy, using something like ProxyPass http://
and ProxyPassReverse http://
, but without changing the default Timeout
directive (default value is 60).
3/ execute the installation wizard
4/ at final step (after step 3, when the JS installer calls the tasks requests on the server), wait ~2minutes and the error should happens in logs. The developer tools indicates a failed request on /installation/index.php?task=InstallDatabase
5/ Sometimes, you could be redirected on installer first step view after a while
Instead of the previous steps, another - quicker but not tested - procedure should work:
1/ do a simple unzip of a joomla install that includes the .htaccess generated from /htaccess.txt
2/ call /error/
on your browser to see the recursive redirection.
Every path string that matches \/([^\/]+)\/.*
except /installation/index.php
is affected, and will redirect to /$1/installation/
, then /$1/installation/installation/
, then...
Installer tells me "Installation finished!" after a while, and so I finished the installer execution and start using Joomla.
I got stuck on installation final step (after step 3) with an unhelpful error message, then get redirected on first step.
My browser indicates a "too many redirections" error in development tools, and Docker logs give me (cleaned logs):
POST /installation/index.php?task=InstallDatabase_backup HTTP/1.1
GET /error/HTTP_BAD_GATEWAY.html.var HTTP/1.1
GET /installation/installation/index.php HTTP/1.1
GET /installation/installation/installation/index.php HTTP/1.1
...
GET /installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/index.php HTTP/1.1
I finally found the main issue is because apache default request timeout is too short for the /installation/index.php?task=InstallDatabase
90+ seconds duration request.
Maybe the installer should print a note on it, since it is uncommon to have such long requests? Or maybe find another "proper" solution that don't use such long requests?
However my point here is that the .htaccess file does a too broad - and not well done - redirection: the apache-initiated /error/HTTP_BAD_GATEWAY.html.var
request should not be redirected recursively endlessly.
The installer is hard to debug because of this.
joomla:3.9
- looks like it is an alias for flavor 3.9.15-php7.3-apache
(cf https://github.com/joomla/docker-joomla/blob/8ef0242fd0d3d5e0753e248ec855e7864573ad87/php7.3/apache/Dockerfile)mysql:5.6
(as advised here: https://registry.hub.docker.com/_/joomla/)# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 5638 MB in 2.00 seconds = 2822.11 MB/sec
Timing buffered disk reads: 244 MB in 3.02 seconds = 80.83 MB/sec
Even if I use Docker, the error looks not linked to the docker declination of Joomla, but to Joomla itself.
Timeout: 180
to the proxy's virtualhost (the one containing the ProxyPass
directive).Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-10 23:00:55 |
Closed_By | ⇒ | strawhatgami |
I downloaded the last joomla from https://downloads.joomla.org/fr/latest, and plug it on my host apache.
I reproduced the second test (the quick method) with those virtual hosts (thus without Docker):
<Virtualhost *:443>
ServerName front.name
# Let's Encrypt verification dir
Alias /.well-known [hidden]
ProxyPass /.well-known !
ProxyPass / http://back.name/
ProxyPassReverse / http://back.name/
SSLEngine on
SSLCertificateFile [hidden].pem
SSLCertificateChainFile [hidden].pem
SSLCertificateKeyFile [hidden].pem
SSLCACertificateFile [hidden].pem
</VirtualHost>
<Virtualhost *:80>
ServerName back.name
DocumentRoot /path/to/joomla
<Directory /path/to/joomla/>
Options +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I also injected the .htaccess from my docker installation, and compared it with /htaccess.txt:
# diff .htaccess htaccess.txt
31c31
< #Options -Indexes
---
> Options -Indexes
86d85
<
The 2 files are nearly the same; at least we can say the redirection part is the same.
I confirm the issue does not exist (tested the quick method) when I delete the .htaccess. In such a case, I just have a standard 404.
Last but not least: with the aforementioned vhosts, I don't have the issue with the installer (the first method).
I have instead a pretty helpful message:
Gateway incorrecte!
Le serveur proxy a reçu une réponse incorrecte de la part d'un serveur supérieur.
...
Error (none)
Note for this last test: I kept the mysql container (I didn't install mysql on my host system) for the test.
Looks it's finally something to investigate at least partly on docker side.
I'll continue to investigate on my side, if I have relevant news I will post them here.
@strawhatgami Ok, thanks for investigating. Feel free to reopen this issue or make a new one if it turns out to be a Joomla issue.
I have just remembered that I forgot to make this vhost using exactly the same directives as the docker proxy one.
So I deleted Timeout: xx
and added ProxyPreserveHost On
and RequestHeader set X-Forwarded-Proto "https"
.
Now all paths - including /
and /installation/index.php
- do the endless redirection.
My current vhost (with the changes):
<Virtualhost *:443>
ServerName front.name
# Let's Encrypt verification dir
Alias /.well-known [hidden]
ProxyPass /.well-known !
ProxyPass / http://back.name:8000/
ProxyPassReverse / http://back.name:8000/
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
SSLEngine on
SSLCertificateFile [hidden]/cert.pem
SSLCertificateChainFile [hidden]/chain.pem
SSLCertificateKeyFile [hidden]/privkey.pem
SSLCACertificateFile [hidden]/fullchain.pem
</VirtualHost>
<Virtualhost *:8000>
ServerName back.name
DocumentRoot /path/to/joomla
<Directory /path/to/joomla/>
Options +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
With that new virtual host and a little digging in Joomla's code, I found the file includes/framework.php
calls header('Location: installation/index.php')
, that causes (in conjunction with the .htaccess) the endless redirection.
Maybe this can be changed to Location: /installation/index.php
(or a more complex system if Joomla supports to be mounted under paths)?
I can't really reproduce that. I have a .htaccess mainly based on the one shipping with Joomla 3.9, and for me error pages still work.
@strawhatgami Can you reproduce your first test (i.e. not the one mentioned here, this is the second test) with using a normal Joomla installation and not the docker image?