[SOLVED] Issue with acme.sh when renewing ssl certificate

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

[SOLVED] Issue with acme.sh when renewing ssl certificate

Postby vapiano » Tue Aug 15, 2023 5:38 am

ViciBox v.10.0.2
VERSION: 2.14-679c
BUILD: 230220-1802
Asterisk 13.38.3-vici
Cloud VPS, CPU 6 cores, 16GB RAM, Disk 200 GB NVMe

Hi,

I got an email from Let's Encrypt's that my ssl certification will expire in 7 days.

So I wanted to renew my ssl certificate by running

Code: Select all
/usr/share/vicibox-ssl/vicibox-ssl


But I got the following error:

Code: Select all
Do you want to generate an SSL certificate now? (N/y) : y
/usr/share/vicibox-ssl/vicibox-ssl: line 109: acme.sh: command not found

  acme.sh was unable to verify your FQDN reaches this server and was unable
  to generate a valid SSL certificate. Please check your firewall settings,
  DNS entries, and Apache for any possible issues. You can re-run this script
  to test if the issue is resolved.


What is to do now? Would be thankful for any help.
Last edited by vapiano on Tue Aug 15, 2023 6:27 pm, edited 1 time in total.
vapiano
 
Posts: 35
Joined: Tue Jun 21, 2022 2:17 pm

Re: Issue with acme.sh when renewing ssl certificate

Postby martinch » Tue Aug 15, 2023 6:41 am

Oh hey,

I think there's a problem with the SSL script. If we observe this line;

Code: Select all
ACME_DIR="/root/.acme.sh/"


That does not exist at least on my ViCiBox version (Version 11).

If you change that line to;

Code: Select all
ACME_DIR="/usr/share/acme.sh/"


It should run. This particular query should go into the ViCiBox subforum http://vicidial.org/VICIDIALforum/viewforum.php?f=8 just so the guys can get more visibility and offer more help :)

Hope this helps.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Issue with acme.sh when renewing ssl certificate

Postby vapiano » Tue Aug 15, 2023 7:24 am

martinch wrote:If you change that line to;

Code: Select all
ACME_DIR="/usr/share/acme.sh/"


It should run.



Thanks for your reply but this did not solve the issue.

First, in my root folder there is file named ".acme.sh" so
Code: Select all
ACME_DIR="/root/.acme.sh/"
should work.
Second, I think you meant
Code: Select all
ACME_DIR="/usr/share/vicibox-ssl/acme.sh"
because this is the path where acme.sh is located. But as mentioned this didnt solve my issue
vapiano
 
Posts: 35
Joined: Tue Jun 21, 2022 2:17 pm

Re: Issue with acme.sh when renewing ssl certificate

Postby martinch » Tue Aug 15, 2023 7:45 am

Ah I see. Then yeah disregard what I wrote as there appears to be a difference between ViCiBox 10 and 11 in that regard.

I don't have the ISO to hand right now but I can boot up ViCiBox 10 a little later on and see if I can help. Maybe Kumba or mflorell can chip in here though or someone else in the community. Cheers.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Issue with acme.sh when renewing ssl certificate

Postby vapiano » Tue Aug 15, 2023 12:01 pm

I got it now resolved. Not sure what the exact solution was.

I did two things:

Firstly, I changed the vicibox-ssl script
Code: Select all
ACME_BIN="acme.sh"


to

Code: Select all
ACME_BIN="/root/.acme.sh/acme.sh


Secondly, I executed acme.sh manually.


Is there a way to check in the terminal until when the certificate is valid? I know that I can check the date in the browser but would also know a way to check it in the terminal
Last edited by vapiano on Tue Aug 15, 2023 6:28 pm, edited 1 time in total.
vapiano
 
Posts: 35
Joined: Tue Jun 21, 2022 2:17 pm

Re: Issue with acme.sh when renewing ssl certificate

Postby martinch » Tue Aug 15, 2023 3:40 pm

Cool! You got it sorted. :)

Running this command on your certificate should do the job;

Code: Select all
openssl x509 -enddate -noout -in /path/to/your/certificate.pem


Hope this helps!
Martin.
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: Issue with acme.sh when renewing ssl certificate

Postby vapiano » Tue Aug 15, 2023 6:26 pm

martinch wrote:Cool! You got it sorted. :)

Running this command on your certificate should do the job;

Code: Select all
openssl x509 -enddate -noout -in /path/to/your/certificate.pem


Hope this helps!
Martin.


Great, worked :D

Thank you!!
vapiano
 
Posts: 35
Joined: Tue Jun 21, 2022 2:17 pm


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 296 guests