Skip to content

Troubleshooting

This document compiles diagnosis and solutions for CueMate system failures.

Tip

When encountering failures, we recommend first checking Log Management and Container Monitor pages to understand specific error messages.

1. macOS Platform

1.1 Service Unresponsive

Problem Description: A backend service cannot be accessed, or requests take a long time with no response.

Diagnostic Principles

StatusLogsResourcesNetwork

Following this order to troubleshoot can quickly identify most service issues.

Troubleshooting Steps:

  1. Check Service Status:

    • Open Container Monitor page
    • Check running status of all services
    • Confirm if the problematic service is running
    • Or use command: docker compose ps
  2. View Service Logs:

    • Click "Logs" button for the service in Container Monitor page
    • View recent error messages
    • Or use command: docker compose logs cuemate-web-api
  3. Check Resource Usage:

    • Use command to view resource usage: docker stats
    • Check if CPU or memory is over limit
    • Confirm if disk space is sufficient
Quick Health Check Commands
bash
# One-click check all service health status
curl http://localhost:3001/health  # Web API
curl http://localhost:3002/health  # LLM Router
curl http://localhost:3003/health  # RAG Service
curl http://localhost:8000/api/v1/heartbeat  # ChromaDB
wscat -c ws://localhost:10095  # CueMate-ASR (requires wscat installed)

Solutions:

  1. Restart Service:

    • Click "Restart" button in Container Monitor page
    • Or use command: docker compose restart cuemate-web-api
    • Wait for service restart to complete (about 30 seconds)
  2. Increase Resource Limits:

    • Open Docker Desktop settings
    • Increase memory and CPU allocated to Docker
    • Recommended: 8GB+ memory, 4+ CPU cores
  3. Check Dependent Services:

    • Confirm all dependent services are running normally
    • For example: web-api depends on database, llm-router depends on external API
    • Start services in correct order
  4. View Detailed Error Logs:

    • Open Log Management
    • View error level logs for the corresponding service
    • Troubleshoot based on specific error messages

1.2 Service Crashes Frequently

Problem Description: A service repeatedly restarts automatically, or frequently stops running.

Common Causes of Service Crashes Troubleshooting Order

  1. Most common: Out of Memory (OOM) - 70% of crashes are caused by this
  2. Second: Uncaught exceptions - 20%
  3. Less common: Insufficient disk space - 5%
  4. Rare: Deadlocks or circular dependencies - 5%

Root Cause Categories:

TypeSymptomQuick Diagnosis Method
Out of MemoryContainer auto-restartsdocker stats to check memory usage
Code ExceptionError stack in logsView error level logs
Disk FullWrite operations faildf -h to check disk space
DeadlockService appears frozen with no responseCheck process CPU status

Solutions:

  1. View Crash Logs:

    • View logs before crash in Log Management
    • Search for "Error", "Fatal", "Crash" keywords
    • Record error stack information
  2. Increase Memory Limit:

    • Open Docker Desktop, increase memory allocation
    • Edit docker-compose.yml to increase container memory limit
    • Restart Docker service for configuration to take effect
  3. Update to Latest Version:

    • Check if new version is available
    • Check update logs to see if related bugs are fixed
    • Update following Version Upgrade documentation
  4. Report Issue:

    • Collect complete error logs and reproduction steps
    • Submit bug report on GitHub Issues
    • Provide system environment information (OS, Docker version, etc.)

1.3 Database Connection Failed

Problem Description: Service shows "Database connection failed" or "Cannot access SQLite" when starting.

NOTE

CueMate uses SQLite as database, database files are located at: ~/Library/Application Support/cuemate-desktop-client/data/sqlite/

SQLite doesn't require a separate database service, all data is stored in .db files.

Check Items:

  1. Database File Exists:

    • Check path: ~/Library/Application Support/cuemate-desktop-client/data/sqlite/
    • Confirm .db files exist and are readable
    • Check if file permissions are correct
  2. Database Service Running:

    • For SQLite, no separate database service needed
    • Check if file is locked by other processes
    • Confirm application has read/write permissions
  3. Connection String Correct:

    • Check database file path configuration
    • Confirm path uses absolute path
    • Verify no special characters in path
  4. File Not Corrupted:

    • Try opening database with SQLite tool
    • Check database integrity
    • If corrupted, restore from backup

Solutions:

  1. Check File Permissions:

    bash
    # View file permissions
    ls -la ~/Library/Application\ Support/cuemate-desktop-client/data/sqlite/
    
    # Fix permissions
    chmod 644 ~/Library/Application\ Support/cuemate-desktop-client/data/sqlite/*.db
  2. Restore from Backup:

    • If you have backup, restore database from backup
    • Refer to issue 17 for backup restore method
  3. Rebuild Database:

    • Delete corrupted database file (backup first)
    • Restart application, new database will be created automatically
    • Re-import data

1.4 Slow System Response

Problem Description: Application response speed is slow, operations require long wait times.

Optimization Methods:

  1. Increase Docker Resource Allocation:

    • Open Docker Desktop > Settings > Resources
    • Increase CPU cores (recommended 4+)
    • Increase memory (recommended 8GB+)
    • Click Apply & Restart
  2. Use Faster Models:

    • Change model in Model Settings
    • Use GPT-3.5-turbo instead of GPT-4
    • Use Chinese models (Zhipu AI, Kimi, DeepSeek)
    • Lower max_tokens parameter
  3. Enable Caching (if supported):

    • Some models support caching same requests
    • Enable caching in model configuration
    • Clear expired cache to free space
  4. Optimize Database Queries:

  5. Clean Logs and Temporary Files:

    • Clean old logs in Log Management
    • Delete temporary files and cache
    • Free disk space

1.5 High CPU Usage

Problem Description: When checking Activity Monitor, CueMate or Docker occupies large amounts of CPU resources.

TIP

Normal CPU Usage:

  • Idle state: 5-10%
  • During speech recognition: 20-40%
  • AI generating answers: 10-20%
  • Over 60%: May have performance issues

Solutions:

  1. Limit Concurrent Requests:

    • Avoid sending multiple AI requests simultaneously
    • Wait for previous request to complete before sending new one
    • Close unused feature windows
  2. Lower Speech Recognition Precision:

    • Adjust recognition parameters in Voice Settings
    • Lowering sample rate can reduce CPU usage
    • Disable real-time recognition, switch to on-demand recognition
  3. Use Smaller Models:

    • Avoid using very large parameter models
    • Local models use more CPU than cloud models
    • Prefer cloud API models
  4. Optimize Code Logic:

    • Update to latest version
    • Latest versions usually have performance optimizations
    • Check update logs for improvements
  5. Close Background Services:

    • Temporarily stop unused services
    • Stop services in Container Monitor page
    • Restart when needed

1.6 High Memory Usage

Problem Description: System memory usage keeps growing, or shows insufficient memory.

Optimization Measures:

  1. Clean Cache:

    • Clean application cache in system settings
    • Clear browser cache (if using Web interface)
    • Restart Docker to clean container cache
  2. Reduce Concurrent Processing:

    • Avoid opening multiple feature windows simultaneously
    • Reduce number of services running concurrently
    • Limit concurrent connections per service
  3. Limit Model Size:

    • Avoid loading very large local models
    • Use cloud API instead of local models
    • Reduce model context length (max_tokens)
  4. Regular Service Restart:

    • Long-running services may have memory leaks
    • Regular restarts can free memory
    • Recommend restarting Docker services weekly
  5. Upgrade Hardware:

    • If memory is frequently insufficient, consider upgrading memory
    • Recommend at least 16GB memory
    • Close other memory-intensive applications

1.7 Insufficient Disk Space

Problem Description: System shows insufficient disk space, or application cannot save data.

Cleanup Methods:

  1. Clean Docker Resources:

    bash
    # Clean unused images, containers, networks, volumes
    docker system prune -a
    
    # Only clean dangling images and stopped containers
    docker system prune
    
    # Clean all volumes (use with caution)
    docker volume prune
  2. Clean Application Logs:

    • Open Log Management
    • Select date range to batch delete old logs
    • Or use command:
    bash
    # Delete logs older than 7 days
    find ~/Library/Application\ Support/cuemate-desktop-client/data/logs -mtime +7 -delete
  3. Clean Temporary Files:

    bash
    # Clean system temporary files
    rm -rf /tmp/cuemate
    
    # Clean downloaded temporary files
    rm -rf ~/Downloads/cuemate-temp
  4. Clean Backup Files:

    bash
    # Delete backups older than 30 days
    find ~/backup/cuemate -mtime +30 -delete
    
    # Or manually delete old backups
    rm -rf ~/backup/cuemate/backup_20260101*
  5. Compress Large Files:

    • Compress knowledge base documents
    • Clean unnecessary vector data
    • Delete duplicate interview records

1.8 Cannot Connect to External API

Problem Description: After configuring model, test connection shows "Cannot connect" or "Network error".

Check Items:

  1. Network Connection Normal:

    • Check network connection status
    • Try accessing other websites
    • Use ping to test network connectivity
  2. Firewall Not Blocking:

    • Check system firewall settings
    • Confirm CueMate is allowed network access
    • Check firewall rules
  3. Proxy Settings Correct:

    • If using proxy, check proxy configuration
    • Confirm proxy address and port are correct
    • Test if proxy is available
  4. DNS Resolution Normal:

    • Use nslookup to test domain resolution
    • Try changing DNS server (e.g., 8.8.8.8)
    • Check hosts file for incorrect configuration

Solutions:

  1. Configure Proxy:

    • Configure proxy in system settings or environment variables
    • Set HTTP_PROXY and HTTPS_PROXY
    • Restart application for configuration to take effect
  2. Change DNS:

    • Open system network settings
    • Change DNS server to 8.8.8.8 or 1.1.1.1
    • Clear DNS cache
  3. Use Domestic Models:

    • If cannot access foreign APIs
    • Use domestic large model services (Zhipu AI, Kimi, DeepSeek)
    • No VPN needed

1.9 WebSocket Connection Failed

Problem Description: During speech recognition, shows "WebSocket connection failed" or "Cannot connect to voice service".

Solutions:

  1. Check Firewall Rules:

    • Confirm firewall allows WebSocket connections
    • Allow port 10095 (cuemate-asr)
    • Add application to firewall whitelist
  2. Verify Port Open:

    bash
    # Check if port is listening
    lsof -i :10095
    
    # Test port connectivity
    telnet localhost 10095
  3. Check Service Status:

    • Open Container Monitor
    • Confirm cuemate-asr service is running
    • View service logs to troubleshoot errors
  4. Restart Voice Service:

    • Restart cuemate-asr in Container Monitor page
    • Wait for service restart to complete
    • Re-test WebSocket connection

1.10 Permission Denied

Problem Description: Shows "Insufficient permission" or "Access denied".

Solutions:

  1. Check File Permissions:

    bash
    # View file permissions
    ls -la ~/Library/Application\ Support/cuemate-desktop-client/
    
    # Fix permissions
    chmod -R 755 ~/Library/Application\ Support/cuemate-desktop-client/
  2. Check System Permissions:

    • Open "System Settings" > "Privacy & Security"
    • Check microphone permission
    • Check screen recording & system audio permission
    • Check files and folders permission
  3. Run as Administrator:

    • Some operations require administrator privileges
    • macOS: Use sudo command
    • Use with caution, avoid security risks

1.11 Port Conflict

Problem Description: Service startup fails, shows "Port already in use".

Solutions:

  1. Find Program Occupying Port:

    bash
    # Check port occupation
    lsof -i :3001
    lsof -i :10095
    
    # View all listening ports
    lsof -i -P | grep LISTEN
  2. Close Program Occupying Port:

    bash
    # Close process by PID
    kill -9 <PID>
    
    # Or use Activity Monitor to manually close
  3. Change CueMate Port (not recommended):

    • Edit docker-compose.yml file
    • Modify port mapping configuration
    • Restart service for configuration to take effect
  4. Restart System:

    • If cannot find occupying program
    • Restarting Mac can release all ports
    • Start CueMate again after restart

1.12 Docker Image Corrupted

Problem Description: Service cannot start, shows "Image corrupted" or "Cannot load image".

Solutions:

  1. Delete Corrupted Image:

    bash
    # View all images
    docker images
    
    # Delete specific image
    docker rmi <IMAGE_ID>
    
    # Delete all dangling images
    docker image prune
  2. Reload Image:

    • If using offline installation package, reload images
    • Or pull latest images from image registry
    • Refer to Installation Guide
  3. Rebuild Containers:

    bash
    # Stop all containers
    docker compose down
    
    # Delete containers and images
    docker compose down --rmi all
    
    # Rebuild
    docker compose up -d

1.13 Configuration File Lost or Corrupted

Problem Description: Application startup fails, shows "Configuration file not found" or "Configuration format error".

Solutions:

  1. Check Configuration File Location:

    bash
    # Configuration file path
    ~/Library/Application Support/cuemate-desktop-client/config/
    
    # View configuration files
    ls -la ~/Library/Application\ Support/cuemate-desktop-client/config/
  2. Restore Default Configuration:

    • Delete corrupted configuration file
    • Restart application, default configuration will be created automatically
    • Reconfigure models and settings
  3. Restore from Backup:

    • If you have configuration file backup
    • Copy backup file to configuration directory
    • Restart application
  4. Manually Fix Configuration File:

    • Open configuration file with text editor
    • Check if JSON format is correct
    • Fix syntax errors or missing fields

1.14 Certificate Expired or Invalid

Problem Description: When accessing certain services, shows "Invalid certificate" or "SSL error".

Solutions:

  1. Update System Certificates:

    • Update macOS system to latest version
    • System will automatically update root certificates
  2. Ignore Certificate Verification (not recommended):

    • Only for testing environments
    • Not recommended to disable certificate verification in production
  3. Use HTTP Instead of HTTPS:

    • If it's an internal network service
    • Can use HTTP protocol
    • Modify API URL to HTTP

1.15 Difficulty Viewing Logs

Problem Description: Log files are too large, or cannot find needed error messages.

Solutions:

  1. Use Log Management Page:

    • Open Log Management
    • Use date and level filters
    • Search keywords to locate errors
  2. Use Command Line Tools to Filter:

    bash
    # View last 100 lines (using web-api as example)
    tail -n 100 ~/Library/Application\ Support/cuemate-desktop-client/data/logs/web-api/2026-01-15/error.log
    
    # Real-time view logs
    tail -f ~/Library/Application\ Support/cuemate-desktop-client/data/logs/web-api/2026-01-15/error.log
    
    # Search keywords
    grep "Error" ~/Library/Application\ Support/cuemate-desktop-client/data/logs/web-api/2026-01-15/error.log
    
    # Count error occurrences
    grep -c "Error" ~/Library/Application\ Support/cuemate-desktop-client/data/logs/web-api/2026-01-15/error.log
  3. Export Logs to File:

    • Export logs in Log Management page
    • View with text editor
    • Share with technical support for analysis

1.16 Application Crashes Cannot Start

Problem Description: Application crashes immediately after starting, or cannot start normally.

Solutions:

  1. View Crash Report:

    • macOS: "Console" > "User Reports" > "Application Crashes"
    • Find CueMate crash report
    • Record error information
  2. Clean Cache and Configuration:

Data Safety Warning

Before executing the following commands, strongly recommend backing up data first! Delete operations cannot be recovered.

Be sure to execute backup command first, then execute delete command.

bash
# 1. First backup configuration and data (important!)
cp -r ~/Library/Application\ Support/cuemate-desktop-client ~/backup/

# 2. Then delete cache
rm -rf ~/Library/Caches/cuemate-desktop-client

# 3. Delete temporary files
rm -rf /tmp/cuemate
  1. Reinstall Application:

    • Completely uninstall CueMate
    • Re-download latest version installation package
    • Reinstall
    • See Uninstall Guide for details
  2. Check System Compatibility:

    • Confirm macOS version meets requirements (>= 13.0)
    • Check if hardware configuration meets requirements
    • Update system to latest version

1.17 Data Backup Failed

Problem Description: Backup operation fails, or backup file cannot be used.

Correct Data Backup Method:

bash
#!/bin/bash
# CueMate Data Backup Script

BACKUP_DIR=~/backup/cuemate
DATE=$(date +%Y%m%d_%H%M%S)
DATA_DIR=~/Library/Application\ Support/cuemate-desktop-client/data

echo "Starting CueMate data backup..."

# Create backup directory
mkdir -p $BACKUP_DIR

# Backup SQLite database
if [ -d "$DATA_DIR/sqlite" ]; then
    echo "Backing up database..."
    cp -r "$DATA_DIR/sqlite" "$BACKUP_DIR/sqlite_$DATE"
fi

# Backup vector database
if [ -d "$DATA_DIR/chroma" ]; then
    echo "Backing up vector data..."
    cp -r "$DATA_DIR/chroma" "$BACKUP_DIR/chroma_$DATE"
fi

# Backup configuration files
if [ -d ~/Library/Application\ Support/cuemate-desktop-client/config ]; then
    echo "Backing up configuration files..."
    cp -r ~/Library/Application\ Support/cuemate-desktop-client/config "$BACKUP_DIR/config_$DATE"
fi

# Compress
echo "Compressing backup files..."
cd $BACKUP_DIR
tar -czf "cuemate_backup_$DATE.tar.gz" \
    "sqlite_$DATE" \
    "chroma_$DATE" \
    "config_$DATE" 2>/dev/null

# Clean temporary files
rm -rf "sqlite_$DATE" "chroma_$DATE" "config_$DATE"

echo "Backup complete: $BACKUP_DIR/cuemate_backup_$DATE.tar.gz"

Verify Backup File:

bash
# View backup file size
ls -lh ~/backup/cuemate/

# Test extraction
tar -tzf ~/backup/cuemate/cuemate_backup_20260115.tar.gz

# Integrity check
tar -xzf ~/backup/cuemate/cuemate_backup_20260115.tar.gz -O > /dev/null

1.18 Data Recovery Failed

Problem Description: Attempting to restore data from backup fails.

Correct Data Recovery Method:

bash
#!/bin/bash
# CueMate Data Recovery Script

BACKUP_FILE=$1
DATA_DIR=~/Library/Application\ Support/cuemate-desktop-client/data

if [ -z "$BACKUP_FILE" ]; then
    echo "Usage: ./restore.sh <backup_file_path>"
    exit 1
fi

echo "Starting CueMate data recovery..."
echo "Backup file: $BACKUP_FILE"

# Stop services
echo "Stopping Docker services..."
cd ~/Library/Application\ Support/cuemate-desktop-client
docker compose stop

# Extract backup file
echo "Extracting backup file..."
TEMP_DIR=$(mktemp -d)
tar -xzf "$BACKUP_FILE" -C "$TEMP_DIR"

# Restore database
if [ -d "$TEMP_DIR/sqlite_"* ]; then
    echo "Restoring database..."
    rm -rf "$DATA_DIR/sqlite"
    cp -r "$TEMP_DIR"/sqlite_* "$DATA_DIR/sqlite"
fi

# Restore vector data
if [ -d "$TEMP_DIR/chroma_"* ]; then
    echo "Restoring vector data..."
    rm -rf "$DATA_DIR/chroma"
    cp -r "$TEMP_DIR"/chroma_* "$DATA_DIR/chroma"
fi

# Restore configuration files
if [ -d "$TEMP_DIR/config_"* ]; then
    echo "Restoring configuration files..."
    rm -rf ~/Library/Application\ Support/cuemate-desktop-client/config
    cp -r "$TEMP_DIR"/config_* ~/Library/Application\ Support/cuemate-desktop-client/config
fi

# Clean temporary files
rm -rf "$TEMP_DIR"

# Start services
echo "Starting Docker services..."
docker compose start

echo "Recovery complete!"
echo "Please wait for services to start (about 30 seconds), then reopen the application."

Usage:

bash
# Grant script execute permission
chmod +x restore.sh

# Execute recovery
./restore.sh ~/backup/cuemate/cuemate_backup_20260115.tar.gz

1.19 Health Check Script

Problem Description: Don't know how to quickly check overall system status.

Health Check Script:

bash
#!/bin/bash
# CueMate System Health Check Script

echo "=========================================="
echo "  CueMate System Health Check"
echo "=========================================="
echo ""

# Check Docker
echo "[ 1/6 ] Checking Docker..."
if docker ps &>/dev/null; then
    echo "  ✓ Docker running normally"
else
    echo "  ✗ Docker not running or no permission"
fi
echo ""

# Check services
echo "[ 2/6 ] Checking service status..."
services=("web" "web-api" "llm-router" "rag-service" "asr" "chroma")
for service in "${services[@]}"; do
    if docker ps | grep -q "cuemate-$service"; then
        echo "  ✓ cuemate-$service running normally"
    else
        echo "  ✗ cuemate-$service not running"
    fi
done
echo ""

# Check ports
echo "[ 3/6 ] Checking port listening..."
ports=(3001 3002 3003 3004 8000 10095)
port_names=("Web-API" "LLM-Router" "RAG-Service" "Web" "ChromaDB" "ASR")
for i in "${!ports[@]}"; do
    port=${ports[$i]}
    name=${port_names[$i]}
    if lsof -i :$port &>/dev/null; then
        echo "  ✓ Port $port ($name) is listening"
    else
        echo "  ✗ Port $port ($name) not listening"
    fi
done
echo ""

# Check disk space
echo "[ 4/6 ] Checking disk space..."
available=$(df -h ~/ | awk 'NR==2 {print $4}')
echo "  Available space: $available"
echo ""

# Check memory usage
echo "[ 5/6 ] Checking Docker resource usage..."
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}" | head -n 7
echo ""

# Test service health
echo "[ 6/6 ] Testing service health checks..."
endpoints=(
    "http://localhost:3001/health:Web-API"
    "http://localhost:3002/health:LLM-Router"
    "http://localhost:3003/health:RAG-Service"
)
for endpoint in "${endpoints[@]}"; do
    url="${endpoint%%:*}"
    name="${endpoint##*:}"
    if curl -s -f "$url" > /dev/null 2>&1; then
        echo "  ✓ $name health check passed"
    else
        echo "  ✗ $name health check failed"
    fi
done

echo ""
echo "=========================================="
echo "  Check Complete"
echo "=========================================="

Usage:

bash
# Save as health-check.sh
chmod +x health-check.sh
./health-check.sh

1.20 Performance Monitoring and Analysis

Problem Description: Want to continuously monitor system performance and discover potential issues.

Monitoring Script:

bash
#!/bin/bash
# CueMate Performance Monitoring Script

LOG_FILE=~/cuemate-monitor.log
INTERVAL=60  # Monitoring interval (seconds)

echo "Starting CueMate performance monitoring (every $INTERVAL seconds)"
echo "Log file: $LOG_FILE"
echo "Press Ctrl+C to stop monitoring"
echo ""

while true; do
    echo "==================== $(date) ====================" >> $LOG_FILE

    # Record Docker container resource usage
    docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}" >> $LOG_FILE

    # Record disk space
    echo "" >> $LOG_FILE
    echo "Disk space:" >> $LOG_FILE
    df -h ~/ | grep -v Filesystem >> $LOG_FILE

    # Record service status
    echo "" >> $LOG_FILE
    echo "Service status:" >> $LOG_FILE
    docker compose ps >> $LOG_FILE

    echo "" >> $LOG_FILE

    # Display brief info in terminal
    echo "[$(date +%H:%M:%S)] Monitoring data recorded"

    sleep $INTERVAL
done

Analyze Logs:

bash
# View recent monitoring data
tail -n 50 ~/cuemate-monitor.log

# Statistics on CPU usage
grep "cuemate-web-api" ~/cuemate-monitor.log | awk '{print $2}'

# View memory trends
grep "cuemate-" ~/cuemate-monitor.log | awk '{print $1, $3}'

2. Windows Platform

Under Development

Windows version is under development, stay tuned.

If you have any suggestions or requirements for the Windows version, please provide feedback through:

Get More Help

If the above methods cannot solve your problem, you can get help through:

Prepare Information

Before contacting technical support, please prepare the following information:

  1. System Environment:

    • macOS version (e.g., macOS 15.0)
    • Chip type (Apple Silicon or Intel)
    • CueMate version number
  2. Complete Error Logs:

    • Export related logs from Log Management
    • Include time and context when error occurred
    • Screenshots or text format
  3. Problem Reproduction Steps:

    • Describe in detail how to reproduce the problem
    • List specific operation steps
    • Describe expected result and actual result
  4. Solutions Already Tried:

    • List solutions already attempted
    • Describe results of attempts
    • Avoid duplicate suggestions

Contact Information

Released under the GPL-3.0 License.