Troubleshooting and upgrades
This guide helps diagnose and resolve common Apex deployment issues. For each problem, we provide symptoms, root causes, and step-by-step solutions.
Installation Issues
Section titled “Installation Issues”“Command not found: apex” after installation
Section titled ““Command not found: apex” after installation”Symptom: Running apex returns “command not found” after the installer completes.
Cause: The installer adds ~/.apex/bin to your shell profile, but your current shell hasn’t reloaded it.
Solution:
# Option 1: Restart your shellexit# Log back in
# Option 2: Manually source your profilesource ~/.bashrc # or ~/.zshrc for zsh
# Option 3: Use the full path~/.apex/bin/apex version
# Option 4: Add to PATH manuallyexport PATH="$HOME/.apex/bin:$PATH"Installer fails with “permission denied”
Section titled “Installer fails with “permission denied””Symptom: Installer reports permission errors when writing files.
Cause: Target directories require elevated privileges, or installer script lacks execute permission.
Solution:
# For Linux/macOS# If installing in protected directories:sudo bash install.sh -m apex
# If installer lacks execute permission:chmod +x install.sh./install.sh -m apex
# For Windows# Run PowerShell as Administrator:Set-ExecutionPolicy Bypass -Scope Process.\install.ps1 -Mode apexWindows installer blocked by SmartScreen
Section titled “Windows installer blocked by SmartScreen”Symptom: Windows SmartScreen blocks installer execution.
Cause: Installer not yet widely recognized by SmartScreen.
Solution:
- Verify installer signature and source
- Click “More info” on SmartScreen warning
- Click “Run anyway”
- Follow your organization’s security policy for handling such warnings
Port Conflicts
Section titled “Port Conflicts”How to identify port conflicts
Section titled “How to identify port conflicts”Symptom: Deployment fails with “address already in use” or “port in use” errors.
Cause: Another service is using a port required by TDengine components.
Check on Linux:
# Preferred: ssss -tuln | grep -E '6030|6041|6043|6044|6060|7030|8030|8111'
# Alternative: lsofsudo lsof -i :6030sudo lsof -i :6041
# Alternative: netstatnetstat -tuln | grep -E '6030|6041'
# Check all TDengine ports at oncefor port in 6030 6041 6043 6044 6060 7030 8030 8031 9000 9100 10101 8111; do if ss -tuln | grep -q ":$port "; then echo "Port $port is in use" ss -tuln | grep ":$port " fidoneCheck on Windows:
# Check specific portsTest-NetConnection -ComputerName localhost -Port 6030Test-NetConnection -ComputerName localhost -Port 6041
# List all listening portsGet-NetTCPConnection -State Listen | Where-Object {$_.LocalPort -in 6030,6041,6043,6044,6060,7030,8030,8111} | Format-Table
# Alternative: netstatnetstat -ano | findstr ":6030"netstat -ano | findstr ":6041"Solutions:
- Identify the conflicting service:
# Linux - find process using portsudo lsof -i :6030# orsudo ss -tlnp | grep :6030
# Windows - find process IDnetstat -ano | findstr ":6030"# Then lookup processtasklist | findstr "<PID>"- Stop the conflicting service (if appropriate):
# Linuxsudo systemctl stop <service-name>sudo kill <PID>
# WindowsStop-Service -Name "<service-name>"Stop-Process -Id <PID>- Change TDengine port configuration (if conflict unavoidable)
Network and Connectivity Issues
Section titled “Network and Connectivity Issues”Artifact download failures
Section titled “Artifact download failures”Symptom: prepare fails with “failed to download artifact” or connection timeout.
Causes and solutions:
Network connectivity:
# Test connectivity to download servercurl -I https://downloads.tdengine.comping downloads.tdengine.com
# Test with verbose outputcurl -v https://downloads.tdengine.com/apex/latest/install.sh
# Check DNS resolutionnslookup downloads.tdengine.comProxy issues:
# Set proxy for downloadsexport HTTP_PROXY=http://proxy.example.com:8080export HTTPS_PROXY=http://proxy.example.com:8080apex prepare -f deployment.yaml --manifests ~/.apex/manifests/
# Or configure in apex config# ~/.apex/config.yamlhttp_proxy: http://proxy.example.com:8080https_proxy: http://proxy.example.com:8080Firewall blocking downloads:
- Whitelist downloads.tdengine.com in firewall
- Allow outbound HTTPS (port 443)
- Check corporate firewall/proxy policies
Mirror or CDN issues:
# Try alternative mirrorbase_url: https://alternative-mirror.example.comSHA256 checksum mismatches
Section titled “SHA256 checksum mismatches”Symptom: prepare fails with “SHA256 mismatch” or “checksum verification failed”.
Cause: Downloaded file doesn’t match manifest checksum.
Solutions:
# 1. Delete cached artifact and retryrm ~/.apex/cache/artifacts/<artifact-name>apex prepare -f deployment.yaml --manifests ~/.apex/manifests/
# 2. Clear entire cache if multiple artifacts affectedrm -rf ~/.apex/cache/artifacts/*apex prepare -f deployment.yaml --manifests ~/.apex/manifests/
# 3. Check if proxy/cache is serving stale contentcurl -I https://downloads.tdengine.com/path/to/artifact.tar.gz# Look for cache headers
# 4. For offline bundles, verify integritycd offline-bundle/sha256sum -c checksums.txtNever:
- Modify manifest checksums
- Skip verification
- Use artifacts from untrusted sources
SSH Issues
Section titled “SSH Issues”SSH connection refused
Section titled “SSH connection refused”Symptom: apex check or deployment fails with “connection refused” or “connection timeout”.
Diagnostic steps:
# 1. Test basic SSH connectivityssh -v user@target-host
# 2. Test with Apex's exact settingsssh -i ~/.ssh/apex-deploy -p 22 user@target-host
# 3. Run apex check for detailed outputapex check -f deployment.yamlCommon causes and fixes:
SSH service not running:
# Check SSH service status# Linux target:sudo systemctl status sshd # or ssh
# Start if stopped:sudo systemctl start sshd
# Windows target (OpenSSH):Get-Service sshdStart-Service sshdFirewall blocking SSH:
# Linux - allow SSH through firewallsudo ufw allow 22/tcpsudo firewall-cmd --add-service=ssh --permanentsudo firewall-cmd --reload
# Windows - allow SSHNew-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22Wrong host/port:
# Check deployment.yamlnodes: - name: node1 host: 192.168.1.100 # Verify this is correct ssh: port: 22 # Default, check if custom port neededSSH authentication failures
Section titled “SSH authentication failures”Symptom: “Permission denied (publickey)” or “authentication failed”.
Key-based auth troubleshooting:
# 1. Check key permissions (must be 600 or 400)ls -la ~/.ssh/apex-deploychmod 600 ~/.ssh/apex-deploy
# 2. Test SSH with verbose outputssh -vv -i ~/.ssh/apex-deploy user@target-host
# 3. Verify public key is on targetssh user@target-host "cat ~/.ssh/authorized_keys | grep apex-deploy"
# 4. Check target permissionsssh user@target-host "ls -la ~/.ssh/"# Should be: ~/.ssh/ (700), authorized_keys (600)
# Fix target permissions if needed:ssh user@target-host "chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"
# 5. Check SELinux on target (if applicable)ssh user@target-host "restorecon -Rv ~/.ssh"Password auth issues:
# Verify password auth is enabled on target# /etc/ssh/sshd_config should have:# PasswordAuthentication yes
# Restart SSH after changes:sudo systemctl restart sshdSSH key not found
Section titled “SSH key not found”Symptom: “No such file or directory” for SSH key path.
Solution:
# 1. Verify key path in deployment YAMLcat deployment.yaml | grep keyPath
# 2. Check if key existsls -la ~/.ssh/apex-deploy
# 3. Use absolute path in deployment YAMLspec: ssh: keyPath: /home/username/.ssh/apex-deploy # Not ~/
# 4. Or expand tilde in environmentexport HOME=/home/usernameapex deploy -f deployment.yaml --yesDocker Issues
Section titled “Docker Issues”Docker daemon not running
Section titled “Docker daemon not running”Symptom: “Cannot connect to the Docker daemon” or “Docker is not running”.
Solution:
# Linuxsudo systemctl start dockersudo systemctl enable docker # Start on boot
# macOS/Windows# Start Docker Desktop application
# Verifydocker versiondocker compose versionDocker Compose not found
Section titled “Docker Compose not found”Symptom: “docker: ‘compose’ is not a docker command” or “docker-compose: command not found”.
Solution:
# Check Docker Compose versiondocker compose version # Compose V2 (plugin)docker-compose --version # Compose V1 (standalone)
# If missing, install Docker Compose:# Linux - Compose V2:sudo apt-get updatesudo apt-get install docker-compose-plugin
# Or use Compose V1:sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-composeDocker port conflicts
Section titled “Docker port conflicts”Symptom: “port is already allocated” when starting Docker services.
Solution:
# 1. Find what's using the portdocker ps -asudo lsof -i :6030
# 2. Stop conflicting containerdocker stop <container-id>
# 3. Or change ports in docker-compose.yml# Edit docker-compose.yml:ports: - "6030:6030" # Change first port: "6031:6030"Docker out of disk space
Section titled “Docker out of disk space”Symptom: “no space left on device” during Docker operations.
Solution:
# Check Docker disk usagedocker system df
# Clean updocker system prune -a # Remove unused containers, images, networksdocker volume prune # Remove unused volumes (CAUTION: may delete data)
# Or increase Docker Desktop disk allocation:# Docker Desktop → Settings → Resources → Disk image sizeDocker services won’t start
Section titled “Docker services won’t start”Symptom: Container exits immediately or fails to start.
Diagnostic:
# Check container logsdocker compose logs
# Check specific servicedocker compose logs tsdbdocker compose logs idmp
# Check container statusdocker compose ps
# Check service healthdocker inspect <container-name> | grep -A10 HealthCommon fixes:
# 1. Remove containers and restartdocker compose downdocker compose up -d
# 2. Check .env filecat .env# Ensure all required variables are set
# 3. Check port conflicts (see above)
# 4. Check resource limitsdocker info | grep -E 'CPUs|Memory'Deployment Validation Errors
Section titled “Deployment Validation Errors”Version resolution failures
Section titled “Version resolution failures”Symptom: validate fails with “version not found” or “incompatible versions”.
Causes:
- Profile/channel mismatch:
# Check deployment YAMLspec: release: profile: all-in-one # Verify this is correct channel: stable # stable, beta, nightly- Network issues accessing version catalog
- Component not available for profile/channel
Solution:
# Use explicit versions instead of autoroles: - component: tsdb version: "3.3.5.0" # Instead of "auto"Dependency validation failures
Section titled “Dependency validation failures”Symptom: validate fails with “dependency not satisfied” or “circular dependency”.
Solution:
Check component dependencies in manifests. Apex resolves these automatically; if failures occur, it’s usually a manifest issue. Report to component teams.
Platform mismatch errors
Section titled “Platform mismatch errors”Symptom: “platform not supported” or “no installer for platform”.
Cause: Deployment YAML specifies a platform that the component doesn’t support.
Solution:
# Verify platform setting matches target nodenodes: - name: node1 platform: linux-x64 # Must match actual target architecture # Options: linux-x64, linux-arm64, windows-x64# Check actual platform on targetuname -m # x86_64 → linux-x64, aarch64 → linux-arm64Component Runtime Issues
Section titled “Component Runtime Issues”Component won’t start after installation
Section titled “Component won’t start after installation”Symptom: Deployment succeeds but component service won’t start.
Diagnostic steps:
# 1. Check component statusapex-component-status.sh # Linuxapex-component-status.ps1 # Windows
# 2. Check component logs# Linux TSDB:tail -100 /var/log/taos/taoslog.txt# Windows TSDB:Get-Content C:\TDengine\log\taoslog.txt -Tail 100
# 3. Try manual startapex-component-start.sh tsdb# Check output for errors
# 4. Check system logs# Linux:sudo journalctl -u taosadapter -n 50# Windows:Get-EventLog -LogName Application -Source TDengine -Newest 50Common causes:
- Port conflicts - see Port Conflicts section
- Insufficient permissions - component needs root/admin
- Missing dependencies - glibc version, AVX2, etc.
- Configuration errors - check component config files
AVX2 requirement not met
Section titled “AVX2 requirement not met”Symptom: x64 All-in-One fails with “illegal instruction” or similar.
Cause: CPU doesn’t support AVX2 (required for x64 All-in-One).
Check AVX2 support:
# Linuxgrep avx2 /proc/cpuinfo
# If no output, AVX2 is not availableSolutions:
- Use ARM64 if available
- Use TSDB-Enterprise or IDMP-Enterprise profiles (no AVX2 requirement)
- Upgrade hardware to AVX2-capable CPU
Upgrade Issues
Section titled “Upgrade Issues”Upgrade fails mid-way
Section titled “Upgrade fails mid-way”Symptom: Upgrade partially completes then fails.
Recovery:
# 1. Check what succeededapex-component-status.sh
# 2. Review deployment reportcat ~/.apex/reports/deploy-*/report.yaml
# 3. Check logs for failure pointgrep -i error ~/.apex/logs/deploy-*/apex.log
# 4. Fix underlying issue, then retryapex deploy -f deployment.yaml --yesData lost after upgrade
Section titled “Data lost after upgrade”Symptom: Component data missing after upgrade.
Prevention (do this BEFORE upgrading):
# Backup everythingcp -r ~/.apex/config.yaml ~/backup/cp -r deployment.yaml ~/backup/# Component-specific data directoriestar czf tsdb-data-backup.tar.gz /var/lib/taos/
# Docker volumesdocker run --rm -v tdengine_tsdb_data:/data -v $(pwd):/backup alpine tar czf /backup/tsdb-backup.tar.gz /dataRecovery:
If backups exist, restore them. If not, data may be unrecoverable. This underscores the importance of pre-upgrade backups.
Configuration lost after Windows upgrade
Section titled “Configuration lost after Windows upgrade”Symptom: Settings reset after Windows upgrade.
Cause: Upgrade reinstalled to Program Files but didn’t preserve ProgramData modifications.
Prevention:
# Backup ProgramData before upgrade$backupPath = "C:\Backups\TDengine-$(Get-Date -Format 'yyyyMMdd')"Copy-Item "C:\ProgramData\TDengine" -Destination $backupPath -RecurseRecovery:
Restore from backup or reconfigure manually.
Clean and Uninstall Issues
Section titled “Clean and Uninstall Issues”“apex clean” fails with permission denied
Section titled ““apex clean” fails with permission denied”Symptom: apex clean cannot remove directories.
Cause: Insufficient permissions on target node.
Solution:
# Ensure SSH user has permissions# Or use sudo for local cleaning:sudo apex clean -f deployment.yaml --yes
# Check apexDir ownershipls -la /opt/apex # or your apexDirUninstall leaves data behind
Section titled “Uninstall leaves data behind”Symptom: Component data remains after uninstall.
Expected behavior: apex-component-uninstall preserves data by design.
To remove data:
# Use purge insteadapex-component-purge.sh tsdb
# Or manually remove data directories# (component-specific paths)Log and Report Issues
Section titled “Log and Report Issues”Cannot find deployment logs
Section titled “Cannot find deployment logs”Symptom: Expected logs missing from ~/.apex/logs/.
Cause: Logs written to custom apex_home or operation failed before logging started.
Solution:
# Check configured apex_homecat ~/.apex/config.yaml | grep apex_home
# Check all log directoriesfind ~ -name "apex.log" -type f
# For Windows:Get-ChildItem -Path C:\ -Recurse -Filter "apex.log" -ErrorAction SilentlyContinueLogs contain sensitive information
Section titled “Logs contain sensitive information”Symptom: Need to share logs but they contain passwords or keys.
Solution:
# Redact before sharingsed 's/password=.*/password=REDACTED/g' apex.log > apex-redacted.logsed -i 's|/home/[^/]\+|/home/USER|g' apex-redacted.logsed -i 's/10\.[0-9]\+\.[0-9]\+\.[0-9]\+/X.X.X.X/g' apex-redacted.log
# Review before sharingless apex-redacted.logGetting Help
Section titled “Getting Help”When reporting issues, include:
- Apex version:
apex version - Platform: OS, architecture
- Command: Exact command that failed
- Error output: Complete error message
- Logs: Relevant logs (redacted)
- Deployment YAML: Configuration (redacted)
- Steps to reproduce: What you did before the error
Where to get help:
- Check this troubleshooting guide
- Review FAQ
- Check logs and diagnostics
- Component-specific documentation
- TDengine support channels
Quick Reference
Section titled “Quick Reference”# Diagnostic commandsapex versionapex check -f deployment.yamlapex-component-status.sh
# Log locations~/.apex/logs/deploy-*/apex.log~/.apex/reports/deploy-*/report.yaml
# Common fixes# - Restart shell after installation# - Use `transport: local` for single node# - Pin versions in production# - Backup before upgrades# - Check port conflicts# - Verify SSH connectivity# - Clean cache on download failures
# Emergency recoverycp deployment-backup.yaml deployment.yamlapex deploy -f deployment.yaml --yesRelated Topics
Section titled “Related Topics”- FAQ - Common questions and answers
- Logs and failure diagnosis - Log locations and analysis
- Best practices - Prevent issues before they occur
- Security guide - Secure configuration troubleshooting