# Create new certificate - error

**URL:** <https://community.letsencrypt.org/t/create-new-certificate-error/93783>\
**Category:** Help\
**Created:** [May 16, 2019, 8:33pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783 "2019-05-16T20:33:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blaubart](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Blaubart](https://community.letsencrypt.org/u/Blaubart)\
**Post date:** [May 16, 2019, 8:33pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/1 "2019-05-16T20:33:10Z")

</div>

I have no idea what I do wrong. I like to install Nextcloud at a Raspberry Pi 3. I used the following HowTo:

> [https://canox.net/2016/06/die-eigene-cloud-mit-dem-raspberry-pi-und-nextcloud/](https://canox.net/2016/06/die-eigene-cloud-mit-dem-raspberry-pi-und-nextcloud/)

I tried to create a lets encrypt certificate and get an error:

> sudo certbot certonly --webroot -w /var/www/nextcloud/ -d [my.domaine.de](http://my.domaine.de) -m [mail@mail.de](mailto:mail@mail.de) --agree-tos

> Saving debug log to /var/log/letsencrypt/letsencrypt.log  
> Plugins selected: Authenticator webroot, Installer None  
> Obtaining a new certificate  
> Performing the following challenges:  
> http-01 challenge for [my.domaine.de](http://my.domaine.de)  
> Using the webroot path /var/www/nextcloud for all unmatched domains.  
> Waiting for verification...  
> Cleaning up challenges  
> Failed authorization procedure. [my.domaine.de](http://my.domaine.de) (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching [http://my.domaine.de/.well-known/acme-challenge/xxxxxxxxxxxxxxxxxx-Pz9zQ:](http://my.domaine.de/.well-known/acme-challenge/xxxxxxxxxxxxxxxxxx-Pz9zQ:) Connection refused
> 
> IMPORTANT NOTES:
> 
> - The following errors were reported by the server:

I checked port 80 and 443:

> [Open Port Check Tool - Test Port Forwarding on Your Router](https://www.yougetsignal.com/tools/open-ports/)

Both are closed

I have no idea where the fault is. I never had a error like that

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [May 16, 2019, 8:46pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/2 "2019-05-16T20:46:40Z")

</div>

Hi @Blaubart

> [@Blaubart](#):
>
> Detail: Fetching  
> [http://my.domaine.de/.well-known/acme-challenge/xxxxxxxxxxxxxxxxxx-Pz9zQ:](http://my.domaine.de/.well-known/acme-challenge/xxxxxxxxxxxxxxxxxx-Pz9zQ:)  
> Connection refused

an open port 80 is required if you want to use http-01 validation.

So Connection refused looks like a firewall or something else, that blocks.

Or it's a wrong port forwarding.

---

<div class="post-metadata">

**Author:** ![Blaubart](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Blaubart](https://community.letsencrypt.org/u/Blaubart)\
**Post date:** [May 16, 2019, 9:05pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/3 "2019-05-16T21:05:12Z")

</div>

I used the port forwarding like I did it in the past. I have a Fritzbox 7490 and configured port 80 and 443 to the Raspberry. I tried to use nginx instead apache at the Raspberry, but nginx isn't running at the time. I also get an error because go ngnix. Thats why I installed and startet apache2. After the installation port 80 is open, but generating a certificate wasn't possible:

> Saving debug log to /var/log/letsencrypt/letsencrypt.log  
> Plugins selected: Authenticator webroot, Installer None  
> Obtaining a new certificate  
> Performing the following challenges:  
> http-01 challenge for [my.domain.de](http://my.domain.de)  
> Using the webroot path /var/www/nextcloud for all unmatched domains.  
> Waiting for verification...  
> Cleaning up challenges  
> Failed authorization procedure. [my.domain.de](http://my.domain.de) (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from [http://my.domain.de/.well-known/acme-challenge/xxxxxxxxxxxx\_Kqc](http://my.domain.de/.well-known/acme-challenge/xxxxxxxxxxxx_Kqc) [xxx.xxx.150.232]: "\<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"
> 
> IMPORTANT NOTES:
> 
> - The following errors were reported by the server:

> To fix these errors, please make sure that your domain name was  
> entered correctly and the DNS A/AAAA record(s) for that domain  
> contain(s) the right IP address.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [May 16, 2019, 9:12pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/4 "2019-05-16T21:12:40Z")

</div>

> [@Blaubart](#):
>
> Thats why I installed and startet apache2.

Apache2 may have a completely different webroot, so you have to change your Certbot command.

---

<div class="post-metadata">

**Author:** ![Blaubart](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Blaubart](https://community.letsencrypt.org/u/Blaubart)\
**Post date:** [May 16, 2019, 9:29pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/5 "2019-05-16T21:29:00Z")

</div>

OK, so the best way would be, to try getting Nginx working.  
It seems Nginx dosen't running because letsencrypt is missing.

> service Nginx status:
> 
> - nginx.service - A high performance web server and a reverse proxy server  
> Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)  
> Active: failed (Result: exit-code) since Thu 2019-05-16 23:23:17 CEST; 4min 3s ago  
> Docs: man:nginx(8)  
> Process: 4368 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master\_process on; (code=exited, status=1/FAILURE)
> 
> Mai 16 23:23:11 systemd[1]: Starting A high performance web server and a reverse proxy server...  
> Mai 16 23:23:17 nginx[4368]: nginx: [emerg] BIO\_new\_file("/etc/letsencrypt/live/my.domain.de/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(  
> Mai 16 23:23:17 nginx[4368]: nginx: configuration file /etc/nginx/nginx.conf test failed  
> Mai 16 23:23:17 systemd[1]: nginx.service: Control process exited, code=exited status=1  
> Mai 16 23:23:17 systemd[1]: Failed to start A high performance web server and a reverse proxy server.  
> Mai 16 23:23:17 systemd[1]: nginx.service: Unit entered failed state.  
> Mai 16 23:23:17 systemd[1]: nginx.service: Failed with result 'exit-code'.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [May 16, 2019, 9:32pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/6 "2019-05-16T21:32:58Z")

</div>

> [@Blaubart](#):
>
> It seems Nginx dosen’t running because letsencrypt is missing.

Then use a self signed certificate instead.

---

<div class="post-metadata">

**Author:** ![Blaubart](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Blaubart](https://community.letsencrypt.org/u/Blaubart)\
**Post date:** [May 16, 2019, 9:42pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/7 "2019-05-16T21:42:47Z")

</div>

now nginx is running and port 80 is open.

But I get the same Error:

> Saving debug log to /var/log/letsencrypt/letsencrypt.log  
> Plugins selected: Authenticator webroot, Installer None  
> Obtaining a new certificate  
> Performing the following challenges:  
> http-01 challenge for [my.domain.de](http://my.domain.de)  
> Using the webroot path /var/www/nextcloud for all unmatched domains.  
> Waiting for verification...  
> Cleaning up challenges  
> Failed authorization procedure. [my.domain.de](http://my.domain.de) (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from [http://my.domain.de/.well-known/acme-challenge/xxxxx5ho](http://my.domain.de/.well-known/acme-challenge/xxxxx5ho) [xxx.xxx.140.129]:
> 
> IMPORTANT NOTES:
> 
> - The following errors were reported by the server:

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [May 16, 2019, 9:51pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/8 "2019-05-16T21:51:23Z")

</div>

> [@Blaubart](#):
>
> /var/www/nextcloud

Then your webroot may be wrong. That's a non-standard webroot.

---

<div class="post-metadata">

**Author:** ![Blaubart](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@Blaubart](https://community.letsencrypt.org/u/Blaubart)\
**Post date:** [May 16, 2019, 9:57pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/9 "2019-05-16T21:57:44Z")

</div>

Thx!!

I changed to /var/www/html and it works!!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [June 15, 2019, 9:57pm UTC](https://community.letsencrypt.org/t/create-new-certificate-error/93783/10 "2019-06-15T21:57:47Z")

</div>

Closed on June 15, 2019, 9:57pm UTC

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