Hello,
I just deployed my NextJS application to an aws ECS cluster running in EC2. I created a production tenant and created all my keys for my environment. But I get this error -
Login handler failed. CAUSE: Discovery requests failing for https://stattracker.uk.auth0.com, outgoing request timed out after 5000ms
I have done some googling but can’t seem to see anything about this?
Thank you for posting your question. First of all, can you check that the URL is set correctly? Assuming your configuration is set correctly, I would verify the network accessibility on the AWS ECS cluster. Do you use network policies or security groups that might restrict outbound HTTPS traffic? Can you manually check from the ECS environment if you can reach the Auth0 Discovery endpoint?
hi @dawid.matuszczyk I just checked my EC2 config and I am using a security group to manage the inbound and outbound traffic.
I have enabled all traffic inbound on port 80 and port 443. For both Ipv4 and Ipv6
and I have enabled all traffic outbound on all ports and protocols.
I can’t seem to ssh onto my ec2 instance so not able to verify the connection manually. But my SG rules indicate that it should be able to access
@dawid.matuszczyk just updated my EC2 config to allow ssh. Connected via SSH and pinged stattracker.uk.auth0.com and that was perfectly fine with 0% packet loss. My ec2 instance currently connects via http. Would creating a certificate and connecting via https possibly alleviate this issue?
@dawid.matuszczyk another update, I have updated my load balancer to have a certificate for my site making it https. I am still getting the same error. Any help would be greatly appreciated. Not sure what else to check or do.
Thank you for the update, let me talk with the team to get more help, and I will come back to you as soon as I have more questions or answers. Thank you for being so patient!
Thanks for the response! The 2 things you wanted me to check:
from the host machine I was able to do both of them and there were no issues. However when running the same commands from the container it doesn’t work. It seems that my container doesn’t have internet access and as such can’t call out to your discovery endpoint.
I am using awsvpc networking mode in docker on a public subnet through some quick research it looks like it should be on a private subnet using a NAT gateway.
When I get some time, I am going to attempt to configure my networking as such and hopefully that will resolve the issue. I will update here once it either worked or didn’t.
Thanks for the help and hopefully my next update will be positive!
Looks like my issue was with my container and now that I have fixed my network settings I am able to get the auth pages loading. I am having another issue with signing up but because I believe it to be separate I am going to raise a separate issue for that!