Magento2: SessionHandler::read(): open(tcp://10.20.30.40:6379/sess_xxx) failed: No such file or directory (2)

Created on 18 Dec 2016  路  5Comments  路  Source: magento/magento2

Preconditions

  1. magento 2.1.3
  2. redis 3.2.6
  3. php 7.0.14

Steps to reproduce

  1. configure redis sessions in php.ini and env.php
  2. start installation.
  3. remove redis settings, then install magento, put back redis settings then can not login to magento admin.

Expected result

  1. sessions must be stored in redis

Actual result

  1. get error something like this:
    SessionHandler::read(): open(tcp://10.20.30.40:6379/sess_xxx) failed: No such file or directory (2)
FrameworCache Clear Description Format is valid needs update bug report

Most helpful comment

I had the same problem because redis was set only for backend. But after adding redis also for session in config (see below) then it was working.

'session' => 
            array (
            'save' => 'redis',
            'redis' => 
                array (
                    'host' => '127.0.0.1',
                    'port' => '6379',
                    'password' => '',
                    'timeout' => '2.5',
                    'persistent_identifier' => '',
                    'database' => '0',
                    'compression_threshold' => '2048',
                    'compression_library' => 'gzip',
                    'log_level' => '1',
                    'max_concurrency' => '6',
                    'break_after_frontend' => '5',
                    'break_after_adminhtml' => '30',
                    'first_lifetime' => '600',
                    'bot_first_lifetime' => '60',
                    'bot_lifetime' => '7200',
                    'disable_locking' => '0',
                    'min_lifetime' => '60',
                    'max_lifetime' => '2592000'
                )
            ),

All 5 comments

I had the same problem because redis was set only for backend. But after adding redis also for session in config (see below) then it was working.

'session' => 
            array (
            'save' => 'redis',
            'redis' => 
                array (
                    'host' => '127.0.0.1',
                    'port' => '6379',
                    'password' => '',
                    'timeout' => '2.5',
                    'persistent_identifier' => '',
                    'database' => '0',
                    'compression_threshold' => '2048',
                    'compression_library' => 'gzip',
                    'log_level' => '1',
                    'max_concurrency' => '6',
                    'break_after_frontend' => '5',
                    'break_after_adminhtml' => '30',
                    'first_lifetime' => '600',
                    'bot_first_lifetime' => '60',
                    'bot_lifetime' => '7200',
                    'disable_locking' => '0',
                    'min_lifetime' => '60',
                    'max_lifetime' => '2592000'
                )
            ),

you dont understand, we have redis settings in php.ini and env.php, magento failed to work.
but other applications are ok.

Hi @magenx
Could you please let us know if the issue is still actual? Thank you

Magento 2.2.1
error is gone. looks like working.

@magenx Thanks for the feedback.

Was this page helpful?
0 / 5 - 0 ratings