License Compliance Checker - Troubleshooting Guide¶
Table of Contents¶
- Installation Issues
- Scanning Issues
- License Resolution Issues
- Policy Issues
- API and Server Issues
- Dashboard Issues
- Docker Issues
- Performance Issues
- Database Issues
- Getting Help
Installation Issues¶
pip install fails with "No matching distribution found"¶
Symptoms:
Causes & Solutions:
-
Wrong package name: The package is
license-compliance-checker, notlcc -
Python version too old: LCC requires Python 3.9+
-
pip is outdated: Upgrade pip
ModuleNotFoundError after installation¶
Symptoms:
Causes & Solutions:
-
Multiple Python environments: Installed in wrong environment
-
Editable install issue: Reinstall
"Command 'lcc' not found"¶
Symptoms:
Causes & Solutions:
-
PATH not configured: Add pip bin directory to PATH
-
Use as module: Run as Python module instead
Scanning Issues¶
"No detectors found components"¶
Symptoms:
Causes & Solutions:
-
Wrong directory: Not in project root
-
Unsupported language: LCC supports Python, JavaScript, Go, Rust, Java, Ruby, .NET
-
Manifest file in subdirectory: Use recursive option
Scan is very slow¶
Symptoms: - Scan takes > 5 minutes - High CPU or memory usage
Causes & Solutions:
-
Large project with many files: Exclude unnecessary directories
-
GitHub API rate limiting: Use GitHub token
-
Network issues: Use cache
-
Too many resolvers: Disable unused resolvers
"Permission denied" when scanning¶
Symptoms:
Causes & Solutions:
-
Insufficient file permissions: Run with appropriate permissions
-
SELinux blocking access: Temporarily disable or configure
License Resolution Issues¶
Many "UNKNOWN" licenses¶
Symptoms: - Report shows many components with "UNKNOWN" license - Policy violations due to unknown licenses
Causes & Solutions:
-
Package not in registries: Add custom metadata
-
Network issues: Check connectivity
-
GitHub rate limiting: Set GitHub token
-
Custom packages: Use local resolution
Incorrect license detected¶
Symptoms: - License doesn't match upstream source - Dual-license not properly detected
Causes & Solutions:
-
Registry metadata is wrong: Use override
-
SPDX expression parsing issue: Simplify or override
-
Custom/proprietary license: Add to policy
AI/ML model license not detected¶
Symptoms: - Hugging Face models show "UNKNOWN" - Dataset licenses not recognized
Causes & Solutions:
-
Missing model card: Add metadata
-
Custom AI license: Add to policy
-
Hugging Face API issues: Check connectivity
Policy Issues¶
Policy file not found¶
Symptoms:
Causes & Solutions:
-
Wrong policy directory: Check policy location
-
Wrong file extension: Use
.yamlor.yml -
File permissions: Check read permissions
Policy validation fails¶
Symptoms:
Causes & Solutions:
-
YAML syntax error: Check YAML formatting
-
Missing required fields: Add required fields
-
Invalid license identifier: Check SPDX identifiers
Unexpected policy results¶
Symptoms: - Allowed licenses are flagged - Denied licenses pass
Causes & Solutions:
-
Wrong context: Specify correct context
-
Wildcard not matching: Check pattern
-
Dual-license preference: Check preference setting
API and Server Issues¶
"Connection refused" when accessing API¶
Symptoms:
Causes & Solutions:
-
Server not running: Start server
-
Wrong port: Check configured port
-
Firewall blocking: Check firewall
Authentication fails¶
Symptoms:
Causes & Solutions:
-
No user exists: Create user first
-
Wrong credentials: Verify username/password
-
Token expired: Get new token
-
Wrong Authorization header: Check header format
Rate limit exceeded¶
Symptoms:
Causes & Solutions:
-
Too many requests: Wait and retry
-
Increase rate limit: Configure in code (self-hosted only)
-
Use caching: Cache responses client-side
Dashboard Issues¶
Dashboard shows "Failed to fetch"¶
Symptoms: - Dashboard loads but shows errors - API requests fail
Causes & Solutions:
-
API not running: Start API server
-
Wrong API URL: Check environment variables
-
CORS issue: Configure CORS
Dashboard won't start¶
Symptoms:
Causes & Solutions:
-
Dependencies not installed: Install dependencies
-
Port already in use: Change port or kill process
-
Node version incompatible: Use Node 18+
Can't login to dashboard¶
Symptoms: - Login form doesn't work - "Invalid credentials" error
Causes & Solutions:
-
No user exists: Create user via CLI
-
API not accessible: Check API connectivity
-
Browser cache: Clear cache and cookies
Docker Issues¶
"docker-compose: command not found"¶
Symptoms:
Causes & Solutions:
- Docker Compose not installed: Install Docker Compose
"port is already allocated"¶
Symptoms:
ERROR: for api Cannot start service api: driver failed programming external connectivity:
Bind for 0.0.0.0:8000 failed: port is already allocated
Causes & Solutions:
-
Port in use: Change port or stop conflicting service
-
Previous container still running: Stop old containers
"Cannot connect to Docker daemon"¶
Symptoms:
Causes & Solutions:
-
Docker not running: Start Docker
-
Permission denied: Add user to docker group
Container exits immediately¶
Symptoms:
Causes & Solutions:
-
Check logs: View container logs
-
Database migration issue: Reset database
-
Configuration error: Check environment variables
Performance Issues¶
Slow scan on large projects¶
Solutions:
-
Exclude large directories:
-
Increase cache TTL:
-
Use faster resolvers only:
-
Disable unnecessary detectors:
High memory usage¶
Solutions:
-
Scan smaller subsets:
-
Limit concurrent operations:
-
Use Docker with memory limits:
Database Issues¶
Database locked error¶
Symptoms:
Causes & Solutions:
-
Multiple instances: Stop other LCC processes
-
Database corruption: Recreate database
Can't access database¶
Symptoms:
Causes & Solutions:
-
Permission denied: Fix permissions
-
Disk full: Free up space
Getting Help¶
Diagnostic Information¶
When asking for help, provide:
# System information
lcc --version
python --version
pip list | grep license
# Configuration
lcc config show
# Last scan logs
lcc scan . --verbose
# API logs
docker-compose logs api --tail 100
# Dashboard logs
docker-compose logs dashboard --tail 100
Verbose Logging¶
Enable detailed logging:
# CLI
lcc scan . --verbose
# Set log level via environment
export LCC_LOG_LEVEL=DEBUG
lcc scan .
# API server
lcc server --log-level DEBUG
Common Log Locations¶
# CLI logs
~/.lcc/logs/lcc.log
# Docker logs
docker-compose logs -f api
docker-compose logs -f dashboard
# System logs (Linux)
journalctl -u lcc
# System logs (macOS)
tail -f /var/log/system.log | grep lcc
Support Channels¶
- Documentation: https://docs.lcc.dev
- GitHub Issues: https://github.com/your-org/lcc/issues
- GitHub Discussions: https://github.com/your-org/lcc/discussions
- Email: support@lcc.dev
Before Filing an Issue¶
- Check existing issues: https://github.com/your-org/lcc/issues
- Search documentation
- Try the latest version
- Collect diagnostic information
- Create minimal reproducible example
Issue Template¶
**Environment**:
- LCC version: [run `lcc --version`]
- Python version: [run `python --version`]
- OS: [e.g., Ubuntu 22.04, macOS 13.5]
- Installation method: [pip, Docker, source]
**Description**:
[Clear description of the issue]
**Steps to Reproduce**:
1.
2.
3.
**Expected behavior**:
[What you expected to happen]
**Actual behavior**:
[What actually happened]
**Logs**:
Quick Reference¶
Health Checks¶
# Check if LCC is working
lcc --version
# Check if API is running
curl http://localhost:8000/health
# Check if Dashboard is running
curl http://localhost:3000
# Check database
sqlite3 ~/.lcc/lcc.db "SELECT COUNT(*) FROM scans;"
Reset Everything¶
# WARNING: This deletes all data
# Stop services
docker-compose down -v
# Remove database and cache
rm -rf ~/.lcc/
# Restart
docker-compose up -d
# Recreate admin user
lcc auth create-user admin password123 --role admin
Performance Tuning¶
# config.yaml - Fast configuration
cache:
enabled: true
ttl: 604800 # 7 days
resolvers:
- registry # Fastest
- clearlydefined
detection:
max_depth: 5
timeout: 60
max_concurrent_resolvers: 5
For additional help, see FAQ.md or contact support@lcc.dev