Nextcloudpi error let's encrypt

Nextcloud version: 12.0.3
Operating system and version: Raspbian Stretch
Apache or nginx version: Apache/2.4.25 (Raspbian)
PHP version:PHP 7.0.19-1
Is this the first time you’ve seen this error?:
Yes
Can you reliably replicate it? (If so, please outline steps):
Every time that I try to enable Let’s Encrypt (Tui or Web)

The issue you are facing:

I downloaded the latest image from https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/
and after I flashed it I made some steps (enlarge the partition, static ip, update, upgrade) and I tried to run letsencrypt from raspi-config -> nextcloudpi-configuration after I upgaded to the latest (0.31.1).
I have no-ip domain name and my router has open the 80 and 443.
Every time that I tried to run it I have the output:

Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Reading package lists...

Reading package lists...
Building dependency tree...

Reading state information...
augeas-lenses is already the newest version (1.8.0-1+deb9u1).
ca-certificates is already the newest version (20161130+nmu1).
gcc is already the newest version (4:6.3.0-4).
libaugeas0 is already the newest version (1.8.0-1+deb9u1).
libffi-dev is already the newest version (3.2.1-6).
libssl-dev is already the newest version (1.1.0f-3).
openssl is already the newest version (1.1.0f-3).
python is already the newest version (2.7.13-2).
python-dev is already the newest version (2.7.13-2).
python-virtualenv is already the newest version (15.1.0+ds-1).
virtualenv is already the newest version (15.1.0+ds-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
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.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 11))
  Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 17))
  Downloading pycparser-2.14.tar.gz (223kB)
Collecting asn1crypto==0.22.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 21))
  Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
Collecting cffi==1.10.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 24))
  Downloading cffi-1.10.0.tar.gz (418kB)
Collecting ConfigArgParse==0.12.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 61))
  Downloading ConfigArgParse-0.12.0.tar.gz (41kB)
Collecting configobj==5.0.6 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 63))
  Downloading configobj-5.0.6.tar.gz
Collecting cryptography==2.0.2 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 65))
  Downloading cryptography-2.0.2.tar.gz (427kB)
Collecting enum34==1.1.2 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 96))
  Downloading enum34-1.1.2.tar.gz (46kB)
Collecting funcsigs==1.0.2 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 99))
  Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting idna==2.5 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 102))
  Downloading idna-2.5-py2.py3-none-any.whl (55kB)
Collecting ipaddress==1.0.16 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 105))
  Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting linecache2==1.0.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 108))
  Downloading linecache2-1.0.0-py2.py3-none-any.whl
Collecting ordereddict==1.1 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 111))
  Downloading ordereddict-1.1.tar.gz
Collecting packaging==16.8 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 113))
  Downloading packaging-16.8-py2.py3-none-any.whl
Collecting parsedatetime==2.1 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 116))
  Downloading parsedatetime-2.1-py2-none-any.whl
Collecting pbr==1.8.1 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 119))
  Downloading pbr-1.8.1-py2.py3-none-any.whl (89kB)
Collecting pyOpenSSL==16.2.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 122))
  Downloading pyOpenSSL-16.2.0-py2.py3-none-any.whl (43kB)
Collecting pyparsing==2.1.8 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 125))
  Downloading pyparsing-2.1.8-py2.py3-none-any.whl (54kB)
Collecting pyRFC3339==1.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 134))
  Downloading pyRFC3339-1.0-py2.py3-none-any.whl
Collecting python-augeas==0.5.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 137))
  Downloading python-augeas-0.5.0.tar.gz (90kB)
Collecting pytz==2015.7 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 139))
  Downloading pytz-2015.7-py2.py3-none-any.whl (476kB)
Collecting requests==2.12.1 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 153))
  Downloading requests-2.12.1-py2.py3-none-any.whl (574kB)
Collecting six==1.10.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 156))
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting traceback2==1.4.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 159))
  Downloading traceback2-1.4.0-py2.py3-none-any.whl
Collecting unittest2==1.1.0 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 162))
  Downloading unittest2-1.1.0-py2.py3-none-any.whl (96kB)
Collecting zope.component==4.2.2 (from -r /tmp/tmp.y2LnZmAmLU/letsencrypt-auto-requirements.txt (line 165))
Exception:
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/opt/eff.org/certbot/venv/local/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/local/lib/python2.7/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/opt/eff.org/certbot/venv/local/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/local/lib/python2.7/site-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/opt/eff.org/certbot/venv/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/models.py", line 893, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: https://www.piwheels.hostedpi.com/simple/zope-component/
=====================================================

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/ .

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

 'installed' => true,
  'instanceid' => 'ocblr2m190u4',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:
It 's huge! If it is needed please ask it. Is it ok the last lines or all of it?

Yes, this is a known Let’s Encrypt bug that needs to be fixed. Unfortunately nothing I can do about that other than wait.

This was explained in the release notes

I also created a bug for it

1 Like

Thank you! I will wait then! You mean update of the config tool or the nc?

You will receive the fix through ncp-update or nc-autoupdates

1 Like

already fixed

You rock guys!! Thank you
In the local ip it says again that
Your connection is not private
And I have to add it as exception. Is that normal?

Appearantly the bug has been fixed, however I’ve just tried it now and got the same error:
HTTPError: 404 Client Error: Not Found for url: https://www.piwheels.hostedpi.com/simple/zope-component/

I’ve tried using the workaround, but when I typed “/etc/pip.conf”, I was denied permission.

Is the bug really fixed, or might I be having a different problem?

what version are you in? try updating from the web or with sudo ncp-update

If you mean version of nextcloud, I’m still in the progress of setting up my first one, so the command “sudo ncp-update” is not yet found.

right now, I’m in the progress of downloading Let’s Encrypt and creating a certificate.

(Am I doing this right? I’m following the instructions of another blog.)

sorry I thought you were using NextCloudPi. This is a NCP thread