- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
6.3 KiB
VM Deployment Troubleshooting Guide
Common Issues and Solutions
VM Not Accessible
Symptoms:
- Cannot SSH into VM
- Ping fails
- Connection timeout
Solutions:
-
Check VM status:
az vm show --resource-group $RESOURCE_GROUP --name $VM_NAME --show-details -
Check Network Security Group rules:
az network nsg rule list --resource-group $RESOURCE_GROUP --nsg-name $NSG_NAME -
Restart VM:
az vm restart --resource-group $RESOURCE_GROUP --name $VM_NAME -
Check public IP:
az vm show --resource-group $RESOURCE_GROUP --name $VM_NAME --show-details --query "publicIps" -o tsv
Besu Container Not Starting
Symptoms:
- Container exits immediately
- Container status shows "Exited"
- No logs available
Solutions:
-
Check container logs:
ssh besuadmin@$VM_IP "docker logs besu-validator-0" -
Check Docker service:
ssh besuadmin@$VM_IP "systemctl status docker" -
Check systemd service:
ssh besuadmin@$VM_IP "systemctl status besu.service" -
Check configuration file:
ssh besuadmin@$VM_IP "cat /opt/besu/config/besu-config.toml" -
Check disk space:
ssh besuadmin@$VM_IP "df -h"
Genesis File Not Found
Symptoms:
- Besu fails to start
- Error: "Genesis file not found"
Solutions:
-
Check if genesis file exists:
ssh besuadmin@$VM_IP "ls -la /opt/besu/config/genesis.json" -
Download genesis file manually:
ssh besuadmin@$VM_IP "wget -O /opt/besu/config/genesis.json $GENESIS_FILE_URL" -
Copy genesis file from local:
scp config/genesis.json besuadmin@$VM_IP:/opt/besu/config/genesis.json
Validator Keys Not Found
Symptoms:
- Validator node fails to start
- Error: "Validator key not found"
Solutions:
-
Check keys directory:
ssh besuadmin@$VM_IP "ls -la /opt/besu/keys/" -
Download keys from Key Vault:
az keyvault secret show --vault-name $KEY_VAULT_NAME --name "validator-key-0" --query value -o tsv | ssh besuadmin@$VM_IP "cat > /opt/besu/keys/validator-key.txt" -
Set correct permissions:
ssh besuadmin@$VM_IP "chmod 600 /opt/besu/keys/*"
Network Connectivity Issues
Symptoms:
- Nodes cannot peer
- P2P connection fails
- RPC endpoint not accessible
Solutions:
-
Check P2P port:
telnet $SENTRY_IP 30303 -
Check RPC port:
curl http://$RPC_IP:8545 -
Check firewall rules:
ssh besuadmin@$VM_IP "sudo ufw status" -
Check NSG rules:
az network nsg rule list --resource-group $RESOURCE_GROUP --nsg-name $NSG_NAME
High Resource Usage
Symptoms:
- VM is slow
- High CPU usage
- High memory usage
Solutions:
-
Check resource usage:
ssh besuadmin@$VM_IP "top" ssh besuadmin@$VM_IP "docker stats" -
Check Besu JVM settings:
ssh besuadmin@$VM_IP "cat /opt/besu/docker-compose.yml | grep BESU_OPTS" -
Scale up VM:
az vm resize --resource-group $RESOURCE_GROUP --name $VM_NAME --size Standard_D8s_v3
Disk Space Issues
Symptoms:
- Besu fails to write
- "No space left on device" error
Solutions:
-
Check disk usage:
ssh besuadmin@$VM_IP "df -h" -
Clean up old logs:
ssh besuadmin@$VM_IP "docker system prune -f" ssh besuadmin@$VM_IP "find /opt/besu/logs -name '*.log' -mtime +7 -delete" -
Resize disk:
az disk update --resource-group $RESOURCE_GROUP --name $DISK_NAME --size-gb 512
Cloud-init Issues
Symptoms:
- VM not configured properly
- Docker not installed
- Services not started
Solutions:
-
Check cloud-init logs:
ssh besuadmin@$VM_IP "sudo cat /var/log/cloud-init-output.log" -
Re-run cloud-init:
ssh besuadmin@$VM_IP "sudo cloud-init clean" ssh besuadmin@$VM_IP "sudo cloud-init init" -
Manually run setup script:
ssh besuadmin@$VM_IP "sudo /opt/besu/setup.sh"
Key Vault Access Issues
Symptoms:
- Cannot download keys from Key Vault
- "Access denied" error
Solutions:
-
Check Managed Identity:
az vm identity show --resource-group $RESOURCE_GROUP --name $VM_NAME -
Check Key Vault access policy:
az keyvault show --name $KEY_VAULT_NAME --query "properties.accessPolicies" -
Add access policy:
PRINCIPAL_ID=$(az vm identity show --resource-group $RESOURCE_GROUP --name $VM_NAME --query "principalId" -o tsv) az keyvault set-policy --name $KEY_VAULT_NAME --object-id $PRINCIPAL_ID --secret-permissions get list
Diagnostic Commands
Check VM Status
az vm list --resource-group $RESOURCE_GROUP --show-details
Check Container Status
ssh besuadmin@$VM_IP "docker ps -a"
Check Service Status
ssh besuadmin@$VM_IP "systemctl status besu.service"
Check Logs
# Besu logs
ssh besuadmin@$VM_IP "docker logs besu-validator-0"
# System logs
ssh besuadmin@$VM_IP "journalctl -u besu.service -n 100"
# Cloud-init logs
ssh besuadmin@$VM_IP "sudo cat /var/log/cloud-init-output.log"
Check Network
# Check connectivity
ping $VM_IP
# Check ports
nmap -p 30303,8545,8546,9545 $VM_IP
# Check DNS
nslookup $VM_IP
Check Resources
# CPU and memory
ssh besuadmin@$VM_IP "top -bn1 | head -20"
# Disk usage
ssh besuadmin@$VM_IP "df -h"
# Network usage
ssh besuadmin@$VM_IP "iftop"
Getting Help
If you encounter issues not covered here:
- Check the main troubleshooting guide
- Review VM deployment documentation
- Check Besu logs for detailed error messages
- Review Azure VM logs in Azure Portal
- Check Network Security Group rules
- Verify Key Vault access policies
Prevention
To prevent common issues:
- Regular Monitoring: Use monitoring scripts to catch issues early
- Backup: Regularly backup VM data
- Updates: Keep VMs and Docker images updated
- Resource Planning: Monitor resource usage and scale as needed
- Security: Regularly review and update NSG rules and Key Vault policies