yum이 [Errno 256] No more mirrors to try 오류를 반환하는 이유는 무엇인가요?
Environment
- Red Hat Enterprise Linux
- Red Hat Customer Portal
- Red Hat Subscription Management (RHSM)
- Red Hat Satellite
Issue
yum update가 다음 오류와 함께 실패함 : [Errno 256] No more mirrors to try
Resolution
-
네트워크 연결을 확인하세요. IP 기반 방화벽을 사용하는 경우 콘텐츠 전송 네트워크(CDN)에 액세스하기 위해 Public CIDR Lists for Red Hat (IP Addresses for cdn.redhat.com)에 언급된 IP를 허용 목록에 추가하세요.
-
다음 명령으로
/etc/yum.repos.d디렉토리에 어떤 파일이 있는지 확인하세요:-# ll /etc/yum.repos.d -
시스템이 subscription-manager를 통해 Red Hat Subscription Manager(RHSM)에 등록된 경우
rhel-source.repo와redhat.repo가 존재합니다. -
로컬 저장소나 기타 미디어 저장소가 있는 경우 다음 명령으로 제거하세요:-
# rm -rf /etc/yum.repos.d/<로컬 또는 기타 저장소 이름> -
다음 명령을 실행하여 시스템에서 이전 yum 캐시를 제거하세요:
# rm -fr /var/cache/yum/* # yum clean all -
다음 명령으로 유효한 저장소가 목록에 표시되는지 확인하세요:-
# yum repolist -
이전 솔루션이 작동하지 않으면 다음 명령으로 각 저장소를 하나씩 다시 활성화해 보세요:-
# REPOLIST=`subscription-manager repos --list-enabled | grep "Repo ID" | awk '{print $3}'` # subscription-manager repos --disable="*" # rm -fr /var/cache/yum/* # yum clean all # for i in ${REPOLIST}; do subscription-manager repos --enable=$i ; yum repolist; done
Root Cause
- 이 문제의 가능한 원인:
- 손상된 yum 캐시.
- 네트워크 관련 문제로 인한 시스템에서 저장소 URL에 대한 접근 불가.
- 사용자 정의 또는 기타 미디어 저장소의 존재.
- Red Hat의 콘텐츠 전송 네트워크(CDN)에 접근하기 위해 IP 기반 방화벽 구성을 사용할 때 오래된 화이트리스트.
Diagnostic Steps
-
yum update가 다음 오류 중 하나로 실패하는 경우:-Error Downloading Packages: InstallMedia: [Errno 256] No more mirrors to try.Error Downloading Packages: ftp-0.17-35.el5.x86_64:failure:ftp-0.17-35.el5.x86_64.rpm from Red5repo55:[Errno 256] No more mirrors to try. [[6]]" (code -1) Packages ScheduledDownloading Packages: https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/supplementary/os/Packages/java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned an error: 404 Not Found" Trying other mirrors. Error Downloading Packages: 1:java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64: failure: Packages/java-1.6.0-ibm-1.6.0.15.0-1jpp.1.el6_4.x86_64.rpm from rhel-6-server-supplementary- rpms: [Errno 256] No more mirrors to try. -
Satellite Server에서는 /var/log/messages에 따라 다음 오류로 실패합니다.Jul 24 12:12:53 sat.example.com pulp: requests.packages.urllib3.connectionpool:INFO: Starting new HTTPS connection (1): cdn.redhat.com Jul 24 12:12:53 sat.example.com pulp: nectar.downloaders.threaded:INFO: Download failed: -
시스템/네트워크에서 저장소 URL의 접근성을 확인하세요.
# ping URL -
/etc/yum.repos.d아래의 저장소를 확인하세요.# ll /etc/yum.repos.d
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments