1

I'm new to Magento and trying to install for the first time. However during the installation I get this weird error:

Module 'Magento_WishlistSampleData':

DDL cache cleared successfully

Installing user configuration...
[ERROR] exception 'Exception' with message 'Warning: SessionHandler::read(): open(unix:///data/sockets/databases/redis/redis.sock?persistent=1&weight=1&database=0&prefix=PHPREDIS_SESSION-abcd-/sess_42tt4f3ppg1ql8i7kppad25225, O_RDWR) failed: No such file or directory (2) in /data/web/abcd/html/verlag_2.19/vendor/magento/framework/Session/SaveHandler/Native.php on line 22' in /data/web/abcd/html/verlag_2.19/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'SessionHandler:...', '/data/web/abc...', 22, Array)
#1 /data/web/abcd/html/verlag_2.19/vendor/magento/framework/Session/SaveHandler/Native.php(22): SessionHandler->read('4muc5gl98q850vt...')
#2 /data/web/abcd/html/verlag_2.19/vendor/magento/framework/Session/SaveHandler.php(93): Magento\Framework\Session\SaveHandler\Native->read('4muc5gl98q850vt...')
#3 [internal function]: Magento\Framework\Session\SaveHandler->read('4muc5gl98q850vt...')
#4 /data/web/abcd/html/verlag_2.19/vendor/magento/framework/Session/SessionManager.php(189): session_start()
#5 /data/web/abcd/html/verlag_2.19/var/generation/Magento/Backend/Model/Auth/Session/Interceptor.php(167): Magento\Framework\Session\SessionManager->start()
#6 /data/web/abcd/html/verlag_2.19/vendor/magento/framework/Session/SessionManager.php(130): Magento\Backend\Model\Auth\Session\Interceptor->start()
#7 /data/web/abcd/html/verlag_2.19/vendor/magento/module-backend/Model/Auth/Session.php(98): Magento\Framework\Session\SessionManager->__construct(Object(Magento\Framework\App\Request\Http), Object(Magento\Framework\Session\SidResolver\Proxy), Object(Magento\Framework\Session\Config), Object(Magento\Framework\Session\SaveHandler), Object(Magento\Framework\Session\Validator), Object(Magento\Framework\Session\Storage), Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager), Object(Magento\Framework\Stdlib\Cookie\CookieMetadataFactory), Object(Magento\Framework\App\State))
#8 /data/web/abcd/html/verlag_2.19/var/generation/Magento/Backend/Model/Auth/Session/Interceptor.php(14): Magento\Backend\Model\Auth\Session->__construct(Object(Magento\Framework\App\Request\Http), Object(Magento\Framework\Session\SidResolver\Proxy), Object(Magento\Framework\Session\Config), Object(Magento\Framework\Session\SaveHandler), Object(Magento\Framework\Session\Validator), Object(Magento\Framework\Session\Storage), Object(Magento\Framework\Stdlib\Cookie\PhpCookieManager), Object(Magento\Framework\Stdlib\Cookie\CookieMetadataFactory), Object(Magento\Framework\App\State), Object(Magento\Framework\Acl\Builder\Proxy), Object(Magento\Backend\Model\Url), Object(Magento\Backend\App\Config))

In the configuration options I have tried both Session and Db, but the outcome is the same...

1 Answer 1

1

Unless you have redis installed and configured correctly this will happen.

If you open your app/etc/env.php file you will see a couple of nodes in there which relate to redis cache. You can just remove these. Should look something like this :

'cache' =>
array(
   'frontend' =>
   array(
      'default' =>
      array(
         'backend' => 'Cm_Cache_Backend_Redis',
         'backend_options' =>
         array(
            'server' => '127.0.0.1',
            'database' => '0',
            'port' => '6379'
            ),
    ),
    'page_cache' =>
    array(
      'backend' => 'Cm_Cache_Backend_Redis',
      'backend_options' =>
       array(
         'server' => '127.0.0.1',
         'port' => '6379',
         'database' => '1',
         'compress_data' => '0'
       )
    )
  )
),

You can just get rid of the whole thing.

Sessions are similar in this regard. In env.php you may see a section like this :

'session' =>
array (
  'save' => 'redis',
  'redis' =>
  array (
    'host' => '127.0.0.1',
    'port' => '6379',
    'password' => '',
    'timeout' => '2.5',
    'persistent_identifier' => '',
    'database' => '2',
    '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'
  )
),

Just change it to :

'session' => 
  array (
    'save' => 'db', // or 'files'
  ),

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.