Skip to content

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.

“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:

Terminal window
# Option 1: Restart your shell
exit
# Log back in
# Option 2: Manually source your profile
source ~/.bashrc # or ~/.zshrc for zsh
# Option 3: Use the full path
~/.apex/bin/apex version
# Option 4: Add to PATH manually
export 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:

Terminal window
# 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 apex

Symptom: Windows SmartScreen blocks installer execution.

Cause: Installer not yet widely recognized by SmartScreen.

Solution:

  1. Verify installer signature and source
  2. Click “More info” on SmartScreen warning
  3. Click “Run anyway”
  4. Follow your organization’s security policy for handling such warnings

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:

Terminal window
# Preferred: ss
ss -tuln | grep -E '6030|6041|6043|6044|6060|7030|8030|8111'
# Alternative: lsof
sudo lsof -i :6030
sudo lsof -i :6041
# Alternative: netstat
netstat -tuln | grep -E '6030|6041'
# Check all TDengine ports at once
for 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 "
fi
done

Check on Windows:

Terminal window
# Check specific ports
Test-NetConnection -ComputerName localhost -Port 6030
Test-NetConnection -ComputerName localhost -Port 6041
# List all listening ports
Get-NetTCPConnection -State Listen | Where-Object {$_.LocalPort -in 6030,6041,6043,6044,6060,7030,8030,8111} | Format-Table
# Alternative: netstat
netstat -ano | findstr ":6030"
netstat -ano | findstr ":6041"

Solutions:

  1. Identify the conflicting service:
Terminal window
# Linux - find process using port
sudo lsof -i :6030
# or
sudo ss -tlnp | grep :6030
# Windows - find process ID
netstat -ano | findstr ":6030"
# Then lookup process
tasklist | findstr "<PID>"
  1. Stop the conflicting service (if appropriate):
Terminal window
# Linux
sudo systemctl stop <service-name>
sudo kill <PID>
# Windows
Stop-Service -Name "<service-name>"
Stop-Process -Id <PID>
  1. Change TDengine port configuration (if conflict unavoidable)

Symptom: prepare fails with “failed to download artifact” or connection timeout.

Causes and solutions:

Network connectivity:

Terminal window
# Test connectivity to download server
curl -I https://downloads.tdengine.com
ping downloads.tdengine.com
# Test with verbose output
curl -v https://downloads.tdengine.com/apex/latest/install.sh
# Check DNS resolution
nslookup downloads.tdengine.com

Proxy issues:

Terminal window
# Set proxy for downloads
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080
apex prepare -f deployment.yaml --manifests ~/.apex/manifests/
# Or configure in apex config
# ~/.apex/config.yaml
http_proxy: http://proxy.example.com:8080
https_proxy: http://proxy.example.com:8080

Firewall blocking downloads:

  • Whitelist downloads.tdengine.com in firewall
  • Allow outbound HTTPS (port 443)
  • Check corporate firewall/proxy policies

Mirror or CDN issues:

~/.apex/config.yaml
# Try alternative mirror
base_url: https://alternative-mirror.example.com

Symptom: prepare fails with “SHA256 mismatch” or “checksum verification failed”.

Cause: Downloaded file doesn’t match manifest checksum.

Solutions:

Terminal window
# 1. Delete cached artifact and retry
rm ~/.apex/cache/artifacts/<artifact-name>
apex prepare -f deployment.yaml --manifests ~/.apex/manifests/
# 2. Clear entire cache if multiple artifacts affected
rm -rf ~/.apex/cache/artifacts/*
apex prepare -f deployment.yaml --manifests ~/.apex/manifests/
# 3. Check if proxy/cache is serving stale content
curl -I https://downloads.tdengine.com/path/to/artifact.tar.gz
# Look for cache headers
# 4. For offline bundles, verify integrity
cd offline-bundle/
sha256sum -c checksums.txt

Never:

  • Modify manifest checksums
  • Skip verification
  • Use artifacts from untrusted sources

Symptom: apex check or deployment fails with “connection refused” or “connection timeout”.

Diagnostic steps:

Terminal window
# 1. Test basic SSH connectivity
ssh -v user@target-host
# 2. Test with Apex's exact settings
ssh -i ~/.ssh/apex-deploy -p 22 user@target-host
# 3. Run apex check for detailed output
apex check -f deployment.yaml

Common causes and fixes:

SSH service not running:

Terminal window
# Check SSH service status
# Linux target:
sudo systemctl status sshd # or ssh
# Start if stopped:
sudo systemctl start sshd
# Windows target (OpenSSH):
Get-Service sshd
Start-Service sshd

Firewall blocking SSH:

Terminal window
# Linux - allow SSH through firewall
sudo ufw allow 22/tcp
sudo firewall-cmd --add-service=ssh --permanent
sudo firewall-cmd --reload
# Windows - allow SSH
New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH SSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22

Wrong host/port:

# Check deployment.yaml
nodes:
- name: node1
host: 192.168.1.100 # Verify this is correct
ssh:
port: 22 # Default, check if custom port needed

Symptom: “Permission denied (publickey)” or “authentication failed”.

Key-based auth troubleshooting:

Terminal window
# 1. Check key permissions (must be 600 or 400)
ls -la ~/.ssh/apex-deploy
chmod 600 ~/.ssh/apex-deploy
# 2. Test SSH with verbose output
ssh -vv -i ~/.ssh/apex-deploy user@target-host
# 3. Verify public key is on target
ssh user@target-host "cat ~/.ssh/authorized_keys | grep apex-deploy"
# 4. Check target permissions
ssh 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:

Terminal window
# Verify password auth is enabled on target
# /etc/ssh/sshd_config should have:
# PasswordAuthentication yes
# Restart SSH after changes:
sudo systemctl restart sshd

Symptom: “No such file or directory” for SSH key path.

Solution:

Terminal window
# 1. Verify key path in deployment YAML
cat deployment.yaml | grep keyPath
# 2. Check if key exists
ls -la ~/.ssh/apex-deploy
# 3. Use absolute path in deployment YAML
spec:
ssh:
keyPath: /home/username/.ssh/apex-deploy # Not ~/
# 4. Or expand tilde in environment
export HOME=/home/username
apex deploy -f deployment.yaml --yes

Symptom: “Cannot connect to the Docker daemon” or “Docker is not running”.

Solution:

Terminal window
# Linux
sudo systemctl start docker
sudo systemctl enable docker # Start on boot
# macOS/Windows
# Start Docker Desktop application
# Verify
docker version
docker compose version

Symptom: “docker: ‘compose’ is not a docker command” or “docker-compose: command not found”.

Solution:

Terminal window
# Check Docker Compose version
docker compose version # Compose V2 (plugin)
docker-compose --version # Compose V1 (standalone)
# If missing, install Docker Compose:
# Linux - Compose V2:
sudo apt-get update
sudo 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-compose
sudo chmod +x /usr/local/bin/docker-compose

Symptom: “port is already allocated” when starting Docker services.

Solution:

Terminal window
# 1. Find what's using the port
docker ps -a
sudo lsof -i :6030
# 2. Stop conflicting container
docker stop <container-id>
# 3. Or change ports in docker-compose.yml
# Edit docker-compose.yml:
ports:
- "6030:6030" # Change first port: "6031:6030"

Symptom: “no space left on device” during Docker operations.

Solution:

Terminal window
# Check Docker disk usage
docker system df
# Clean up
docker system prune -a # Remove unused containers, images, networks
docker volume prune # Remove unused volumes (CAUTION: may delete data)
# Or increase Docker Desktop disk allocation:
# Docker Desktop → Settings → Resources → Disk image size

Symptom: Container exits immediately or fails to start.

Diagnostic:

Terminal window
# Check container logs
docker compose logs
# Check specific service
docker compose logs tsdb
docker compose logs idmp
# Check container status
docker compose ps
# Check service health
docker inspect <container-name> | grep -A10 Health

Common fixes:

Terminal window
# 1. Remove containers and restart
docker compose down
docker compose up -d
# 2. Check .env file
cat .env
# Ensure all required variables are set
# 3. Check port conflicts (see above)
# 4. Check resource limits
docker info | grep -E 'CPUs|Memory'

Symptom: validate fails with “version not found” or “incompatible versions”.

Causes:

  1. Profile/channel mismatch:
# Check deployment YAML
spec:
release:
profile: all-in-one # Verify this is correct
channel: stable # stable, beta, nightly
  1. Network issues accessing version catalog
  2. Component not available for profile/channel

Solution:

Terminal window
# Use explicit versions instead of auto
roles:
- component: tsdb
version: "3.3.5.0" # Instead of "auto"

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.

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 node
nodes:
- name: node1
platform: linux-x64 # Must match actual target architecture
# Options: linux-x64, linux-arm64, windows-x64
Terminal window
# Check actual platform on target
uname -m # x86_64 → linux-x64, aarch64 → linux-arm64

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:

Terminal window
# 1. Check component status
apex-component-status.sh # Linux
apex-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 start
apex-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 50

Common causes:

  1. Port conflicts - see Port Conflicts section
  2. Insufficient permissions - component needs root/admin
  3. Missing dependencies - glibc version, AVX2, etc.
  4. Configuration errors - check component config files

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:

Terminal window
# Linux
grep avx2 /proc/cpuinfo
# If no output, AVX2 is not available

Solutions:

  1. Use ARM64 if available
  2. Use TSDB-Enterprise or IDMP-Enterprise profiles (no AVX2 requirement)
  3. Upgrade hardware to AVX2-capable CPU

Symptom: Upgrade partially completes then fails.

Recovery:

Terminal window
# 1. Check what succeeded
apex-component-status.sh
# 2. Review deployment report
cat ~/.apex/reports/deploy-*/report.yaml
# 3. Check logs for failure point
grep -i error ~/.apex/logs/deploy-*/apex.log
# 4. Fix underlying issue, then retry
apex deploy -f deployment.yaml --yes

Symptom: Component data missing after upgrade.

Prevention (do this BEFORE upgrading):

Terminal window
# Backup everything
cp -r ~/.apex/config.yaml ~/backup/
cp -r deployment.yaml ~/backup/
# Component-specific data directories
tar czf tsdb-data-backup.tar.gz /var/lib/taos/
# Docker volumes
docker run --rm -v tdengine_tsdb_data:/data -v $(pwd):/backup alpine tar czf /backup/tsdb-backup.tar.gz /data

Recovery:

If backups exist, restore them. If not, data may be unrecoverable. This underscores the importance of pre-upgrade backups.

Symptom: Settings reset after Windows upgrade.

Cause: Upgrade reinstalled to Program Files but didn’t preserve ProgramData modifications.

Prevention:

Terminal window
# Backup ProgramData before upgrade
$backupPath = "C:\Backups\TDengine-$(Get-Date -Format 'yyyyMMdd')"
Copy-Item "C:\ProgramData\TDengine" -Destination $backupPath -Recurse

Recovery:

Restore from backup or reconfigure manually.

“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:

Terminal window
# Ensure SSH user has permissions
# Or use sudo for local cleaning:
sudo apex clean -f deployment.yaml --yes
# Check apexDir ownership
ls -la /opt/apex # or your apexDir

Symptom: Component data remains after uninstall.

Expected behavior: apex-component-uninstall preserves data by design.

To remove data:

Terminal window
# Use purge instead
apex-component-purge.sh tsdb
# Or manually remove data directories
# (component-specific paths)

Symptom: Expected logs missing from ~/.apex/logs/.

Cause: Logs written to custom apex_home or operation failed before logging started.

Solution:

Terminal window
# Check configured apex_home
cat ~/.apex/config.yaml | grep apex_home
# Check all log directories
find ~ -name "apex.log" -type f
# For Windows:
Get-ChildItem -Path C:\ -Recurse -Filter "apex.log" -ErrorAction SilentlyContinue

Symptom: Need to share logs but they contain passwords or keys.

Solution:

Terminal window
# Redact before sharing
sed 's/password=.*/password=REDACTED/g' apex.log > apex-redacted.log
sed -i 's|/home/[^/]\+|/home/USER|g' apex-redacted.log
sed -i 's/10\.[0-9]\+\.[0-9]\+\.[0-9]\+/X.X.X.X/g' apex-redacted.log
# Review before sharing
less apex-redacted.log

When reporting issues, include:

  1. Apex version: apex version
  2. Platform: OS, architecture
  3. Command: Exact command that failed
  4. Error output: Complete error message
  5. Logs: Relevant logs (redacted)
  6. Deployment YAML: Configuration (redacted)
  7. 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
Terminal window
# Diagnostic commands
apex version
apex check -f deployment.yaml
apex-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 recovery
cp deployment-backup.yaml deployment.yaml
apex deploy -f deployment.yaml --yes