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
Plugin Exits at Startup
Section titled “Plugin Exits at Startup”Problem: A plugin stops before it starts serving, usually because its
configuration is missing or invalid. FinFocus reports the exit status and the
last lines the plugin wrote to stderr, for example in the Notes column of
finfocus plugin list:
Failed: plugin exited before binding to port (exit status 1): config: config: baseUrl must be an http(s) URL with a hostSolutions:
- Fix the setting the message names, then run
finfocus plugin listagain. - The excerpt is short and comes only from the plugin’s structured (JSON)
log lines. A plugin that writes plain text instead gets
its stderr is not a structured log, see the FinFocus log file. For the full plugin output, read the FinFocus log file or run the command with--debug.
FinFocus does not retry a plugin that exits on its own, unless the plugin
reports that its port was already in use. The --port and pluginsdk upgrade
hint in the log applies only to a plugin that keeps running without binding
its port.
Plugin Is Slow to Start
Section titled “Plugin Is Slow to Start”Problem: A large plugin, such as aws-public with its embedded pricing
data, can take several seconds to load the first time it runs after install
or reboot. When it does not open its port in time, FinFocus reports how long
it waited:
Failed: plugin failed to bind to port within 20s: timeout waiting for plugin to bind: context deadline exceededSolutions:
- Run the command again. Later starts read the binary from the disk cache and are much faster.
finfocus plugin listand the dashboard’s plugin checks wait 20 seconds for a plugin to start and answer. Cost commands wait up to 65 seconds for the plugin to open its port (125 seconds whenCI=true). These limits are fixed.- A plugin that never opens its port within those limits is stuck, not slow.
Run the command with
--debugand read the FinFocus log file.
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.
Region Not Resolved
Section titled “Region Not Resolved”Problem: A resource shows $0.00 with a note or .finfocus.errors entry
such as plugin call failed: InvalidArgument: region is required for GetProjectedCost. This means no region could be resolved for the resource, so
the pricing plugin rejected the request.
Solution: Provide a region through one of the supported sources, in the order core checks them:
-
A
regioninput on the resource. -
An
availabilityZoneinput on the resource (e.g.us-west-2a). -
An ARN property on the resource (the region segment is parsed from it).
-
The region of the resource’s AWS provider: the
regioninput of itspulumi:providers:awsresource, or that resource’sregionoutput when it has noregioninput. A secret or unknownregioninput gives no provider region. Core finds the provider through the resource’s provider reference in the stack state or the preview. The price after a change uses the provider the preview assigns; the price before it, actual costs, and a delete use the deployed provider. A--pulumi-jsonrun inside a Pulumi project also reads the stack state. Without state, the provider is seen only when the preview creates or updates it. -
The
AWS_REGIONorAWS_DEFAULT_REGIONenvironment variable:Terminal window AWS_REGION=us-west-2 finfocus cost projected --pulumi-json plan.json
Core reads a region from the provider resource, not from stack configuration
(aws:region) directly. Stack configuration reaches the provider resource’s
region input, so a stack with a region configured resolves through step 4
once its state or preview includes the provider.
A regionless S3 bucket is expected to price at $0.00 without an error: the
plugin accepts it, and bucket contents cannot be measured from a plan.
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