0

I have tried to set up one source in the local environment with docker image but getting an issue like below

Fatal error: Uncaught CredisException: Connection to Redis failed after 2 failures.Last Error : (0) php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/xyz/vendor/colinmollenhour/credis/Client.php on line 448

CredisException: Connection to Redis failed after 2 failures.Last Error : (0) php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/xyz/vendor/colinmollenhour/credis/Client.php on line 448

I have attached an image for more reference.enter image description here

  • Have you found out a solution yet? – Eric Cavalcanti Jun 8 at 2:10
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Jai Jun 8 at 2:50
  • @Eric Cavalcanti No – Yogesh Jun 8 at 6:54
0

@Yogesh, I can't add comments yet, sorry to add this as an answer. So we are getting the same PHP error when a code deploy is finished. We are using Kubernetes, so during a code deploy the new docker image is created and then a new pod initializes. When the new pod is online then Kubernetes terminates the old pod.

I am still not 100% sure which pod is actually throwing the error, but my wild guess is the pod initializing. For some reason Magento is trying to connect to Magento and the pod still doesn't have connection to the Redis instance. We ship logs to Kibana and now we will add which pod is throwing the error to the JSON on Kibana so we can tell which pod is actually throwing the error.

But the issue here is that Magento is trying to connect to Redis when the container is still starting up (at least on our case). When do you see the error happening?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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