Enhance cloud connectivity test with detailed feedback

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.
This commit is contained in:
cschantz
2025-11-06 17:07:24 -05:00
parent b1ba848d76
commit 3636648054
+18 -4
View File
@@ -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 '<address>\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 ""