Просмотр исходного кода

Merge pull request #2854 from jaapmarcus/fix/improve-le-logging

Improve error reporting Letsencrypt
Raphael 3 лет назад
Родитель
Сommit
1fba0ec91d

+ 9 - 3
bin/v-add-letsencrypt-domain

@@ -386,7 +386,7 @@ for auth in $authz; do
         status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
         status=$(echo "$answer"|grep HTTP/ |tail -n1 |cut -f 2 -d ' ')
         details=$(echo "$answer"| grep detail | cut -f 1 -d ',' | cut -f 2-4 -d ':' | cut -f 2 -d '"')
         details=$(echo "$answer"| grep detail | cut -f 1 -d ',' | cut -f 2-4 -d ':' | cut -f 2 -d '"')
 
 
-        debug_log "Step 5" "- status: ${status}\n- nonce: ${nonce}\n- validation: ${validation}\n- details: ${details}\n- answer: ${answer}"
+        debug_log "Step 5" "- status: ${status}\n- url: ${url}\n- nonce: ${nonce}\n- validation: ${validation}\n- details: ${details}\n- answer: ${answer}"
 
 
         if [[ "$status" -ne 200 ]]; then
         if [[ "$status" -ne 200 ]]; then
             # Delete DNS CAA record
             # Delete DNS CAA record
@@ -400,8 +400,14 @@ for auth in $authz; do
                     fi
                     fi
                 fi
                 fi
             fi
             fi
-            debug_log "Abort Step 5" "=> Wrong status"
-            check_result "$E_CONNECT" "Let's Encrypt validation status $status ($domain). Details: $details"
+            # Download debug info from LE server
+            result=$(wget -qO- $url)
+            debug_log "Debug information Step 5"  "$result"
+            details=$(echo $result | jq '.error.detail' )
+            error_code=$(echo $result | jq '.error.status' )            
+            
+            debug_log "Abort Step 5" "=> Wrong status" 
+            check_result "$E_CONNECT" "Let's Encrypt validation status $status ($domain). Details: $error_code:$details"
         fi
         fi
 
 
         i=$((i + 1))
         i=$((i + 1))

+ 1 - 1
install/hst-install-debian.sh

@@ -52,7 +52,7 @@ software="nginx apache2 apache2-utils apache2-suexec-custom
   dnsutils bsdmainutils cron hestia=${HESTIA_INSTALL_VER} hestia-nginx
   dnsutils bsdmainutils cron hestia=${HESTIA_INSTALL_VER} hestia-nginx
   hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
   hestia-php expect libmail-dkim-perl unrar-free vim-common acl sysstat
   rsyslog openssh-server util-linux ipset libapache2-mpm-itk zstd
   rsyslog openssh-server util-linux ipset libapache2-mpm-itk zstd
-  lsb-release"
+  lsb-release jq"
 
 
 
 
 installer_dependencies="apt-transport-https curl dirmngr gnupg wget ca-certificates"
 installer_dependencies="apt-transport-https curl dirmngr gnupg wget ca-certificates"

+ 1 - 1
install/hst-install-ubuntu.sh

@@ -51,7 +51,7 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
     php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
     php$fpm_v-opcache php$fpm_v-pspell php$fpm_v-readline php$fpm_v-xml
     postgresql postgresql-contrib proftpd-basic quota rrdtool spamassassin sudo hestia=${HESTIA_INSTALL_VER}
     postgresql postgresql-contrib proftpd-basic quota rrdtool spamassassin sudo hestia=${HESTIA_INSTALL_VER}
     hestia-nginx hestia-php vim-common vsftpd whois unzip zip acl sysstat setpriv rsyslog
     hestia-nginx hestia-php vim-common vsftpd whois unzip zip acl sysstat setpriv rsyslog
-    ipset libonig5 libzip5 openssh-server lsb-release zstd"
+    ipset libonig5 libzip5 openssh-server lsb-release zstd jq"
 
 
 installer_dependencies="apt-transport-https curl dirmngr gnupg wget software-properties-common ca-certificates"
 installer_dependencies="apt-transport-https curl dirmngr gnupg wget software-properties-common ca-certificates"
 
 

+ 1 - 1
src/deb/hestia/control

@@ -6,7 +6,7 @@ Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Homepage: https://www.hestiacp.com
 Architecture: amd64
 Architecture: amd64
-Depends: bash, awk, sed, acl, sysstat, setpriv | util-linux (>= 2.33), zstd, lsb-release, idn2
+Depends: bash, awk, sed, acl, sysstat, setpriv | util-linux (>= 2.33), zstd, lsb-release, idn2, jq
 Description: hestia
 Description: hestia
  hestia is an open source hosting control panel.
  hestia is an open source hosting control panel.
  hestia has a clean and focused interface without the clutter.
  hestia has a clean and focused interface without the clutter.

+ 1 - 0
src/rpm/hestia/hestia.spec

@@ -15,6 +15,7 @@ Requires:       acl
 Requires:       sysstat
 Requires:       sysstat
 Requires:       (setpriv or util-linux)
 Requires:       (setpriv or util-linux)
 Requires:       zstd
 Requires:       zstd
+Requires:       jq
 Conflicts:      vesta
 Conflicts:      vesta
 Provides:       hestia = %{version}
 Provides:       hestia = %{version}
 BuildRequires:  systemd-rpm-macros
 BuildRequires:  systemd-rpm-macros