Cannot enable Let's Encrypt on NextCloudPlus

Hello,

I installed NextCloud on my Raspberry Pi, using NextCloudPlus.
Everything is running, I have a DNS and can access my server from external connection.
Only problem, I cannot enable Let’s Encrypt.

When I try, I enter my domain and email address, then I have the following message:

[ letsencrypt ]
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
An unexpected error occurred:
ConnectionError: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
Please see the logfiles in /var/log/letsencrypt for more details.

Here is what appears when I go on the last log in /var/log/letsencrypt:

2018-05-12 04:36:01,394:DEBUG:certbot.main:certbot version: 0.23.0
2018-05-12 04:36:01,397:DEBUG:certbot.main:Arguments: ['-n', '--no-self-upgrade', '--webroot', '-w', '/var/www/nextcloud', '--hsts', '--agree-tos', '$
2018-05-12 04:36:01,397:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx$
2018-05-12 04:36:01,507:DEBUG:certbot.log:Root logging level set at 20
2018-05-12 04:36:01,511:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2018-05-12 04:36:01,517:DEBUG:certbot.plugins.selection:Requested authenticator webroot and installer None
2018-05-12 04:36:01,543:DEBUG:certbot.plugins.selection:Single candidate plugin: * webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authenticator
Initialized: <certbot.plugins.webroot.Authenticator object at 0x76c7dc70>
Prep: True
2018-05-12 04:36:01,547:DEBUG:certbot.plugins.selection:Selected authenticator <certbot.plugins.webroot.Authenticator object at 0x76c7dc70> and insta$
2018-05-12 04:36:01,547:INFO:certbot.plugins.selection:Plugins selected: Authenticator webroot, Installer None
2018-05-12 04:36:03,618:DEBUG:acme.client:Sending GET request to https://acme-v01.api.letsencrypt.org/directory.
2018-05-12 04:36:03,657:DEBUG:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
2018-05-12 04:36:03,664:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module>
    sys.exit(main())
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1266, in main
    return config.func(config, plugins)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1141, in certonly
    le_client = _init_le_client(config, auth, installer)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 635, in _init_le_client
    acc, acme = _determine_account(config)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 514, in _determine_account
    config, account_storage, tos_cb=_tos_cb)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 164, in register
    acme = acme_from_config_key(config, key)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 46, in acme_from_config_key
    return acme_client.BackwardsCompatibleClientV2(net, key, config.server)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/client.py", line 718, in __init__
    directory = messages.Directory.from_json(net.get(server).json())
File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in <module>
    sys.exit(main())
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1266, in main
    return config.func(config, plugins)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 1141, in certonly
    le_client = _init_le_client(config, auth, installer)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 635, in _init_le_client
    acc, acme = _determine_account(config)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 514, in _determine_account
    config, account_storage, tos_cb=_tos_cb)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 164, in register
    acme = acme_from_config_key(config, key)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 46, in acme_from_config_key
    return acme_client.BackwardsCompatibleClientV2(net, key, config.server)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/client.py", line 718, in __init__
    directory = messages.Directory.from_json(net.get(server).json())
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/client.py", line 1041, in get
    self._send_request('GET', url, **kwargs), content_type=content_type)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/acme/client.py", line 990, in _send_request
    response = self.session.request(method, url, *args, **kwargs)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnecti$
2018-05-12 04:36:03,680:ERROR:certbot.log:An unexpected error occurred:

I don’t understand where the problem comes from.
Can someone help me please?
Thanks a lot!


System Info

‣ You should run Lets Encrypt for trusted encrypted access

NextCloudPlus version v0.54.7
NextCloudPlus image NextCloudPlus_04-21-18
distribution Raspbian GNU/Linux 9 \n \l
automount no
USB devices none
datadir /var/www/nextcloud/data
data in SD yes
data filesystem ext2/ext3
data disk usage 1.9G/30G
rootfs usage 1.9G/30G
swapfile /var/swap
Nextcloud check ok
Nextcloud version 13.0.1.1
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check no }
port check 80 open
port check 443 open
IP 192.168.0.59
gateway 192.168.0.1
interface eth0
certificates none
NAT loopback no
uptime 8min

It looks to me that ** acme-v01.api.letsencrypt.org** server refuses your connection because you’re sending too many requests from same ip address in short period of time.

Hi Peteman, thanks for your message!
If your guess is correct, what would be the solution?
Activating the static IP using a different than the IP I currently have?