Yum Cache failed. Error : amzn2-core/2/x86_64/group_gz FAILED

Can anyone help here when I deploy an EC2 instance on aws when yum makecache:

amzn2-core                                                                                                                                                                                                       | 3.7 kB  00:00:00     
amzn2extra-docker                                                                                                                                                                                                | 3.0 kB  00:00:00     
amzn2extra-nginx1                                                                                                                                                                                                | 3.0 kB  00:00:00     
amzn2extra-postgresql11                                                                                                                                                                                          | 3.0 kB  00:00:00     
amzn2extra-python3.8                                                                                                                                                                                             | 3.0 kB  00:00:00     
amzn2-core/2/x86_64/group_gz   FAILED                                          
https://amazonlinux-2-repos-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/2/core/2.0/x86_64/da64f79d533a70e6036c814aff5d1e823eeeb815054a7a3785d2d5198ff2eabc/repodata/comps.xml.gz?instance_id=i-08792031e5dac83de&region=eu-central-1: [Errno 14] curl#6 - "getaddrinfo() thread failed to start"
Trying other mirror.
amzn2-core/2/x86_64/filelists_ FAILED                                          
https://amazonlinux-2-repos-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/2/core/2.0/x86_64/da64f79d533a70e6036c814aff5d1e823eeeb815054a7a3785d2d5198ff2eabc/repodata/filelists.sqlite.gz?instance_id=i-08792031e5dac83de&region=eu-central-1: [Errno 14] curl#6 - "getaddrinfo() thread failed to start"
Trying other mirror.
amzn2-core/2/x86_64/updateinfo FAILED                                          
https://amazonlinux-2-repos-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/2/core/2.0/x86_64/da64f79d533a70e6036c814aff5d1e823eeeb815054a7a3785d2d5198ff2eabc/repodata/updateinfo.xml.gz?instance_id=i-08792031e5dac83de&region=eu-central-1: [Errno 14] curl#6 - "getaddrinfo() thread failed to start"
Trying other mirror.
(1/21): amzn2-core/2/x86_64/primary_db                                                                                                                                                                           |  66 MB  00:00:03     
(2/21): amzn2-core/2/x86_64/other_db                                                                                                                                                                             |  505 B  00:00:00     
no mem for new parser
Traceback (most recent call last):
  File "/usr/libexec/urlgrabber-ext-down", line 22, in <module>
    from urlgrabber.grabber import \
  File "/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 543, in <module>
    import urllib
  File "/usr/lib64/python2.7/urllib.py", line 1225, in <module>
    for a in _hexdig for b in _hexdig)
MemoryError
Traceback (most recent call last):
  File "/usr/libexec/urlgrabber-ext-down", line 22, in <module>
Traceback (most recent call last):
  File "/usr/libexec/urlgrabber-ext-down", line 22, in <module>
        from urlgrabber.grabber import \
  File "/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
from urlgrabber.grabber import \
  File "/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 55, in <module>
        from grabber import urlgrab, urlopen, urlread
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 544, in <module>
from grabber import urlgrab, urlopen, urlread
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 544, in <module>
    import urllib2
  File "/usr/lib64/python2.7/urllib2.py", line 93, in <module>
    import urllib2
  File "/usr/lib64/python2.7/urllib2.py", line 93, in <module>
    import hashlib
  File "/usr/lib64/python2.7/hashlib.py", line 116, in <module>
    import hashlib
  File "/usr/lib64/python2.7/hashlib.py", line 116, in <module>
    import _hashlib
ImportError: /usr/lib64/python2.7/lib-dynload/_hashlib.so: failed to map segment from shared object
    import _hashlib
ImportError: /usr/lib64/python2.7/lib-dynload/_hashlib.so: failed to map segment from shared object

I've tried with rm -rf /var/cache/yum

and it still fails

How to troubleshoot that ?

I usually deploy the app with eb deploy commands, and it works

Back to Top