Troubleshooting Guide
Common issues, solutions, and debugging techniques for FinFocus Core.
Table of Contents
Section titled “Table of Contents”- Installation Issues
- Pulumi Integration
- Plugin Problems
- Cost Calculation Issues
- Performance Problems
- Configuration Issues
- Network and Authentication
- Debug Mode
- Getting Help
Installation Issues
Section titled “Installation Issues”Binary Not Found
Section titled “Binary Not Found”Problem: Command finfocus not found after installation.
$ finfocus --helpbash: finfocus: command not foundSolutions:
-
Check if binary is in PATH:
Terminal window which finfocusecho $PATH -
Add to PATH temporarily:
Terminal window export PATH=$PATH:/usr/local/bin -
Add to PATH permanently:
Terminal window # For bashecho 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrcsource ~/.bashrc# For zshecho 'export PATH=$PATH:/usr/local/bin' >> ~/.zshrcsource ~/.zshrc -
Use full path:
Terminal window /usr/local/bin/finfocus --help
Permission Denied
Section titled “Permission Denied”Problem: Permission denied when running binary.
$ finfocus --helpbash: ./finfocus: Permission deniedSolutions:
-
Make binary executable:
Terminal window chmod +x /usr/local/bin/finfocus -
Check file permissions:
Terminal window ls -la /usr/local/bin/finfocus# Should show: -rwxr-xr-x (executable permissions) -
For downloaded files:
Terminal window chmod +x ./finfocussudo mv ./finfocus /usr/local/bin/
macOS Security Warning
Section titled “macOS Security Warning”Problem: macOS blocks unsigned binary.
"finfocus" cannot be opened because the developer cannot be verified.Solutions:
-
Allow via System Preferences:
- Go to System Preferences > Security & Privacy
- Click “Allow Anyway” for finfocus
-
Command line bypass:
Terminal window sudo spctl --add /usr/local/bin/finfocussudo xattr -dr com.apple.quarantine /usr/local/bin/finfocus -
Temporary bypass:
Terminal window xattr -dr com.apple.quarantine ./finfocus./finfocus --help
Version Compatibility
Section titled “Version Compatibility”Problem: Binary doesn’t work on your system architecture.
Solutions:
-
Check system architecture:
Terminal window uname -m# x86_64 = amd64, aarch64 = arm64 -
Download correct binary:
Terminal window # For Intel Macscurl -L https://github.com/rshade/finfocus/releases/latest/download/finfocus-darwin-amd64 -o finfocus# For Apple Silicon Macscurl -L https://github.com/rshade/finfocus/releases/latest/download/finfocus-darwin-arm64 -o finfocus
Pulumi Integration
Section titled “Pulumi Integration”Pulumi Plan JSON Issues
Section titled “Pulumi Plan JSON Issues”Problem: pulumi preview --json fails or produces invalid JSON.
Diagnosis:
# Test Pulumi JSON outputpulumi preview --json > plan.jsoncat plan.json | jq '.' # Should parse without errorsSolutions:
-
Fix malformed JSON:
Terminal window # Check JSON validitypython -m json.tool plan.json# orjq '.' plan.json -
Pulumi authentication issues:
Terminal window pulumi loginpulumi stack select your-stack-name -
Resource provider issues:
Terminal window # Update providerspulumi plugin install# List available providerspulumi plugin ls -
Use stack export as alternative:
Terminal window # If preview fails, try current statepulumi stack export > current-state.jsonfinfocus cost projected --pulumi-json current-state.json
Empty Pulumi Plan
Section titled “Empty Pulumi Plan”Problem: Pulumi plan contains no resources.
$ finfocus cost projected --pulumi-json plan.jsonNo resources found in Pulumi planSolutions:
-
Check plan contents:
Terminal window jq '.steps | length' plan.jsonjq '.steps[0]' plan.json -
Verify Pulumi stack:
Terminal window pulumi stack lspulumi stack select correct-stackpulumi preview -
Check for pending changes:
Terminal window pulumi up --diff
Resource Type Recognition
Section titled “Resource Type Recognition”Problem: Resources not recognized by FinFocus.
Resource type 'custom:provider/resource:Type' not supportedSolutions:
-
Check supported resource types:
Terminal window # Common supported patterns:# aws:ec2/instance:Instance# aws:s3/bucket:Bucket# aws:rds/instance:Instance -
Plugin Compatibility: Some plugins may require specific resource type formats (e.g.,
aws:ec2:Instancevsaws:ec2/instance:Instance).- Check plugin documentation for supported types.
- Ensure your Pulumi provider versions are compatible with the plugin.
-
Use resource filtering:
Terminal window # Filter to supported resources onlyfinfocus cost projected --pulumi-json plan.json --filter "type=aws:ec2" -
Create custom pricing spec:
Terminal window mkdir -p ~/.finfocus/specs# Create YAML spec for custom resource type
Plugin Problems
Section titled “Plugin Problems”Plugin Not Found
Section titled “Plugin Not Found”Problem: Plugins not discovered or loaded.
$ finfocus plugin listNo plugins foundSolutions:
-
Check plugin directory structure:
Terminal window ls -la ~/.finfocus/plugins/ls -la ~/.finfocus/plugins/*/*/ -
Verify directory structure:
~/.finfocus/plugins/└── kubecost/└── 1.0.0/└── finfocus-kubecost -
Make plugin executable:
Terminal window chmod +x ~/.finfocus/plugins/*/*/finfocus-* -
Check plugin names:
Terminal window # Plugin binary must start with 'finfocus-'ls ~/.finfocus/plugins/*/*/finfocus-*
Plugin Validation Failures
Section titled “Plugin Validation Failures”Problem: Plugin validation fails.
$ finfocus plugin validatekubecost: FAILED - connection timeoutSolutions:
-
Test plugin directly:
Terminal window ~/.finfocus/plugins/kubecost/1.0.0/finfocus-kubecost# Should start and show port information -
Check plugin logs:
Terminal window PLUGIN_DEBUG=1 finfocus plugin validate --adapter kubecost -
Network connectivity:
Terminal window # Test external API connectivitycurl -v http://kubecost.example.com:9090/api/v1/costDataModel -
Authentication setup:
Terminal window # Verify required environment variablesenv | grep -E "(KUBECOST|AWS|AZURE|GCP)"
Plugin Communication Errors
Section titled “Plugin Communication Errors”Problem: gRPC communication failures between core and plugins.
Error: failed to connect to plugin: context deadline exceededSolutions:
-
Increase timeout:
Terminal window export PLUGIN_TIMEOUT=60sfinfocus cost actual --adapter kubecost --from 2025-01-01 -
Check port conflicts:
Terminal window # List processes using common gRPC portslsof -i :50051netstat -tulpn | grep :50051 -
Firewall issues:
Terminal window # Temporarily disable firewall for testingsudo ufw disable # Ubuntusudo systemctl stop firewalld # CentOS/RHEL -
Plugin process issues:
Terminal window # Kill any stuck plugin processespkill finfocus-kubecostps aux | grep finfocus
Cost Calculation Issues
Section titled “Cost Calculation Issues”No Cost Data Available
Section titled “No Cost Data Available”Problem: All resources show “$0.00” or “No pricing information available”.
aws:ec2/instance:Instance none $0.00 USD No pricing information availableSolutions:
-
Install pricing plugins:
Terminal window # Install appropriate cost plugins# See Plugin System documentation -
Create local pricing specs:
Terminal window mkdir -p ~/.finfocus/specscat > ~/.finfocus/specs/aws-ec2-t3-micro.yaml << 'EOF'provider: awsservice: ec2sku: t3.microcurrency: USDpricing:onDemandHourly: 0.0104monthlyEstimate: 7.59EOF -
Use specific adapter:
Terminal window finfocus cost projected --pulumi-json plan.json --adapter aws-plugin -
Check resource properties:
Terminal window # Verify resource has necessary propertiesjq '.steps[0].inputs' plan.json
Missing Cost Data (Empty Inputs)
Section titled “Missing Cost Data (Empty Inputs)”Problem: Logs show “resource descriptor missing required fields (sku, region)” or plugins return “not supported” because properties are missing.
Diagnosis: This often happens when pulumi preview --json structure changes
(e.g., nesting inputs under newState).
Solution: Ensure you are using a compatible version of finfocus that
handles the JSON structure of your Pulumi CLI version.
- Update
finfocusto the latest version. - Check
pulumi versionand ensure compatibility.
Inaccurate Cost Estimates
Section titled “Inaccurate Cost Estimates”Problem: Cost estimates seem too high or too low.
Diagnosis:
-
Compare with manual calculations:
Terminal window # For t3.micro: $0.0104/hour × 730 hours = $7.59/month -
Check pricing spec accuracy:
Terminal window cat ~/.finfocus/specs/aws-ec2-t3-micro.yaml -
Verify resource configuration:
Terminal window jq '.steps[] | select(.type == "aws:ec2/instance:Instance") | .inputs' plan.json
Solutions:
-
Update pricing specifications:
Terminal window # Get latest AWS pricing# Update local specs accordingly -
Use region-specific pricing:
Terminal window # Different regions have different costs# Ensure specs match your deployment region -
Account for reserved instances:
Terminal window # Pricing specs should reflect your actual pricing model# (on-demand vs reserved vs spot)
Historical Cost Data Issues
Section titled “Historical Cost Data Issues”Problem: Actual cost queries return no data or errors.
$ finfocus cost actual --pulumi-json plan.json --from 2025-01-01Error: no cost data available for time rangeSolutions:
-
Check date range:
Terminal window # Ensure date range is valid and not too recentfinfocus cost actual --pulumi-json plan.json --from 2025-01-07 --to 2025-01-14 -
Billing data lag:
Terminal window # Most billing APIs have 24-48 hour delays# Try querying older date rangesfinfocus cost actual --pulumi-json plan.json --from 2025-01-01 --to 2025-01-02 -
Resource matching:
Terminal window # Resources might not exist in the historical time range# Check when resources were actually deployed -
Plugin configuration:
Terminal window # Verify plugin can access billing APIsexport KUBECOST_API_URL="http://kubecost.example.com:9090"finfocus plugin validate --adapter kubecost
Performance Problems
Section titled “Performance Problems”Slow Cost Calculations
Section titled “Slow Cost Calculations”Problem: Cost calculations take too long to complete.
Solutions:
-
Use specific adapter:
Terminal window # Avoid querying all pluginsfinfocus cost projected --pulumi-json plan.json --adapter kubecost -
Filter resources:
Terminal window # Process fewer resourcesfinfocus cost projected --pulumi-json plan.json --filter "type=aws:ec2" -
Increase timeout:
Terminal window export PLUGIN_TIMEOUT=300sfinfocus cost actual --pulumi-json plan.json --from 2025-01-01 -
Parallel processing:
Terminal window # Split large plans into smaller chunksjq '.steps[:10]' plan.json > plan-chunk1.jsonjq '.steps[10:20]' plan.json > plan-chunk2.json
Memory Usage
Section titled “Memory Usage”Problem: High memory usage with large Pulumi plans.
Solutions:
-
Process in batches:
Terminal window # Split large plansjq '.steps | .[0:100]' large-plan.json > batch1.jsonjq '.steps | .[100:200]' large-plan.json > batch2.json -
Use NDJSON output:
Terminal window # More memory-efficient for large datasetsfinfocus cost projected --pulumi-json plan.json --output ndjson -
Filter early:
Terminal window # Reduce processing loadfinfocus cost projected --pulumi-json plan.json --filter "provider=aws"
Network Timeouts
Section titled “Network Timeouts”Problem: Requests to external APIs timeout.
Solutions:
-
Check network connectivity:
Terminal window curl -v https://api.aws.com/ping kubecost.example.com -
Increase timeouts:
Terminal window export HTTP_TIMEOUT=60sexport PLUGIN_TIMEOUT=300s -
Configure proxy:
Terminal window export HTTP_PROXY=http://proxy.company.com:8080export HTTPS_PROXY=http://proxy.company.com:8080 -
Retry configuration:
Terminal window export MAX_RETRIES=5export RETRY_DELAY=5s
Configuration Issues
Section titled “Configuration Issues”Directory Permissions
Section titled “Directory Permissions”Problem: Cannot create or access configuration directories.
Solutions:
-
Create directories manually:
Terminal window mkdir -p ~/.finfocus/pluginsmkdir -p ~/.finfocus/specschmod 755 ~/.finfocus/ -
Fix ownership:
Terminal window chown -R $USER:$USER ~/.finfocus/ -
Check disk space:
Terminal window df -h ~
Environment Variables
Section titled “Environment Variables”Problem: Environment variables not being recognized.
Solutions:
-
Check variable names:
Terminal window env | grep FINFOCUSenv | grep -E "(AWS|KUBECOST|AZURE)" -
Export variables properly:
Terminal window export KUBECOST_API_URL="http://kubecost.example.com:9090"export AWS_REGION="us-west-2" -
Persistent environment setup:
Terminal window # Add to shell profileecho 'export KUBECOST_API_URL="http://kubecost.example.com:9090"' >> ~/.bashrcsource ~/.bashrc
Configuration Files
Section titled “Configuration Files”Problem: Configuration files not being loaded.
Solutions:
-
Check file locations:
Terminal window ls -la ~/.finfocus/ls -la ~/.finfocus/plugins/*/*/config.* -
Validate YAML syntax:
Terminal window python -c "import yaml; yaml.safe_load(open('config.yaml'))"# oryq eval '.' config.yaml -
Check file permissions:
Terminal window ls -la ~/.finfocus/specs/*.yamlchmod 644 ~/.finfocus/specs/*.yaml
Network and Authentication
Section titled “Network and Authentication”API Authentication Failures
Section titled “API Authentication Failures”Problem: Plugin cannot authenticate with external APIs.
Error: authentication failed: invalid API keySolutions:
-
Verify credentials:
Terminal window # Test API credentials manuallycurl -H "Authorization: Bearer $API_TOKEN" https://api.provider.com/test -
Check credential format:
Terminal window # Ensure no extra whitespace or newlinesecho -n "$API_KEY" | hexdump -C -
Rotate credentials: Generate new API keys if current ones are invalid.
-
Check credential permissions: Ensure API key has required permissions for cost data access.
SSL Certificate Issues
Section titled “SSL Certificate Issues”Problem: SSL certificate verification failures.
Error: x509: certificate signed by unknown authoritySolutions:
-
Update CA certificates:
Terminal window # Ubuntu/Debiansudo apt-get update && sudo apt-get install ca-certificates# CentOS/RHELsudo yum update ca-certificates -
Disable SSL verification (temporary):
Terminal window export INSECURE_SKIP_VERIFY=true -
Add custom CA certificate:
Terminal window # Add your organization's CA certificatesudo cp custom-ca.crt /usr/local/share/ca-certificates/sudo update-ca-certificates
Proxy Configuration
Section titled “Proxy Configuration”Problem: Network requests fail behind corporate proxy.
Solutions:
-
Configure HTTP proxy:
Terminal window export HTTP_PROXY=http://proxy.company.com:8080export HTTPS_PROXY=http://proxy.company.com:8080export NO_PROXY=localhost,127.0.0.1,.internal.domain -
Authenticated proxy:
Terminal window export HTTP_PROXY=http://username:password@proxy.company.com:8080 -
Plugin-specific proxy:
Terminal window # Some plugins might need specific proxy configurationexport KUBECOST_PROXY_URL=http://proxy.company.com:8080
Debug Mode
Section titled “Debug Mode”Enable Debug Logging
Section titled “Enable Debug Logging”# Global debug modefinfocus --debug cost projected --pulumi-json plan.json
# Plugin-specific debuggingexport PLUGIN_DEBUG=1export PLUGIN_LOG_LEVEL=debugfinfocus cost actual --adapter kubecost --from 2025-01-01Verbose Output
Section titled “Verbose Output”# Increase verbosityfinfocus -v cost projected --pulumi-json plan.json
# Maximum verbosityfinfocus -vv cost actual --adapter kubecost --from 2025-01-01Log Analysis
Section titled “Log Analysis”# Save logs to filefinfocus --debug cost projected --pulumi-json plan.json > debug.log 2>&1
# Search for specific errorsgrep -i "error\|failed\|timeout" debug.log
# Check plugin communicationgrep -i "grpc\|plugin\|connect" debug.logPlugin Debugging
Section titled “Plugin Debugging”# Test plugin directly~/.finfocus/plugins/kubecost/1.0.0/finfocus-kubecost &PLUGIN_PID=$!
# Test gRPC connectiongrpcurl -plaintext localhost:50051 finfocus.v1.CostSourceService/Name
# Clean upkill $PLUGIN_PIDCommon Error Messages
Section titled “Common Error Messages””No such file or directory”
Section titled “”No such file or directory””Error: exec: "finfocus-kubecost": executable file not found in $PATHSolution: Plugin binary missing or not executable.
ls -la ~/.finfocus/plugins/kubecost/1.0.0/chmod +x ~/.finfocus/plugins/kubecost/1.0.0/finfocus-kubecost”Connection refused”
Section titled “”Connection refused””Error: connection refused: dial tcp 127.0.0.1:50051: connect: connection refusedSolution: Plugin process not running or wrong port.
# Restart plugin validationfinfocus plugin validate# Check for port conflictslsof -i :50051”Context deadline exceeded”
Section titled “”Context deadline exceeded””Error: context deadline exceededSolution: Increase timeout or check network connectivity.
export PLUGIN_TIMEOUT=60s# Check network connectivity to external APIs”Invalid JSON”
Section titled “”Invalid JSON””Error: invalid character 'N' looking for beginning of valueSolution: Pulumi plan JSON is malformed.
# Re-generate planpulumi preview --json > plan.json# Validate JSONjq '.' plan.jsonGetting Help
Section titled “Getting Help”Community Support
Section titled “Community Support”- GitHub Issues: https://github.com/rshade/finfocus/issues
- Discussions: https://github.com/rshade/finfocus/discussions
- Documentation: Check all docs in this repository
Bug Reports
Section titled “Bug Reports”When reporting bugs, include:
-
Version information:
Terminal window finfocus --version -
System information:
Terminal window uname -ago version # if building from source -
Debug logs:
Terminal window finfocus --debug [command] > debug.log 2>&1 -
Configuration details:
Terminal window ls -la ~/.finfocus/env | grep -E "(PULUMI|AWS|KUBECOST)" -
Minimal reproduction:
- Steps to reproduce the issue
- Expected vs actual behavior
- Sample Pulumi plan (sanitized)
Feature Requests
Section titled “Feature Requests”- Check existing issues/discussions first
- Describe the use case clearly
- Provide examples of desired behavior
- Consider contributing implementation
Self-Help Checklist
Section titled “Self-Help Checklist”Before seeking help:
- Check this troubleshooting guide
- Try with
--debugflag - Verify installation with
finfocus --version - Test with provided examples
- Check plugin status with
finfocus plugin validate - Review environment variables and configuration
- Test network connectivity to external APIs
- Search existing GitHub issues
Professional Support
Section titled “Professional Support”For enterprise support or custom plugin development:
- Contact the maintainers through GitHub
- Consider sponsoring the project
- Explore commercial support options
Related Documentation
Section titled “Related Documentation”- Installation Guide - Setup and installation help
- User Guide - Usage instructions and examples
- Plugin System - Plugin development and management
- Cost Calculations - Understanding cost methodologies