Letsencrypt script not working properly

Status
Not open for further replies.

bazwalt

New Member
Apr 14, 2020
11
0
1
35
Hi all,

I'm tryng to use the included letsencrypt script provided with the fusionpbx install.

I'm running on Centos 7 using nginx web server.

I'm getting the following errors:

nginx: [emerg] cannot load certificate "/etc/dehydrated/certs/<domain name>/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/dehydrated/certs/<domain name>/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
cat: /etc/dehydrated/certs/<domain name>/fullchain.pem: No such file or directory
cat: /etc/dehydrated/certs/<domain name>/privkey.pem: No such file or directory
cp: cannot stat ‘/etc/dehydrated/certs/<domain name>/cert.pem’: No such file or directory
cp: cannot stat ‘/etc/dehydrated/certs/<domain name>chain.pem’: No such file or directory
cp: cannot stat ‘/etc/dehydrated/certs/<domain name>/fullchain.pem’: No such file or directory
cp: cannot stat ‘/etc/dehydrated/certs/<domain name>/privkey.pem’: No such file or directory

Also getting the below error..which I believe is due to the "nginx: configuration file /etc/nginx/nginx.conf test failed" is because I still need to apply the certificates into my nginx config which is fine.

ERROR: Challenge is invalid! (returned: invalid) (result: {
"type": "http-01",
"status": "invalid",
"error": {
"type": "urn:ietf:params:acme:error:connection",
"detail": "Fetching http://<domain name>/.well-known/acme-challenge/SYhZCVacTxAhcdPI_z5OiICHz7kbFvI5iYbFJ012hR4: Error getting validation data",
"status": 400
},
<excluded token for privacy>
{
"url": "http://<domain name>/.well-known/acme-challenge/SYhZCVacTxAhcdPI_z5OiICHz7kbFvI5iYbFJ012hR4",
"hostname": "<domain name>",
"port": "80",
"addressesResolved": [
"<IP>"
],
"addressUsed": "<IP>"



But the other errors im not really sure of since I can see the files and directory perfectly fine.

$ sudo ls -al /etc/dehydrated/certs/<domain name>/
total 8
drwx------ 2 root root 90 May 5 19:12 .
drwxr-x--- 3 root root 34 May 5 19:12 ..
-rw------- 1 root root 1667 May 5 19:12 cert-1588669974.csr
-rw------- 1 root root 0 May 5 19:12 cert-1588669974.pem
-rw------- 1 root root 3243 May 5 19:12 privkey-1588669974.pem

Is this a permissions issue? If so what do the permissions need to be?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
It looks to be a permissions error but Centos is unsupported so hopefully another community member may come along and help.
 

bazwalt

New Member
Apr 14, 2020
11
0
1
35
It looks to be a permissions error but Centos is unsupported so hopefully another community member may come along and help.
Thanks, that's my suspicion too but alas I don't know what I need to change lmfao. Fingers crossed a centos guru is around.
 

Zivk

Member
Apr 7, 2019
35
6
8
62
I'd start with chmod 777 and if this works, try to reduce permissions, chown etc.
 
Last edited:

cemotyz09

Member
Apr 23, 2020
83
7
8
Thanks, that's my suspicion too but alas I don't know what I need to change lmfao. Fingers crossed a centos guru is around.
I believe it should be freeswitch:daemon but I'm not using letsencrypt certs at the moment. This should be the centos equivalent to www-data:www-data
 
Status
Not open for further replies.