Error while install letsencrypt on zimbra centOS 7

Dear Master,

I want to ask, while i’am installing letsencrypt in my zimbra server (centOS 7) i get error like this :

[root@mail letsencrypt]# ./letsencrypt-auto certonly --standalone -d mail.domain.com -d mail.domain.id
Bootstrapping dependencies for RedHat-based OSes... (you can skip this with --no-bootstrap)
yum is /usr/bin/yum
yum is hashed (/usr/bin/yum)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: repo.apiknet.co.id
 * epel: mirror.smartmedia.net.id
 * extras: repo.apiknet.co.id
 * updates: repo.apiknet.co.id
Package gcc-4.8.5-28.el7_5.1.x86_64 already installed and latest version
Package augeas-libs-1.4.0-5.el7_5.1.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-12.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
Package redhat-rpm-config-9.1.0-80.el7.centos.noarch already installed and latest version
Package ca-certificates-2018.2.22-70.0.el7_5.noarch already installed and latest version
Package python-devel-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python-virtualenv-15.1.0-2.el7.noarch already installed and latest version
Package python-tools-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python2-pip-8.1.2-6.el7.noarch already installed and latest version
Nothing to do
WARNING: unable to check for updates.
Creating virtual environment...
Installing Python packages...
Had a problem while installing Python packages.

pip prints the following errors:
=====================================================
Collecting argparse==1.4.0 (from -r /tmp/tmp.6suvdqmxwN/letsencrypt-auto-requirements.txt (line 11))
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe3f672add0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe3f672a350>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe3f672a9d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe3f672a4d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe3f672a6d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Could not find a version that satisfies the requirement argparse==1.4.0 (from -r /tmp/tmp.6suvdqmxwN/letsencrypt-auto-requirements.txt (line 11)) (from versions: )
No matching distribution found for argparse==1.4.0 (from -r /tmp/tmp.6suvdqmxwN/letsencrypt-auto-requirements.txt (line 11))
=====================================================

Certbot has problem setting up the virtual environment.

We were not be able to guess the right solution from your pip
output.

Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ .

Please help me ! :frowning:

Regards,
Arie

Sorry to hear you’re having trouble. letsencrypt-auto is unable to connect to https://pypi.python.org and is saying the “Network is unreachable.”

What is the output of:

grep -m1 LE_AUTO_VERSION letsencrypt-auto

and of:

PIP_VERBOSE=1 ./letsencrypt-auto certonly --standalone -d mail.domain.com -d mail.domain.id

Dear Mr. Bmw,

Sorry for late reply.

Thanks for your response.

Im tried your solution but still failed :frowning:

This is output :

[root@mail letsencrypt]# grep -m1 LE_AUTO_VERSION letsencrypt-auto
LE_AUTO_VERSION="0.26.1"
[root@mail letsencrypt]# PIP_VERBOSE=1 ./letsencrypt-auto certonly --standalone -d mail.domain.com -d mail.domain.id
Bootstrapping dependencies for RedHat-based OSes... (you can skip this with --no-bootstrap)
yum is /usr/bin/yum
yum is hashed (/usr/bin/yum)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64 error was
14: curl#7 - "Failed to connect to 2605:bc80:3010:600:dead:beef:cafe:fed9: Network is unreachable"
 * base: repo.apiknet.co.id
 * epel: mirror.smartmedia.net.id
 * extras: repo.apiknet.co.id
 * updates: repo.apiknet.co.id
base                                                                                                                                             | 3.6 kB  00:00:00
extras                                                                                                                                           | 3.4 kB  00:00:00
updates                                                                                                                                          | 3.4 kB  00:00:00
zimbra                                                                                                                                           | 2.9 kB  00:00:00
(1/2): extras/7/x86_64/primary_db                                                                                                                | 173 kB  00:00:00
(2/2): updates/7/x86_64/primary_db                                                                                                               | 4.3 MB  00:00:00
Package gcc-4.8.5-28.el7_5.1.x86_64 already installed and latest version
Package augeas-libs-1.4.0-5.el7_5.1.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-12.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
Package redhat-rpm-config-9.1.0-80.el7.centos.noarch already installed and latest version
Package ca-certificates-2018.2.22-70.0.el7_5.noarch already installed and latest version
Package python-devel-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python-virtualenv-15.1.0-2.el7.noarch already installed and latest version
Package python-tools-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python2-pip-8.1.2-6.el7.noarch already installed and latest version
Nothing to do
WARNING: unable to check for updates.
Creating virtual environment...
Installing Python packages...
Had a problem while installing Python packages.

pip prints the following errors:
=====================================================
Collecting argparse==1.4.0 (from -r /tmp/tmp.V4QsHUuTPo/letsencrypt-auto-requirements.txt (line 11))
  1 location(s) to search for versions of argparse:
  * https://pypi.python.org/simple/argparse/
  Getting page https://pypi.python.org/simple/argparse/
  Starting new HTTPS connection (1): pypi.python.org
  Incremented Retry for (url='/simple/argparse/'): Retry(total=4, connect=None, read=None, redirect=None)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd97265bdd0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Starting new HTTPS connection (2): pypi.python.org
  Incremented Retry for (url='/simple/argparse/'): Retry(total=3, connect=None, read=None, redirect=None)
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd97265b350>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Starting new HTTPS connection (3): pypi.python.org
  Incremented Retry for (url='/simple/argparse/'): Retry(total=2, connect=None, read=None, redirect=None)
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd97265b9d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Starting new HTTPS connection (4): pypi.python.org
  Incremented Retry for (url='/simple/argparse/'): Retry(total=1, connect=None, read=None, redirect=None)
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd97265b4d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Starting new HTTPS connection (5): pypi.python.org
  Incremented Retry for (url='/simple/argparse/'): Retry(total=0, connect=None, read=None, redirect=None)
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd97265b6d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/argparse/
  Starting new HTTPS connection (6): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/argparse/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/argparse/ (Caused by NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd97265bc50>: Failed to establish a new connection: [Errno 101] Network is unreachable',)) - skipping
  Could not find a version that satisfies the requirement argparse==1.4.0 (from -r /tmp/tmp.V4QsHUuTPo/letsencrypt-auto-requirements.txt (line 11)) (from versions: )
Cleaning up...
No matching distribution found for argparse==1.4.0 (from -r /tmp/tmp.V4QsHUuTPo/letsencrypt-auto-requirements.txt (line 11))
Exception information:
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/pip/index.py", line 514, in find_requirement
    'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for argparse==1.4.0 (from -r /tmp/tmp.V4QsHUuTPo/letsencrypt-auto-requirements.txt (line 11))
=====================================================

Certbot has problem setting up the virtual environment.

We were not be able to guess the right solution from your pip
output.

Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ .

Please help me :frowning:

Regards,

Arie

You’re getting network errors from yum too. Is a firewall blocking outgoing connections on port 443?

What’s the output of:

  1. curl -L https://pypi.python.org
  2. curl -L https://mirrors.ustc.edu.cn/pypi/
  3. pip --version

Dear Mr. Bmw,

Thanks for your reply.

Port 443 is not blocked.

This is output :

[root@mail ~]# curl -L https://pypi.python.org
curl: (7) Failed to connect to 2a04:4e42::223: Network is unreachable
[root@mail ~]# curl -L https://mirrors.ustc.edu.cn/pypi/
curl: (7) Failed to connect to 2001:da8:d800:95::110: Network is unreachable
[root@mail ~]# pip --version
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)

Please help :frowning:

Thanks.

Regards,
Arie

It seems like your server is unable to make outbound HTTPS connections, at least to mirrors.fedoraproject.org and the two PyPI mirrors I suggested you try.

@schoen (or anyone else here), are you able to help @arsyam debug their network problems?

Hi @arsyam,

It looks like the problem might be that your server thinks it has IPv6 connectivity, but it really doesn’t.

You could try

curl -4 https://pypi.python.org

to check if this is the case.

Hi Mr. @schoen

I have tried and this is output :

 [root@mail ~]# curl -4 https://pypi.python.org
curl: (7) Failed connect to pypi.python.org:443; Operation now in progress

Whats wrong?

Thanks.

Regards,
Arie

Do you have a firewall that blocks outbound Internet connections from this machine?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.