Fixpanic
Troubleshooting

CLI Issues

Troubleshooting problems with the FixPanic CLI and agents

This page covers common issues with the FixPanic CLI tool and agent management.

Installation Issues

Installation Script Fails

Symptoms: The curl | bash installation fails with an error.

Solutions:

  1. Check internet connectivity:

    curl -I https://install.fixpanic.com

    If this fails, check your network/proxy settings.

  2. Try manual installation: Download the binary directly for your platform from the releases page.

  3. Check disk space:

    df -h /usr/local/bin

    Ensure at least 50MB is available.

Permission Denied During Installation

Symptoms: "Permission denied" when installing to /usr/local/bin.

Solutions:

Option 1: Use sudo

curl -fsSL https://install.fixpanic.com/install.sh | sudo bash

Option 2: User Installation

mkdir -p ~/.local/bin
# Download and extract to ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"

Command Not Found After Installation

Symptoms: fixpanic: command not found after installation.

Solutions:

  1. Restart your terminal or run:

    source ~/.bashrc  # or ~/.zshrc
  2. Check PATH includes installation directory:

    echo $PATH | grep -E "(local/bin|\.local/bin)"
  3. Add to PATH if missing:

    echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc

Agent Won't Start

Symptoms: fixpanic agent start completes but agent shows as stopped.

Diagnostic Steps:

  1. Run validation:

    fixpanic agent validate

    This identifies specific issues.

  2. Check logs for errors:

    fixpanic agent logs --lines=50

    Look for ERROR or FATAL messages.

  3. Verify configuration exists:

    # System installation
    cat /etc/fixpanic/agent.yaml
    
    # User installation
    cat ~/.config/fixpanic/agent.yaml
  4. Check agent binary exists:

    # System installation
    ls -la /usr/local/lib/fixpanic/
    
    # User installation
    ls -la ~/.local/lib/fixpanic/

Connectivity Problems

Symptoms: Agent starts but shows "Disconnected" or connection errors.

Check Network Access

# Test TCP connectivity
nc -zv socket.fixpanic.com 9000

# Alternative using curl
curl -v telnet://socket.fixpanic.com:9000

# Check DNS resolution
nslookup socket.fixpanic.com

Firewall Configuration

Ensure outbound TCP on port 9000 is allowed:

UFW (Ubuntu):

# Check status
sudo ufw status

# Allow outbound (usually allowed by default)
sudo ufw allow out 9000/tcp

firewalld (RHEL/CentOS):

# Check status
sudo firewall-cmd --list-all

# Allow outbound
sudo firewall-cmd --permanent --add-port=9000/tcp
sudo firewall-cmd --reload

iptables:

# Check existing rules
sudo iptables -L -n | grep 9000

# Allow outbound
sudo iptables -A OUTPUT -p tcp --dport 9000 -j ACCEPT

Proxy Issues

If behind a corporate proxy:

# The agent's TCP connection doesn't work through HTTP proxies
# You need direct TCP access to socket.fixpanic.com:9000

# Temporarily disable proxy to test
unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
fixpanic agent restart

Warning: FixPanic agents require direct TCP access. HTTP proxies are not supported for the main connection.

Permission Errors

System Installation (Root)

If you installed with sudo, always use sudo for commands:

sudo fixpanic agent status
sudo fixpanic agent start
sudo fixpanic agent logs

Fix permissions if needed:

sudo chown -R root:root /etc/fixpanic/
sudo chmod 600 /etc/fixpanic/agent.yaml

User Installation

If installed without root, never use sudo:

# Correct
fixpanic agent status

# WRONG - will cause permission conflicts
sudo fixpanic agent status

Fix permissions:

chmod 600 ~/.config/fixpanic/agent.yaml

Configuration Issues

Invalid Configuration

Symptoms: Validation fails with "invalid configuration".

Check YAML syntax:

# Install yamllint
pip install yamllint

# Validate config
yamllint /etc/fixpanic/agent.yaml

Common YAML issues:

  • Tabs instead of spaces
  • Missing quotes around special characters
  • Incorrect indentation

Missing Credentials

Symptoms: "agent_id or api_key missing".

Verify configuration:

app:
  agent_id: "your-agent-id"    # Required
  api_key: "your-api-key"      # Required

Regenerate Configuration

If config is corrupted, reinstall:

fixpanic agent uninstall --force
fixpanic agent install --agent-id="your-id" --api-key="your-key"

macOS Specific Issues

Developer Cannot Be Verified

Symptoms: "fixpanic cannot be opened because the developer cannot be verified"

Solutions:

Using System Preferences:

  1. Open System Settings > Privacy & Security
  2. Scroll down to find the blocked app message
  3. Click "Open Anyway"

Using Command Line:

# Remove quarantine attribute
sudo xattr -d com.apple.quarantine /usr/local/bin/fixpanic
sudo xattr -d com.apple.quarantine /usr/local/lib/fixpanic/*

Permission Issues on macOS

macOS may require explicit permissions:

# Grant execute permission
chmod +x /usr/local/bin/fixpanic
chmod +x /usr/local/lib/fixpanic/fixpanic-connectivity-layer

Service Issues (Linux)

Service Not Starting on Boot

Check if enabled:

sudo systemctl is-enabled fixpanic-connectivity-layer

Enable it:

sudo systemctl enable fixpanic-connectivity-layer

View Service Status

sudo systemctl status fixpanic-connectivity-layer

View Service Logs

sudo journalctl -u fixpanic-connectivity-layer -f

Restart Service

sudo systemctl restart fixpanic-connectivity-layer

Agent Keeps Disconnecting

Symptoms: Frequent reconnection messages in logs.

Possible Causes:

  1. Unstable network:

    ping -c 20 socket.fixpanic.com

    Look for packet loss or high latency.

  2. Firewall killing idle connections: Some firewalls terminate idle TCP connections. Contact your network administrator.

  3. Resource exhaustion:

    top -bn1 | head -20
    free -h

    Check CPU and memory usage.

  4. Agent crashing:

    fixpanic agent logs | grep -i "error\|panic\|fatal"

Upgrade Issues

Upgrade Command Fails

# Check current version
fixpanic --version

# Try manual upgrade
curl -fsSL https://install.fixpanic.com/install.sh | bash

Agent Version Mismatch

After CLI upgrade, update the agent:

fixpanic agent stop
fixpanic agent upgrade
fixpanic agent start

Getting More Help

If these solutions don't resolve your issue:

  1. Run full diagnostics:

    fixpanic agent validate > diagnostics.txt
    fixpanic agent logs --lines=200 >> diagnostics.txt
  2. Contact support with:

    • The diagnostics.txt file
    • Your OS: uname -a
    • Steps to reproduce

Support channels:

On this page