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:
@@ -188,16 +188,30 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Check outbound connectivity to cloud (port 443)
|
# Check outbound connectivity to cloud (port 443)
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}Cloud Connectivity Test:${NC}"
|
||||||
|
|
||||||
if command -v curl >/dev/null 2>&1; then
|
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)
|
reg_url=$(grep -oP '<address>\K[^<]+' /var/lib/Acronis/BackupAndRecovery/MMS/user.config 2>/dev/null)
|
||||||
if [ -n "$reg_url" ]; then
|
if [ -n "$reg_url" ]; then
|
||||||
echo -n "Testing cloud connectivity... "
|
echo -n " Testing ${reg_url}... "
|
||||||
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"
|
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
|
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
|
fi
|
||||||
|
else
|
||||||
|
echo -e " ${YELLOW}⚠${NC} Cloud URL not found in config"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo -e " ${YELLOW}⚠${NC} curl not installed (cannot test connectivity)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user