EC2 failed to access to the internet when to use `Deep Learning GPU` AMIs

0

EC2 failed to access to the internet when to use Deep Learning GPU AMIs


  • EC2 failed to access to the internet when I use Deep Learning GPU AMIs.

  • As far as I know this is not a problem related to network interface, security group and routing table.

    • I can access to the EC2 via ssh and ping 8.8.8.8 works.
    • other EC2s that use the same security group and routing table can access to the internet properly.
  • I can access if and only if I modify nameserver in /etc/resolv.conf but it rolls back to the pre-built-in value soon.

  • Belows are my environments.

- Region: ap-northeast-2b
- Instance: gd4n.x2large
- AMI: (tried both of them and failed)
  - Deep Learning AMI GPU PyTorch 1.13.1 (Ubuntu 20.04) 20230103
  - Deep Learning AMI GPU PyTorch 1.13.1 (Amazon Linux 2) 20230105
  • Belows are pre-built-ins in /etc/resolv.conf
nameserver 127.0.0.53
options edns0 trust-ad
search ap-northeast-2.compute.internal
preguntada hace un año299 visualizaciones
1 Respuesta
0

It sounds like the EC2 instance is unable to properly resolve DNS names, which is preventing it from accessing the internet. One possible solution would be to modify the nameserver in the /etc/resolv.conf file to use a valid external DNS server, such as 8.8.8.8 or 8.8.4.4 (Google's public DNS servers). However, you mention that this change is not persistent and that the file is reverting back to its original state.

A possible cause could be that the AMI has a script that runs on startup that restores the original /etc/resolv.conf file. You may want to check for any such scripts and modify or disable them.

Another possible cause could be that the DHCP client on your instance is not properly updating the /etc/resolv.conf file. You may want to check the DHCP client configuration and ensure that it is set to update the DNS server information.

You can also try to use AWS Systems Manager to run commands on your instances. This can be useful to update the DNS server or check the DHCP configuration.

profile picture
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas