2

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

3
  • Have you found out a solution yet? Commented Jun 8, 2019 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
    – Jarnail S
    Commented Jun 8, 2019 at 2:50
  • @Eric Cavalcanti No Commented Jun 8, 2019 at 6:54

1 Answer 1

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 and acknowledge you have read our privacy policy.

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