From 363664805480075d0550b608af9f470e07167867 Mon Sep 17 00:00:00 2001 From: cschantz Date: Thu, 6 Nov 2025 17:07:24 -0500 Subject: [PATCH] Enhance cloud connectivity test with detailed feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improved "Cloud Connectivity Test" section: - Now shows as dedicated section with bold header - Displays full URL being tested (https://us5-cloud.acronis.com) - Shows HTTP status code on success (e.g., "✓ Reachable (HTTP 200)") - Provides troubleshooting steps on failure: • Check internet connectivity • Verify firewall allows HTTPS (port 443) • Manual test command provided This makes it easy to verify the agent can reach Acronis cloud and diagnose connectivity issues. --- modules/backup/acronis-agent-status.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/backup/acronis-agent-status.sh b/modules/backup/acronis-agent-status.sh index 3183e98..93de47e 100755 --- a/modules/backup/acronis-agent-status.sh +++ b/modules/backup/acronis-agent-status.sh @@ -188,16 +188,30 @@ fi echo "" # Check outbound connectivity to cloud (port 443) +echo "" +echo -e "${BOLD}Cloud Connectivity Test:${NC}" + if command -v curl >/dev/null 2>&1; then reg_url=$(grep -oP '
\K[^<]+' /var/lib/Acronis/BackupAndRecovery/MMS/user.config 2>/dev/null) if [ -n "$reg_url" ]; then - echo -n "Testing cloud connectivity... " - if timeout 5 curl -s -o /dev/null -w "%{http_code}" "$reg_url" 2>/dev/null | grep -q "^[2-4]"; then - echo -e "${GREEN}✓${NC} Connected" + echo -n " Testing ${reg_url}... " + + http_code=$(timeout 5 curl -s -o /dev/null -w "%{http_code}" "$reg_url" 2>/dev/null) + + if [ "$http_code" -ge 200 ] && [ "$http_code" -lt 500 ]; then + echo -e "${GREEN}✓ Reachable${NC} (HTTP $http_code)" else - echo -e "${YELLOW}⚠${NC} Cannot reach cloud (may be firewall/network issue)" + echo -e "${RED}✗ Unreachable${NC}" + echo -e " ${YELLOW}⚠${NC} Cannot reach Acronis cloud (firewall/network issue)" + echo " • Check internet connectivity" + echo " • Verify firewall allows HTTPS (port 443)" + echo " • Test manually: curl -I $reg_url" fi + else + echo -e " ${YELLOW}⚠${NC} Cloud URL not found in config" fi +else + echo -e " ${YELLOW}⚠${NC} curl not installed (cannot test connectivity)" fi echo ""