Skip to content

Common Issues

This guide covers common issues encountered when deploying and operating License Monitor and License Server Detail.

Symptoms: License Monitor fails to start or exits immediately.

  1. Check configuration syntax

    Terminal window
    /usr/local/bin/license_monitor --config /etc/license-monitor/config.toml --debug
  2. Verify file permissions

    Terminal window
    ls -la /etc/license-monitor/
    ls -la /var/log/license-monitor/
  3. Check port availability

    Terminal window
    ss -tlnp | grep 8080
    # If port in use, change bind_port in config
  4. Review system logs

    Terminal window
    journalctl -u license-monitor -n 50

Common causes:

  • Invalid TOML syntax in config file
  • Port already in use
  • Insufficient permissions on log directory
  • Missing required dependencies

Symptoms: Requests to API endpoints timeout or return errors.

CheckCommandExpected
Service runningsystemctl status license-monitorActive
Port listeningss -tlnp | grep 8080LISTEN
Firewalliptables -L -n | grep 8080ACCEPT
Process healthcurl localhost:8080/api/health200 OK

Resolution:

Terminal window
# Restart service
systemctl restart license-monitor
# Check if binding to correct interface
grep bind_address /etc/license-monitor/config.toml
# Should be 0.0.0.0 if accessed remotely (with firewall protection)

Symptoms: /api/licenses returns errors or empty data.

  1. Test command manually

    Terminal window
    # Run the same command License Monitor uses
    lmstat -a -c 27000@license-server
  2. Check license server connectivity

    Terminal window
    telnet license-server 27000
  3. Verify parse script

    Terminal window
    # Test parse script with sample output
    echo "sample output" | python3 /etc/license-monitor/servers/parse.py
  4. Check error logs

    Terminal window
    grep "LICENSE_QUERY" /var/log/license-monitor/license_monitor.log

Symptoms: WebSocket connections disconnect unexpectedly.

Common causes and solutions:

CauseSolution
Proxy timeoutIncrease proxy timeout to 86400s
Idle timeoutImplement ping/pong keep-alive
Rate limitingIncrease rate limits
Memory pressureIncrease memory limits
# nginx WebSocket proxy fix
location /ws/ {
proxy_pass http://license_monitor;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400; # 24 hours
}

Symptoms: Cannot sign in, redirect loops, or session issues.

  1. Verify Okta configuration

    Terminal window
    # Check environment variables
    echo $AUTH_OKTA_ID
    echo $AUTH_OKTA_ISSUER
    # Never echo AUTH_OKTA_SECRET
  2. Check redirect URIs in Okta

    • Sign-in: https://your-domain/api/auth/callback/okta
    • Sign-out: https://your-domain
  3. Verify NEXTAUTH_URL

    Terminal window
    echo $NEXTAUTH_URL
    # Must match your public domain
  4. Check browser console for errors

    • Look for CORS errors
    • Check for blocked cookies

Common Okta errors:

ErrorCauseSolution
invalid_clientWrong client ID/secretVerify credentials
redirect_uri_mismatchURI not configuredAdd URI in Okta
access_deniedUser not assignedAssign user to app

Symptoms: Blank page, JavaScript errors, or loading spinner.

  1. Check browser console

    • Press F12 → Console tab
    • Look for JavaScript errors
  2. Verify API connectivity

    Terminal window
    curl http://localhost:3000/api/health
  3. Check Convex connection

    • Verify CONVEX_URL environment variable
    • Check Convex dashboard for errors
  4. Clear browser cache

    • Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)

Symptoms: Dashboard doesn’t update, stale data displayed.

ComponentCheckSolution
WebSocketBrowser DevTools → Network → WSReconnect
SSENetwork tab → EventStreamClear cache
ConvexConvex dashboard → LogsCheck subscription
API/api/health responseRestart service
// Check WebSocket connection in browser console
const ws = new WebSocket('ws://localhost:8080/ws/logs?api_key=KEY');
ws.onopen = () => console.log('Connected');
ws.onerror = (e) => console.log('Error', e);

Symptoms: Dashboard shows “Connection failed” errors.

  1. Verify License Monitor is running

    Terminal window
    curl http://license-monitor-host:8080/api/health
  2. Check network connectivity

    Terminal window
    ping license-monitor-host
    telnet license-monitor-host 8080
  3. Verify firewall rules

    Terminal window
    # On License Monitor host
    iptables -L -n | grep 8080
  4. Check CORS configuration

    # License Monitor config.toml
    [api]
    cors_enabled = true
    cors_origins = ["https://dashboard.example.com"]

Symptoms: Certificate errors, HTTPS connection failures.

ErrorCauseSolution
CERT_NOT_TRUSTEDSelf-signed certAdd to trust store
CERT_EXPIREDExpired certificateRenew certificate
HOSTNAME_MISMATCHWrong domainUse correct domain
PROTOCOL_ERRORTLS version mismatchUpdate TLS config
Terminal window
# Test SSL certificate
openssl s_client -connect api.example.com:443 -servername api.example.com
# Check certificate expiry
echo | openssl s_client -connect api.example.com:443 2>/dev/null | \
openssl x509 -noout -dates

Symptoms: Service using excessive CPU.

Possible causes:

  • Too frequent polling interval
  • Complex regex patterns
  • High log volume

Solutions:

# Increase polling interval
[command_mode]
interval_seconds = 600 # 10 minutes instead of 5
# Simplify regex if using tail mode
[tail_mode]
regex_pattern = "^\\d{4}" # Simpler pattern

Symptoms: Memory consumption grows over time.

Terminal window
# Check memory usage
ps aux | grep license_monitor
# If memory is high, check for:
# - Large log buffers
# - Too many WebSocket connections
# - Memory leaks (report as bug)

Solutions:

  • Reduce log buffer size
  • Limit concurrent connections
  • Restart service periodically