๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
์„œ๋ฒ„/AWS

[EC2] 101: network is unreachable - apt update ์—๋Ÿฌ ํ•ด๊ฒฐ

by yunamom 2022. 7. 5.
๋ฐ˜์‘ํ˜•

AWS EC2 ์šฐ๋ถ„ํˆฌ ์„œ๋ฒ„์—๋Ÿฌ

 

101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค / 101: network is unreachable

ubuntu@green:~$ sudo apt update
์˜ค๋ฅ˜:1 http://security.ubuntu.com/ubuntu focal-security InRelease              
  security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2620:2d:4000:1::16). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2620:2d:4000:1::19). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2001:67c:1562::15). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (91.189.91.38). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค security.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (185.125.190.36). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค security.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (185.125.190.39). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค
์˜ค๋ฅ˜:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal InRelease     
  ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (52.78.32.75). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (52.79.128.16). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (13.124.245.230). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (13.124.255.209). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค
์˜ค๋ฅ˜:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates InRelease
  ap-northeast-2.ec2.archive.ubuntu.com:http์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค:
์˜ค๋ฅ˜:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu focal-backports InRelease
  ap-northeast-2.ec2.archive.ubuntu.com:http์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค:
ํŒจํ‚ค์ง€ ๋ชฉ๋ก์„ ์ฝ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค... ์™„๋ฃŒ                                            
์˜์กด์„ฑ ํŠธ๋ฆฌ๋ฅผ ๋งŒ๋“œ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค       
์ƒํƒœ ์ •๋ณด๋ฅผ ์ฝ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค... ์™„๋ฃŒ
๋ชจ๋“  ํŒจํ‚ค์ง€๊ฐ€ ์ตœ์‹ ์ž…๋‹ˆ๋‹ค.
W: http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu/dists/focal/InRelease ํŒŒ์ผ์„ ๋ฐ›๋Š”๋ฐ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค  ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (52.78.32.75). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (52.79.128.16). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (13.124.245.230). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค ap-northeast-2.ec2.archive.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (13.124.255.209). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค
W: http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease ํŒŒ์ผ์„ ๋ฐ›๋Š”๋ฐ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค  ap-northeast-2.ec2.archive.ubuntu.com:http์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค:
W: http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease ํŒŒ์ผ์„ ๋ฐ›๋Š”๋ฐ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค  ap-northeast-2.ec2.archive.ubuntu.com:http์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค:
W: http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease ํŒŒ์ผ์„ ๋ฐ›๋Š”๋ฐ ์‹คํŒจํ–ˆ์Šต๋‹ˆ๋‹ค  security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2620:2d:4000:1::16). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2620:2d:4000:1::19). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐ์„ ์ดˆ๊ธฐํ™”ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (2001:67c:1562::15). - connect (101: ๋„คํŠธ์›Œํฌ๊ฐ€ ์ ‘๊ทผ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค) security.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (91.189.91.38). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค security.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (185.125.190.36). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค security.ubuntu.com:80์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค (185.125.190.39). ์—ฐ๊ฒฐ ์ œํ•œ ์‹œ๊ฐ„์ด ์ดˆ๊ณผํ–ˆ์Šต๋‹ˆ๋‹ค
W: Some index files failed to download. They have been ignored, or old ones used instead.

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• : nameserver 8.8.8.8 ๋กœ ์ˆ˜์ •ํ›„ ๋ฆฌ๋ถ€ํŒ…

ubuntu:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search ap-northeast-2.compute.internal

ubuntu:~$ sudo vi /etc/resolv.conf

nameserver 8.8.8.8
options edns0 trust-ad
search ap-northeast-2.compute.internal
# :wq ์ €์žฅํ›„ ๋‚˜๊ฐ€๊ธฐ

ubuntu:~$ sudo reboot
# ๋ฆฌ๋ถ€ํŒ…

ubuntu:~$ sudo apt update
๋ฐ›๊ธฐ:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]         
๋ฐ›๊ธฐ:2 http://us.archive.ubuntu.com/ubuntu focal InRelease [265 kB]                
๋ฐ›๊ธฐ:3 http://security.ubuntu.com/ubuntu focal-security/restricted Sources [40.8 kB]
๋ฐ›๊ธฐ:4 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]        
๋ฐ›๊ธฐ:5 http://security.ubuntu.com/ubuntu focal-security/main Sources [235 kB] 
๋ฐ›๊ธฐ:6 http://us.archive.ubuntu.com/ubuntu focal/restricted Sources [6,472 B]
๋ฐ›๊ธฐ:7 http://us.archive.ubuntu.com/ubuntu focal/main Sources [847 kB] 
๋ฐ›๊ธฐ:8 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages [970 kB]
๋ฐ›๊ธฐ:9 http://us.archive.ubuntu.com/ubuntu focal/main Translation-ko [204 kB]     
๋ฐ›๊ธฐ:10 http://us.archive.ubuntu.com/ubuntu focal/main Translation-en [506 kB]
๋ฐ›๊ธฐ:11 http://us.archive.ubuntu.com/ubuntu focal/main amd64 c-n-f Metadata [29.5 kB]
๋ฐ›๊ธฐ:12 http://us.archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [22.0 kB]
๋ฐ›๊ธฐ:13 http://us.archive.ubuntu.com/ubuntu focal/restricted Translation-ko [716 B]
๋ฐ›๊ธฐ:14 http://us.archive.ubuntu.com/ubuntu focal/restricted Translation-en [6,212 B]
๋ฐ›๊ธฐ:15 http://us.archive.ubuntu.com/ubuntu focal/restricted amd64 c-n-f Metadata [392 B]
๋ฐ›๊ธฐ:16 http://us.archive.ubuntu.com/ubuntu focal-updates/main Sources [504 kB]
๋ฐ›๊ธฐ:17 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted Sources [43.5 kB]
๋ฐ›๊ธฐ:18 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,946 kB]
๋ฐ›๊ธฐ:19 http://us.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [352 kB]
๋ฐ›๊ธฐ:20 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [15.6 kB]
๋ฐ›๊ธฐ:21 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1,141 kB]
๋ฐ›๊ธฐ:22 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [162 kB]
๋ฐ›๊ธฐ:23 http://us.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [592 B]
๋‚ด๋ ค๋ฐ›๊ธฐ 7,525 k๋ฐ”์ดํŠธ, ์†Œ์š”์‹œ๊ฐ„ 4์ดˆ (1,953 k๋ฐ”์ดํŠธ/์ดˆ)          
ํŒจํ‚ค์ง€ ๋ชฉ๋ก์„ ์ฝ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค... ์™„๋ฃŒ
์˜์กด์„ฑ ํŠธ๋ฆฌ๋ฅผ ๋งŒ๋“œ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค       
์ƒํƒœ ์ •๋ณด๋ฅผ ์ฝ๋Š” ์ค‘์ž…๋‹ˆ๋‹ค... ์™„๋ฃŒ
๋ชจ๋“  ํŒจํ‚ค์ง€๊ฐ€ ์ตœ์‹ ์ž…๋‹ˆ๋‹ค.

๋ฆฌ๋ถ€ํŒ…ํ›„ ํ™•์ธํ•ด๋ณด๋ฉด nameserver 127.0.0.53 ๋กœ ์ดˆ๊ธฐํ™” ๋˜์–ด์žˆ๋‹ค.

ubuntu:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search ap-northeast-2.compute.internal

 

300x250

์ฝ”๋“œ