Skip to content

Troubleshooting Guide

Common issues, solutions, and debugging techniques for FinFocus Core.

Problem: Command finfocus not found after installation.

Terminal window
$ finfocus --help
bash: finfocus: command not found

Solutions:

  1. Check if binary is in PATH:

    Terminal window
    which finfocus
    echo $PATH
  2. Add to PATH temporarily:

    Terminal window
    export PATH=$PATH:/usr/local/bin
  3. Add to PATH permanently:

    Terminal window
    # For bash
    echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc
    source ~/.bashrc
    # For zsh
    echo 'export PATH=$PATH:/usr/local/bin' >> ~/.zshrc
    source ~/.zshrc
  4. Use full path:

    Terminal window
    /usr/local/bin/finfocus --help

Problem: Permission denied when running binary.

Terminal window
$ finfocus --help
bash: ./finfocus: Permission denied

Solutions:

  1. Make binary executable:

    Terminal window
    chmod +x /usr/local/bin/finfocus
  2. Check file permissions:

    Terminal window
    ls -la /usr/local/bin/finfocus
    # Should show: -rwxr-xr-x (executable permissions)
  3. For downloaded files:

    Terminal window
    chmod +x ./finfocus
    sudo mv ./finfocus /usr/local/bin/

Problem: macOS blocks unsigned binary.

"finfocus" cannot be opened because the developer cannot be verified.

Solutions:

  1. Allow via System Preferences:

    • Go to System Preferences > Security & Privacy
    • Click “Allow Anyway” for finfocus
  2. Command line bypass:

    Terminal window
    sudo spctl --add /usr/local/bin/finfocus
    sudo xattr -dr com.apple.quarantine /usr/local/bin/finfocus
  3. Temporary bypass:

    Terminal window
    xattr -dr com.apple.quarantine ./finfocus
    ./finfocus --help

Problem: Binary doesn’t work on your system architecture.

Solutions:

  1. Check system architecture:

    Terminal window
    uname -m
    # x86_64 = amd64, aarch64 = arm64
  2. Download correct binary:

    Terminal window
    # For Intel Macs
    curl -L https://github.com/rshade/finfocus/releases/latest/download/finfocus-darwin-amd64 -o finfocus
    # For Apple Silicon Macs
    curl -L https://github.com/rshade/finfocus/releases/latest/download/finfocus-darwin-arm64 -o finfocus

Problem: pulumi preview --json fails or produces invalid JSON.

Diagnosis:

Terminal window
# Test Pulumi JSON output
pulumi preview --json > plan.json
cat plan.json | jq '.' # Should parse without errors

Solutions:

  1. Fix malformed JSON:

    Terminal window
    # Check JSON validity
    python -m json.tool plan.json
    # or
    jq '.' plan.json
  2. Pulumi authentication issues:

    Terminal window
    pulumi login
    pulumi stack select your-stack-name
  3. Resource provider issues:

    Terminal window
    # Update providers
    pulumi plugin install
    # List available providers
    pulumi plugin ls
  4. Use stack export as alternative:

    Terminal window
    # If preview fails, try current state
    pulumi stack export > current-state.json
    finfocus cost projected --pulumi-json current-state.json

Problem: Pulumi plan contains no resources.

Terminal window
$ finfocus cost projected --pulumi-json plan.json
No resources found in Pulumi plan

Solutions:

  1. Check plan contents:

    Terminal window
    jq '.steps | length' plan.json
    jq '.steps[0]' plan.json
  2. Verify Pulumi stack:

    Terminal window
    pulumi stack ls
    pulumi stack select correct-stack
    pulumi preview
  3. Check for pending changes:

    Terminal window
    pulumi up --diff

Problem: Resources not recognized by FinFocus.

Resource type 'custom:provider/resource:Type' not supported

Solutions:

  1. Check supported resource types:

    Terminal window
    # Common supported patterns:
    # aws:ec2/instance:Instance
    # aws:s3/bucket:Bucket
    # aws:rds/instance:Instance
  2. Plugin Compatibility: Some plugins may require specific resource type formats (e.g., aws:ec2:Instance vs aws:ec2/instance:Instance).

    • Check plugin documentation for supported types.
    • Ensure your Pulumi provider versions are compatible with the plugin.
  3. Use resource filtering:

    Terminal window
    # Filter to supported resources only
    finfocus cost projected --pulumi-json plan.json --filter "type=aws:ec2"
  4. Create custom pricing spec:

    Terminal window
    mkdir -p ~/.finfocus/specs
    # Create YAML spec for custom resource type

Problem: Plugins not discovered or loaded.

Terminal window
$ finfocus plugin list
No plugins found

Solutions:

  1. Check plugin directory structure:

    Terminal window
    ls -la ~/.finfocus/plugins/
    ls -la ~/.finfocus/plugins/*/*/
  2. Verify directory structure:

    ~/.finfocus/plugins/
    └── kubecost/
    └── 1.0.0/
    └── finfocus-kubecost
  3. Make plugin executable:

    Terminal window
    chmod +x ~/.finfocus/plugins/*/*/finfocus-*
  4. Check plugin names:

    Terminal window
    # Plugin binary must start with 'finfocus-'
    ls ~/.finfocus/plugins/*/*/finfocus-*

Problem: Plugin validation fails.

Terminal window
$ finfocus plugin validate
kubecost: FAILED - connection timeout

Solutions:

  1. Test plugin directly:

    Terminal window
    ~/.finfocus/plugins/kubecost/1.0.0/finfocus-kubecost
    # Should start and show port information
  2. Check plugin logs:

    Terminal window
    PLUGIN_DEBUG=1 finfocus plugin validate --adapter kubecost
  3. Network connectivity:

    Terminal window
    # Test external API connectivity
    curl -v http://kubecost.example.com:9090/api/v1/costDataModel
  4. Authentication setup:

    Terminal window
    # Verify required environment variables
    env | grep -E "(KUBECOST|AWS|AZURE|GCP)"

Problem: gRPC communication failures between core and plugins.

Error: failed to connect to plugin: context deadline exceeded

Solutions:

  1. Increase timeout:

    Terminal window
    export PLUGIN_TIMEOUT=60s
    finfocus cost actual --adapter kubecost --from 2025-01-01
  2. Check port conflicts:

    Terminal window
    # List processes using common gRPC ports
    lsof -i :50051
    netstat -tulpn | grep :50051
  3. Firewall issues:

    Terminal window
    # Temporarily disable firewall for testing
    sudo ufw disable # Ubuntu
    sudo systemctl stop firewalld # CentOS/RHEL
  4. Plugin process issues:

    Terminal window
    # Kill any stuck plugin processes
    pkill finfocus-kubecost
    ps aux | grep finfocus

Problem: All resources show “$0.00” or “No pricing information available”.

aws:ec2/instance:Instance none $0.00 USD No pricing information available

Solutions:

  1. Install pricing plugins:

    Terminal window
    # Install appropriate cost plugins
    # See Plugin System documentation
  2. Create local pricing specs:

    Terminal window
    mkdir -p ~/.finfocus/specs
    cat > ~/.finfocus/specs/aws-ec2-t3-micro.yaml << 'EOF'
    provider: aws
    service: ec2
    sku: t3.micro
    currency: USD
    pricing:
    onDemandHourly: 0.0104
    monthlyEstimate: 7.59
    EOF
  3. Use specific adapter:

    Terminal window
    finfocus cost projected --pulumi-json plan.json --adapter aws-plugin
  4. Check resource properties:

    Terminal window
    # Verify resource has necessary properties
    jq '.steps[0].inputs' plan.json

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 finfocus to the latest version.
  • Check pulumi version and ensure compatibility.

Problem: Cost estimates seem too high or too low.

Diagnosis:

  1. Compare with manual calculations:

    Terminal window
    # For t3.micro: $0.0104/hour × 730 hours = $7.59/month
  2. Check pricing spec accuracy:

    Terminal window
    cat ~/.finfocus/specs/aws-ec2-t3-micro.yaml
  3. Verify resource configuration:

    Terminal window
    jq '.steps[] | select(.type == "aws:ec2/instance:Instance") | .inputs' plan.json

Solutions:

  1. Update pricing specifications:

    Terminal window
    # Get latest AWS pricing
    # Update local specs accordingly
  2. Use region-specific pricing:

    Terminal window
    # Different regions have different costs
    # Ensure specs match your deployment region
  3. Account for reserved instances:

    Terminal window
    # Pricing specs should reflect your actual pricing model
    # (on-demand vs reserved vs spot)

Problem: Actual cost queries return no data or errors.

Terminal window
$ finfocus cost actual --pulumi-json plan.json --from 2025-01-01
Error: no cost data available for time range

Solutions:

  1. Check date range:

    Terminal window
    # Ensure date range is valid and not too recent
    finfocus cost actual --pulumi-json plan.json --from 2025-01-07 --to 2025-01-14
  2. Billing data lag:

    Terminal window
    # Most billing APIs have 24-48 hour delays
    # Try querying older date ranges
    finfocus cost actual --pulumi-json plan.json --from 2025-01-01 --to 2025-01-02
  3. Resource matching:

    Terminal window
    # Resources might not exist in the historical time range
    # Check when resources were actually deployed
  4. Plugin configuration:

    Terminal window
    # Verify plugin can access billing APIs
    export KUBECOST_API_URL="http://kubecost.example.com:9090"
    finfocus plugin validate --adapter kubecost

Problem: Cost calculations take too long to complete.

Solutions:

  1. Use specific adapter:

    Terminal window
    # Avoid querying all plugins
    finfocus cost projected --pulumi-json plan.json --adapter kubecost
  2. Filter resources:

    Terminal window
    # Process fewer resources
    finfocus cost projected --pulumi-json plan.json --filter "type=aws:ec2"
  3. Increase timeout:

    Terminal window
    export PLUGIN_TIMEOUT=300s
    finfocus cost actual --pulumi-json plan.json --from 2025-01-01
  4. Parallel processing:

    Terminal window
    # Split large plans into smaller chunks
    jq '.steps[:10]' plan.json > plan-chunk1.json
    jq '.steps[10:20]' plan.json > plan-chunk2.json

Problem: High memory usage with large Pulumi plans.

Solutions:

  1. Process in batches:

    Terminal window
    # Split large plans
    jq '.steps | .[0:100]' large-plan.json > batch1.json
    jq '.steps | .[100:200]' large-plan.json > batch2.json
  2. Use NDJSON output:

    Terminal window
    # More memory-efficient for large datasets
    finfocus cost projected --pulumi-json plan.json --output ndjson
  3. Filter early:

    Terminal window
    # Reduce processing load
    finfocus cost projected --pulumi-json plan.json --filter "provider=aws"

Problem: Requests to external APIs timeout.

Solutions:

  1. Check network connectivity:

    Terminal window
    curl -v https://api.aws.com/
    ping kubecost.example.com
  2. Increase timeouts:

    Terminal window
    export HTTP_TIMEOUT=60s
    export PLUGIN_TIMEOUT=300s
  3. Configure proxy:

    Terminal window
    export HTTP_PROXY=http://proxy.company.com:8080
    export HTTPS_PROXY=http://proxy.company.com:8080
  4. Retry configuration:

    Terminal window
    export MAX_RETRIES=5
    export RETRY_DELAY=5s

Problem: Cannot create or access configuration directories.

Solutions:

  1. Create directories manually:

    Terminal window
    mkdir -p ~/.finfocus/plugins
    mkdir -p ~/.finfocus/specs
    chmod 755 ~/.finfocus/
  2. Fix ownership:

    Terminal window
    chown -R $USER:$USER ~/.finfocus/
  3. Check disk space:

    Terminal window
    df -h ~

Problem: Environment variables not being recognized.

Solutions:

  1. Check variable names:

    Terminal window
    env | grep FINFOCUS
    env | grep -E "(AWS|KUBECOST|AZURE)"
  2. Export variables properly:

    Terminal window
    export KUBECOST_API_URL="http://kubecost.example.com:9090"
    export AWS_REGION="us-west-2"
  3. Persistent environment setup:

    Terminal window
    # Add to shell profile
    echo 'export KUBECOST_API_URL="http://kubecost.example.com:9090"' >> ~/.bashrc
    source ~/.bashrc

Problem: Configuration files not being loaded.

Solutions:

  1. Check file locations:

    Terminal window
    ls -la ~/.finfocus/
    ls -la ~/.finfocus/plugins/*/*/config.*
  2. Validate YAML syntax:

    Terminal window
    python -c "import yaml; yaml.safe_load(open('config.yaml'))"
    # or
    yq eval '.' config.yaml
  3. Check file permissions:

    Terminal window
    ls -la ~/.finfocus/specs/*.yaml
    chmod 644 ~/.finfocus/specs/*.yaml

Problem: Plugin cannot authenticate with external APIs.

Error: authentication failed: invalid API key

Solutions:

  1. Verify credentials:

    Terminal window
    # Test API credentials manually
    curl -H "Authorization: Bearer $API_TOKEN" https://api.provider.com/test
  2. Check credential format:

    Terminal window
    # Ensure no extra whitespace or newlines
    echo -n "$API_KEY" | hexdump -C
  3. Rotate credentials: Generate new API keys if current ones are invalid.

  4. Check credential permissions: Ensure API key has required permissions for cost data access.

Problem: SSL certificate verification failures.

Error: x509: certificate signed by unknown authority

Solutions:

  1. Update CA certificates:

    Terminal window
    # Ubuntu/Debian
    sudo apt-get update && sudo apt-get install ca-certificates
    # CentOS/RHEL
    sudo yum update ca-certificates
  2. Disable SSL verification (temporary):

    Terminal window
    export INSECURE_SKIP_VERIFY=true
  3. Add custom CA certificate:

    Terminal window
    # Add your organization's CA certificate
    sudo cp custom-ca.crt /usr/local/share/ca-certificates/
    sudo update-ca-certificates

Problem: Network requests fail behind corporate proxy.

Solutions:

  1. Configure HTTP proxy:

    Terminal window
    export HTTP_PROXY=http://proxy.company.com:8080
    export HTTPS_PROXY=http://proxy.company.com:8080
    export NO_PROXY=localhost,127.0.0.1,.internal.domain
  2. Authenticated proxy:

    Terminal window
    export HTTP_PROXY=http://username:password@proxy.company.com:8080
  3. Plugin-specific proxy:

    Terminal window
    # Some plugins might need specific proxy configuration
    export KUBECOST_PROXY_URL=http://proxy.company.com:8080
Terminal window
# Global debug mode
finfocus --debug cost projected --pulumi-json plan.json
# Plugin-specific debugging
export PLUGIN_DEBUG=1
export PLUGIN_LOG_LEVEL=debug
finfocus cost actual --adapter kubecost --from 2025-01-01
Terminal window
# Increase verbosity
finfocus -v cost projected --pulumi-json plan.json
# Maximum verbosity
finfocus -vv cost actual --adapter kubecost --from 2025-01-01
Terminal window
# Save logs to file
finfocus --debug cost projected --pulumi-json plan.json > debug.log 2>&1
# Search for specific errors
grep -i "error\|failed\|timeout" debug.log
# Check plugin communication
grep -i "grpc\|plugin\|connect" debug.log
Terminal window
# Test plugin directly
~/.finfocus/plugins/kubecost/1.0.0/finfocus-kubecost &
PLUGIN_PID=$!
# Test gRPC connection
grpcurl -plaintext localhost:50051 finfocus.v1.CostSourceService/Name
# Clean up
kill $PLUGIN_PID
Terminal window
Error: exec: "finfocus-kubecost": executable file not found in $PATH

Solution: Plugin binary missing or not executable.

Terminal window
ls -la ~/.finfocus/plugins/kubecost/1.0.0/
chmod +x ~/.finfocus/plugins/kubecost/1.0.0/finfocus-kubecost
Terminal window
Error: connection refused: dial tcp 127.0.0.1:50051: connect: connection refused

Solution: Plugin process not running or wrong port.

Terminal window
# Restart plugin validation
finfocus plugin validate
# Check for port conflicts
lsof -i :50051
Terminal window
Error: context deadline exceeded

Solution: Increase timeout or check network connectivity.

Terminal window
export PLUGIN_TIMEOUT=60s
# Check network connectivity to external APIs
Terminal window
Error: invalid character 'N' looking for beginning of value

Solution: Pulumi plan JSON is malformed.

Terminal window
# Re-generate plan
pulumi preview --json > plan.json
# Validate JSON
jq '.' plan.json
  1. GitHub Issues: https://github.com/rshade/finfocus/issues
  2. Discussions: https://github.com/rshade/finfocus/discussions
  3. Documentation: Check all docs in this repository

When reporting bugs, include:

  1. Version information:

    Terminal window
    finfocus --version
  2. System information:

    Terminal window
    uname -a
    go version # if building from source
  3. Debug logs:

    Terminal window
    finfocus --debug [command] > debug.log 2>&1
  4. Configuration details:

    Terminal window
    ls -la ~/.finfocus/
    env | grep -E "(PULUMI|AWS|KUBECOST)"
  5. Minimal reproduction:

    • Steps to reproduce the issue
    • Expected vs actual behavior
    • Sample Pulumi plan (sanitized)
  1. Check existing issues/discussions first
  2. Describe the use case clearly
  3. Provide examples of desired behavior
  4. Consider contributing implementation

Before seeking help:

  • Check this troubleshooting guide
  • Try with --debug flag
  • 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

For enterprise support or custom plugin development:

  • Contact the maintainers through GitHub
  • Consider sponsoring the project
  • Explore commercial support options