Magento 2.2.6 Upgrade – How to Fix Magento 2.2.5 to 2.2.6 Upgrade Error

magento2.2.6redisupgradevarnish

When trying to upgrade from Magento 2.2.5 to 2.2.6 I've noticed some strange behavior blocking the upgrade. The first commands I did without problem are:

composer require magento/product-community-edition 2.2.6 --no-update
composer update
rm -rf var/di var/generation

Following this I normally clear the cache (php bin/magento cache:flush) but I get the following error:

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "cache" namespace.

Are the cache commands removed/changed in 2.2.6 or is this a problem straight away?

I tried to continue without that (using command: php bin/magento setup:upgrade) but I get a different error:

[Magento\Framework\Exception\LocalizedException]
Init vector must be a string of 32 bytes.

Things I have tried so far:

  1. Roll back changes and use same update process without first specifying version 2.2.6. This updated several modules including 3rd party ones. Cache command was working fine and the whole thing went smoothly. Following that I tried updating to 2.2.6 again but got the same errors as above.

  2. Double checked the file system ownership was set correctly using commands I previously have used.

Any ideas?

Best Answer

We user varnish and redis cache on our server and had this same error. This is the procedure we followed for a successful upgrade.

composer require magento/product-community-edition 2.2.6 --no-update
composer update
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/*
redis-cli flushdb
curl -X 'PURGE' -H'X-Magento-Tags-Pattern: .*'  localhost:8072
php70 bin/magento setup:upgrade

I believe redis and/or varnish are the culprit in this issue.

Related Topic