Install Joomla 4.0-dev as normal
Provision a redis server (docker is easiest)
Change your Joomla Global Config to use Redis as a session handler with a known db (say, 2)
Click save and close.
Inspect your redis database - note that session metadata WAS written to db 2 correctly.
Attempt to login to Joomla admin again with correct credentials.
Login as normal with no problem.
Login fails with no error message
A new key is added to redis each login attempt
Labels |
Added:
?
|
off-topic
are you able to install j4 from github latest staging on docker ?
i'm experiencing npm issues......
Unable to reproduce with redis 4.0.1 & 6.0.3 and php redis 5.3.1 (i'm running redis directly on my macbook - just installed it with homebrew)
Labels |
Added:
Information Required
|
Just replicated this again today in production.
me too my redis version is 6.0.9 , but that doesn't matter here
The problem is when a user logs in we fork the session, that calls session_regenerate_id
which in turn is calling close() method in the redishandler.. then there is one call not prefixes with the SELECT 3 before the final one that is
1620577852.929944 [0 127.0.0.1:45328] "SELECT" "3"
1620577852.930576 [3 127.0.0.1:45328] "GET" "jfwq82eg5u74dbd04fgh403583uf9"
1620577853.013048 [3 127.0.0.1:45328] "SETEX" "jfwq82eg5u74dbd04fgh403583uf9" "900" "joomla|s:772:\"TzoyNDoiSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5IjozOntzOjc6IgAqAGRhdGEiO086ODoic3RkQ2xhc3MiOjM6e3M6Nzoic2Vzc2lvbiI7Tzo4OiJzdGRDbGFzcyI6NDp7czo3OiJjb3VudGVyIjtpOjE7czo1OiJ0aW1lciI7Tzo4OiJzdGRDbGFzcyI6Mzp7czo1OiJzdGFydCI7aToxNjIwNTc3ODE2O3M6NDoibGFzdCI7aToxNjIwNTc3ODE2O3M6Mzoibm93IjtpOjE2MjA1Nzc4MTY7fXM6NjoiY2xpZW50IjtPOjg6InN0ZENsYXNzIjoxOntzOjc6ImFkZHJlc3MiO3M6MTA6IjE3Mi4xOS4wLjEiO31zOjU6InRva2VuIjtzOjMyOiJiM2JkZWJmODg3YjllZjJkNmI2YzMzNGY4N2I1NGM2NiI7fXM6ODoicmVnaXN0cnkiO086MjQ6Ikpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeSI6Mzp7czo3OiIAKgBkYXRhIjtPOjg6InN0ZENsYXNzIjowOnt9czoxNDoiACoAaW5pdGlhbGl6ZWQiO2I6MDtzOjk6InNlcGFyYXRvciI7czoxOiIuIjt9czo0OiJ1c2VyIjtPOjIwOiJKb29tbGFcQ01TXFVzZXJcVXNlciI6MTp7czoyOiJpZCI7aTowO319czoxNDoiACoAaW5pdGlhbGl6ZWQiO2I6MDtzOjk6InNlcGFyYXRvciI7czoxOiIuIjt9\";"
# session_regenerate_id happens here
1620577853.013575 [0 127.0.0.1:45332] "GET" "jfw7hcnuunemq7cq4ook4s4fu29km"
1620577853.029165 [0 127.0.0.1:45332] "SETEX" "jfw7hcnuunemq7cq4ook4s4fu29km" "900" "joomla|s:776:\"TzoyNDoiSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5IjozOntzOjc6IgAqAGRhdGEiO086ODoic3RkQ2xhc3MiOjM6e3M6Nzoic2Vzc2lvbiI7Tzo4OiJzdGRDbGFzcyI6NDp7czo3OiJjb3VudGVyIjtpOjI7czo1OiJ0aW1lciI7Tzo4OiJzdGRDbGFzcyI6Mzp7czo1OiJzdGFydCI7aToxNjIwNTc3ODE2O3M6NDoibGFzdCI7aToxNjIwNTc3ODUyO3M6Mzoibm93IjtpOjE2MjA1Nzc4NTM7fXM6NjoiY2xpZW50IjtPOjg6InN0ZENsYXNzIjoxOntzOjc6ImFkZHJlc3MiO3M6MTA6IjE3Mi4xOS4wLjEiO31zOjU6InRva2VuIjtzOjMyOiJiM2JkZWJmODg3YjllZjJkNmI2YzMzNGY4N2I1NGM2NiI7fXM6ODoicmVnaXN0cnkiO086MjQ6Ikpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeSI6Mzp7czo3OiIAKgBkYXRhIjtPOjg6InN0ZENsYXNzIjowOnt9czoxNDoiACoAaW5pdGlhbGl6ZWQiO2I6MDtzOjk6InNlcGFyYXRvciI7czoxOiIuIjt9czo0OiJ1c2VyIjtPOjIwOiJKb29tbGFcQ01TXFVzZXJcVXNlciI6MTp7czoyOiJpZCI7aTo1MDt9fXM6MTQ6IgAqAGluaXRpYWxpemVkIjtiOjA7czo5OiJzZXBhcmF0b3IiO3M6MToiLiI7fQ==\";"
1620577853.037070 [0 127.0.0.1:45336] "SELECT" "3"
1620577853.037602 [3 127.0.0.1:45336] "GET" "jfw7hcnuunemq7cq4ook4s4fu29km"
1620577853.115258 [3 127.0.0.1:45336] "SETEX" "jfw7hcnuunemq7cq4ook4s4fu29km" "900" "joomla|s:772:\"TzoyNDoiSm9vbWxhXFJlZ2lzdHJ5XFJlZ2lzdHJ5IjozOntzOjc6IgAqAGRhdGEiO086ODoic3RkQ2xhc3MiOjM6e3M6Nzoic2Vzc2lvbiI7Tzo4OiJzdGRDbGFzcyI6NDp7czo3OiJjb3VudGVyIjtpOjE7czo1OiJ0aW1lciI7Tzo4OiJzdGRDbGFzcyI6Mzp7czo1OiJzdGFydCI7aToxNjIwNTc3ODUzO3M6NDoibGFzdCI7aToxNjIwNTc3ODUzO3M6Mzoibm93IjtpOjE2MjA1Nzc4NTM7fXM6NjoiY2xpZW50IjtPOjg6InN0ZENsYXNzIjoxOntzOjc6ImFkZHJlc3MiO3M6MTA6IjE3Mi4xOS4wLjEiO31zOjU6InRva2VuIjtzOjMyOiIzYzljMTA4ZDdlYTMzMDMzZTE2MjUyZmRkZGE2NjQ1MCI7fXM6ODoicmVnaXN0cnkiO086MjQ6Ikpvb21sYVxSZWdpc3RyeVxSZWdpc3RyeSI6Mzp7czo3OiIAKgBkYXRhIjtPOjg6InN0ZENsYXNzIjowOnt9czoxNDoiACoAaW5pdGlhbGl6ZWQiO2I6MDtzOjk6InNlcGFyYXRvciI7czoxOiIuIjt9czo0OiJ1c2VyIjtPOjIwOiJKb29tbGFcQ01TXFVzZXJcVXNlciI6MTp7czoyOiJpZCI7aTowO319czoxNDoiACoAaW5pdGlhbGl6ZWQiO2I6MDtzOjk6InNlcGFyYXRvciI7czoxOiIuIjt9\";"
Fix PRed upstream here joomla-framework/session#50
ok this PR upstream now works for login and logout joomla-framework/session#51
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-14 19:56:24 |
Closed_By | ⇒ | PhilETaylor |
Status | Closed | ⇒ | New |
Closed_Date | 2021-05-14 19:56:24 | ⇒ | |
Closed_By | PhilETaylor | ⇒ |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-14 19:56:35 |
Closed_By | ⇒ | PhilETaylor |
The installation of Joomla 4 is broken when using redis as a session manager for PHP.
PHP Warning: SessionHandler::read(): open(tcp://redis:6379/sess_nhqdh7rukrs8e9u44fi56hmmh6, O_RDWR) failed: No such file or directory (2) in /mnt/disks/nb-sites/www/xxx.xxx/libraries/vendor/joomla/session/src/Storage/NativeStorage.php
Works fine for Joomla 3
What EXACT configuration are you using in Joomla global Config? Also, are you configuring this in Joomla Global Config or php.ini?
Steps to reproduce:
Instead of the installation view, you will be greated with this:
ok so you are configuring in php.ini and not in Joomla - got it.
Now enable debug mode in Joomla Global Config to convert your Red Page of Death to a stack trace and post that here.
If Im honest, the message leads me to believe your redis server is not running...
It is running, as it is working fine for installation of Joomla 3 which I did five minutes ago. This is from our production environment were we are running about 70 different Joomla sites. Here is the stack trace:
RuntimeException:
Failed to start the session
at /mnt/disks/nb-sites/www/xxx.xxx/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:480
at Joomla\Session\Storage\NativeStorage->start()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Session/Storage/JoomlaStorage.php:305)
at Joomla\CMS\Session\Storage\JoomlaStorage->start()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/vendor/joomla/session/src/Session.php:405)
at Joomla\Session\Session->start()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/vendor/joomla/session/src/Session.php:332)
at Joomla\Session\Session->has()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Session/Session.php:201)
at Joomla\CMS\Session\Session->get()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Application/CMSApplication.php:532)
at Joomla\CMS\Application\CMSApplication->getMessageQueue()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Document/Renderer/Html/MessageRenderer.php:77)
at Joomla\CMS\Document\Renderer\Html\MessageRenderer->getData()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Document/Renderer/Html/MessageRenderer.php:38)
at Joomla\CMS\Document\Renderer\Html\MessageRenderer->render()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Document/HtmlDocument.php:589)
at Joomla\CMS\Document\HtmlDocument->getBuffer()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Document/HtmlDocument.php:895)
at Joomla\CMS\Document\HtmlDocument->_renderTemplate()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Document/HtmlDocument.php:660)
at Joomla\CMS\Document\HtmlDocument->render()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Document/ErrorDocument.php:140)
at Joomla\CMS\Document\ErrorDocument->render()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Error/Renderer/HtmlRenderer.php:77)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
(/mnt/disks/nb-sites/www/xxx.xxx/libraries/src/Exception/ExceptionHandler.php:128)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/mnt/disks/nb-sites/www/xxx.xxx/installation/src/Application/InstallationApplication.php:268)
at Joomla\CMS\Installation\Application\InstallationApplication->execute()
(/mnt/disks/nb-sites/www/xxx.xxx/installation/includes/app.php:65)
at require_once('/mnt/disks/nb-sites/www/xxx.xxx/installation/includes/app.php')
(/mnt/disks/nb-sites/www/xxx.xxx/installation/index.php:36)
confirmed on redis 5.0.7 too