You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I currently having a redis connection error when I try to run some scripts.
Here is the context:
There is a webscript directory which I put down the src/ directory (this directory reckons as the root directory of Magento) and the file structure will be like this
However, when I try to run this script with my phpstorm debugger, it pops up the error message:
PHP Fatal error: Uncaught CredisException: Connection to Redis redis:6379 failed after 2 failures.Last Error : (0) php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/project/src/vendor/colinmollenhour/credis/Client.php:463
Stack trace:
#0 /opt/project/src/vendor/colinmollenhour/credis/Client.php(459): Credis_Client->connect()
#1 /opt/project/src/vendor/colinmollenhour/credis/Client.php(792): Credis_Client->connect()
#2 /opt/project/src/vendor/colinmollenhour/credis/Client.php(619): Credis_Client->__call('select', Array)
#3 /opt/project/src/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php(369): Credis_Client->select(1)
#4 /opt/project/src/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php(242): Cm_Cache_Backend_Redis->_applyClientOptions(Object(Credis_Client))
#5 /opt/project/src/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
#6 /opt/project/src/vendor/magento/zendframework1/library/Zend/Cache.php(94): Ze in /opt/project/src/vendor/colinmollenhour/credis/Client.php on line 463
It seems like the they cannot find the redis:6379. I have done some search about this redis connection with magento, but it is barely to find and related information.
I am appreciated if someone can put me out of this puzzle. Thanks,
The text was updated successfully, but these errors were encountered:
Redis uses 3 databases. From your code above, 2 of the databases (0,1) run on host 'redis' the session controller (database 2) runs on host 'redis_session'. I am struggling to setup PHPStorm so that is as much help as I can give until someone replies to me on here with a bit of help on setting it up.
Hi guys, I currently having a redis connection error when I try to run some scripts.
Here is the context:
There is a webscript directory which I put down the src/ directory (this directory reckons as the root directory of Magento) and the file structure will be like this
Structure:
src/webscript/test.php
Code of test.php:
Code of env.php:
Code of docker_compose.yml:
However, when I try to run this script with my phpstorm debugger, it pops up the error message:
It seems like the they cannot find the
redis:6379
. I have done some search about this redis connection with magento, but it is barely to find and related information.I am appreciated if someone can put me out of this puzzle. Thanks,
The text was updated successfully, but these errors were encountered: