I have Magento 2.4.3-p1 running on an EC2 Instance. I tried to configure ElastiCache Redis to it. I set up the service and followed the steps in Magento documentation to enable it. However, when I entered the following command using my host and port, Magento crashed:
bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=<ElastiCache Primary Endpoint host> --cache-backend-redis-port=<ElastiCache Primary Endpoint port> --cache-backend-redis-db=0
After calling the command I got the following message:
We saved default values for these options: remote-storage-prefix, remote-storage-key, remote-storage-secret, amqp-host, amqp-port, amqp-user, amqp-password, amqp-virtualhost, amqp-ssl, amqp-ssl-options, db-ssl-key, db-ssl-cert, db-ssl-ca, db-ssl-verify, allow-parallel-generation.
It felt like a success message, but When I tried to open my e-commerce storefront and the admin panel, I got HTTP Error 500
. And when I tried to run any Magento command I got the following message:
MOVED 12337 {someIPAddress}:{RedisPort}
I double-checked that the issue comes from the Redis configuration by commenting it in app\etc\env.php
and everything worked normally. Also, I checked all of the log files in var\log\
directory and none of them indicated any ERROR except in magento.cron.log
which had the previous message printed several times.
Is it a bug in Magento2? And if so, does anyone have a workaround to fix it?