Skip to content

Troubleshooting

Common issues and solutions for the f5xc-auth library.

Problem: Not authenticated error

const credentialManager = new CredentialManager();
await credentialManager.initialize();
if (!credentialManager.isAuthenticated()) {
console.error('Not authenticated');
}

Solutions:

  1. Check if profile exists:
Terminal window
ls -la ~/.config/f5xc/profiles/
  1. Verify active profile:
const profileManager = getProfileManager();
const active = await profileManager.getActiveProfile();
console.log('Active profile:', active?.name);
  1. Set environment variables:
Terminal window
export F5XC_API_URL="https://mytenant.console.ves.volterra.io"
export F5XC_API_TOKEN="your-token"

Problem: Profile doesn’t exist or can’t be loaded

const profile = await profileManager.load('production');
if (!profile) {
console.error('Profile not found');
}

Solutions:

  1. List available profiles:
const profiles = await profileManager.list();
console.log('Available profiles:', profiles);
  1. Create the profile:
await profileManager.save({
name: 'production',
apiUrl: 'https://mytenant.console.ves.volterra.io',
apiToken: 'your-token'
});

Problem: httpClient.isAvailable() returns false

Solutions:

  1. Check authentication:
if (!credentialManager.isAuthenticated()) {
console.error('Credential manager not authenticated');
}
  1. Verify credentials:
console.log('API URL:', credentialManager.getApiUrl());
console.log('Tenant:', credentialManager.getTenant());
  1. Check network connectivity:
Terminal window
curl -I https://mytenant.console.ves.volterra.io

Problem: UNABLE_TO_VERIFY_LEAF_SIGNATURE or similar TLS errors

Solutions:

  1. For staging/development only:
Terminal window
export F5XC_TLS_INSECURE=true
  1. For enterprise with custom CA:
Terminal window
export F5XC_CA_BUNDLE="/path/to/ca-bundle.pem"
  1. Update Node.js certificates:
Terminal window
npm install -g node

Problem: EACCES: permission denied when accessing profiles

Solutions:

  1. Check directory permissions:
Terminal window
ls -la ~/.config/f5xc/
  1. Fix permissions:
Terminal window
chmod 700 ~/.config/f5xc
chmod 600 ~/.config/f5xc/profiles/*.json
  1. Check ownership:
Terminal window
chown -R $USER:$USER ~/.config/f5xc

Problem: API requests fail with 401 or 403

Solutions:

  1. Verify token is valid:
Terminal window
# Test with curl
curl -H "Authorization: APIToken YOUR_TOKEN" \
https://mytenant.console.ves.volterra.io/web/namespaces
  1. Check token hasn’t expired:
// Tokens don't expire but can be revoked
// Generate new token in F5 XC console if needed
  1. Verify namespace access:
const namespace = credentialManager.getNamespace();
console.log('Using namespace:', namespace);

Enable debug logging to troubleshoot issues:

const credentialManager = new CredentialManager({ debug: true });
await credentialManager.initialize();
const httpClient = createHttpClient(credentialManager, { debug: true });

Debug output includes:

  • Credential resolution process
  • Profile loading steps
  • HTTP request/response details
  • Authentication header information (tokens masked)