Skip to main content

Support

Troubleshooting Guide

Common Issues and Solutions

1.Issue 1: Service Won't Start

Ubuntu Diagnosis:

bash


# Check service status
sudo systemctl status flowise
# Check logs
journalctl -u flowise -f
# Check port conflicts
sudo netstat -tlnp | grep :3000
# Check permissions
ls -la /var/lib/flowise
ps aux | grep flowise

RHEL8 Diagnosis:

bash


# Check service status with SELinux
sudo systemctl status flowise
sudo ausearch -m AVC -ts recent
# Check SELinux contexts
ls -Z /var/lib/flowise
ps auxZ | grep flowise
# Check firewall
sudo firewall-cmd --list-ports

Issue 2: Database Connection Problems

Diagnosis Script:

bash



cat > ~/diagnose-db.sh << 'EOF'
#!/bin/bash
DB_PATH="/var/lib/flowise/database.sqlite"
LOG_FILE="/var/log/flowise/diagnosis.log"
echo "=== Database Diagnosis ===" | tee -a "$LOG_FILE"
echo "Date: $(date)" | tee -a "$LOG_FILE"
# Check database file
if [ -f "$DB_PATH" ]; then
echo "✓ Database file exists" | tee -a "$LOG_FILE"
echo " Size: $(du -h $DB_PATH | cut -f1)" | tee -a "$LOG_FILE"
echo " Permissions: $(ls -la $DB_PATH)" | tee -a "$LOG_FILE"
# Test database integrity
integrity=$(sqlite3 "$DB_PATH" "PRAGMA integrity_check;" 2>&1)
if [ "$integrity" = "ok" ]; then
echo "✓ Database integrity OK" | tee -a "$LOG_FILE"
else
echo "✗ Database integrity issues: $integrity" | tee -a "$LOG_FILE"
fi
# Check table count
table_count=$(sqlite3 "$DB_PATH" ".tables" | wc -w)
echo " Tables found: $table_count" | tee -a "$LOG_FILE"
else
echo "✗ Database file not found" | tee -a "$LOG_FILE"
fi
# Check database directory permissions
echo "Database directory permissions:" | tee -a "$LOG_FILE"
ls -la "$(dirname $DB_PATH)" | tee -a "$LOG_FILE"
# Check disk space
echo "Disk space:" | tee -a "$LOG_FILE"
df -h "$(dirname $DB_PATH)" | tee -a "$LOG_FILE"
EOF
chmod +x ~/diagnose-db.sh
./diagnose-db.sh

Issue 3: Memory and Performance Problems

Performance Monitoring:

bash


# Create performance monitoring script
cat > ~/monitor-performance.sh << 'EOF'
#!/bin/bash
LOG_FILE="/var/log/flowise/performance.log"
FLOWISE_PID=$(pgrep -f "flowise")
if [ -z "$FLOWISE_PID" ]; then
echo "$(date): Flowise process not found" >> "$LOG_FILE"
exit 1
fi
# Monitor system resources
echo "=== Performance Report $(date) ===" >> "$LOG_FILE"
# CPU usage
cpu_usage=$(top -p "$FLOWISE_PID" -n1 -b | tail -1 | awk '{print $9}')
echo "CPU Usage: ${cpu_usage}%" >> "$LOG_FILE"
# Memory usage
mem_info=$(cat /proc/"$FLOWISE_PID"/status | grep -E "VmRSS|VmSize")
echo "Memory Info:" >> "$LOG_FILE"
echo "$mem_info" >> "$LOG_FILE"
# File descriptors
fd_count=$(ls /proc/"$FLOWISE_PID"/fd | wc -l)
echo "Open File Descriptors: $fd_count" >> "$LOG_FILE"
# Network connections
net_connections=$(netstat -an | grep ":3000" | wc -l)
echo "Network Connections: $net_connections" >> "$LOG_FILE"
# Disk I/O
if command -v iotop >/dev/null; then
io_usage=$(sudo iotop -p "$FLOWISE_PID" -n1 -b | tail -1)
echo "I/O Usage: $io_usage" >> "$LOG_FILE"
fi
echo "" >> "$LOG_FILE"
EOF
chmod +x ~/monitor-performance.sh
# Run every 5 minutes during troubleshooting
echo "*/5 * * * * /home/$(whoami)/monitor-performance.sh" | crontab -

Error Log Analysis

Log Analysis Tools

Ubuntu Log Analysis:

bash


# Install log analysis tools
sudo apt install -y goaccess logwatch
# Create log parser for Flowise
cat > ~/parse-flowise-logs.sh << 'EOF'
#!/bin/bash
LOG_DIR="/var/log/flowise"
REPORT_FILE="/tmp/flowise-log-report.txt"
echo "Flowise Log Analysis Report - $(date)" > "$REPORT_FILE"
echo "========================================" >> "$REPORT_FILE"
# Error count analysis
echo -e "\n=== Error Summary ===" >> "$REPORT_FILE"
grep -r "ERROR\|FATAL\|Exception" "$LOG_DIR"/*.log | \
awk -F: '{print $3}' | sort | uniq -c | sort -nr >> "$REPORT_FILE"
# Request pattern analysis
echo -e "\n=== Request Patterns ===" >> "$REPORT_FILE"
grep -r "GET\|POST\|PUT\|DELETE" "$LOG_DIR"/*.log | \
awk '{print $7}' | sort | uniq -c | sort -nr | head -20 >> "$REPORT_FILE"
# Response time analysis
echo -e "\n=== Slow Requests ===" >> "$REPORT_FILE"
grep -r "response_time" "$LOG_DIR"/*.log | \
awk '$NF > 1000 {print}' | tail -10 >> "$REPORT_FILE"
# Recent errors (last 24 hours)
echo -e "\n=== Recent Errors ===" >> "$REPORT_FILE"
find "$LOG_DIR" -name "*.log" -mtime -1 -exec grep -l "ERROR\|FATAL" {} \; | \
xargs grep "ERROR\|FATAL" | tail -20 >> "$REPORT_FILE"
echo "Report generated: $REPORT_FILE"
cat "$REPORT_FILE"
EOF
chmod +x ~/parse-flowise-logs.sh

RHEL8 Log Analysis:

bash



# Install log analysis tools
sudo dnf install -y goaccess logwatch
# Create SELinux-aware log parser
cat > ~/parse-flowise-logs-rhel.sh << 'EOF'
#!/bin/bash
LOG_DIR="/var/log/flowise"
REPORT_FILE="/tmp/flowise-log-report.txt"
echo "Flowise Log Analysis Report - $(date)" > "$REPORT_FILE"
echo "========================================" >> "$REPORT_FILE"
# Check SELinux denials related to Flowise
echo -e "\n=== SELinux Denials ===" >> "$REPORT_FILE"
sudo ausearch -m AVC -ts today | grep flowise >> "$REPORT_FILE"
# Error count analysis (same as Ubuntu)
echo -e "\n=== Error Summary ===" >> "$REPORT_FILE"
grep -r "ERROR\|FATAL\|Exception" "$LOG_DIR"/*.log | \
awk -F: '{print $3}' | sort | uniq -c | sort -nr >> "$REPORT_FILE"
# Firewall blocks
echo -e "\n=== Firewall Blocks ===" >> "$REPORT_FILE"
sudo journalctl -u firewalld --since "24 hours ago" | \
grep -i "reject\|drop" | tail -10 >> "$REPORT_FILE"
echo "Report generated: $REPORT_FILE"
cat "$REPORT_FILE"
EOF
chmod +x ~/parse-flowise-logs-rhel.sh

Support Ticket System

Automated Support Information Collection:

bash


cat > ~/collect-support-info.sh << 'EOF'
#!/bin/bash
SUPPORT_DIR="/tmp/flowise-support-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$SUPPORT_DIR"
echo "Collecting Flowise support information..."
echo "Output directory: $SUPPORT_DIR"
# System information
echo "=== System Information ===" > "$SUPPORT_DIR/system-info.txt"
uname -a >> "$SUPPORT_DIR/system-info.txt"
cat /etc/os-release >> "$SUPPORT_DIR/system-info.txt"
free -h >> "$SUPPORT_DIR/system-info.txt"
df -h >> "$SUPPORT_DIR/system-info.txt"
# Flowise version and configuration
echo "=== Flowise Information ===" > "$SUPPORT_DIR/flowise-info.txt"
npm list -g flowise --depth=0 >> "$SUPPORT_DIR/flowise-info.txt" 2>&1
node --version >> "$SUPPORT_DIR/flowise-info.txt"
npm --version >> "$SUPPORT_DIR/flowise-info.txt"
# Service status
echo "=== Service Status ===" > "$SUPPORT_DIR/service-status.txt"
systemctl status flowise >> "$SUPPORT_DIR/service-status.txt" 2>&1
ps aux | grep flowise >> "$SUPPORT_DIR/service-status.txt"
netstat -tlnp | grep :3000 >> "$SUPPORT_DIR/service-status.txt"
# Configuration files (sanitized)
mkdir -p "$SUPPORT_DIR/config"
if [ -d "/etc/flowise" ]; then
cp -r /etc/flowise/* "$SUPPORT_DIR/config/" 2>/dev/null
# Remove sensitive information
find "$SUPPORT_DIR/config" -type f -exec sed -i 's/password=.*/password=***REDACTED***/g' {} \;
find "$SUPPORT_DIR/config" -type f -exec sed -i 's/api_key=.*/api_key=***REDACTED***/g' {} \;
fi
# Recent logs (last 1000 lines)
mkdir -p "$SUPPORT_DIR/logs"
find /var/log/flowise -name "*.log" -exec sh -c 'tail -1000 "$1" > "$2/logs/$(basename "$1")"' _ {} "$SUPPORT_DIR" \;
# Database information (metadata only)
echo "=== Database Information ===" > "$SUPPORT_DIR/database-info.txt"
if [ -f "/var/lib/flowise/database.sqlite" ]; then
ls -la /var/lib/flowise/database.sqlite >> "$SUPPORT_DIR/database-info.txt"
sqlite3 /var/lib/flowise/database.sqlite ".schema" >> "$SUPPORT_DIR/database-info.txt" 2>&1
sqlite3 /var/lib/flowise/database.sqlite "SELECT name FROM sqlite_master WHERE type='table';" >> "$SUPPORT_DIR/database-info.txt" 2>&1
fi
# Network configuration
echo "=== Network Configuration ===" > "$SUPPORT_DIR/network-info.txt"
ip addr show >> "$SUPPORT_DIR/network-info.txt"
netstat -rn >> "$SUPPORT_DIR/network-info.txt"
# Create archive
cd /tmp
tar -czf "flowise-support-$(date +%Y%m%d-%H%M%S).tar.gz" "$(basename $SUPPORT_DIR)"
echo "Support information collected in: $(basename $SUPPORT_DIR).tar.gz"
echo "Please attach this file to your support ticket."
EOF
chmod +x ~/collect-support-info.sh