Troubleshooting
Common issues and solutions for the f5xc-auth library.
Authentication Issues
Section titled “Authentication Issues”Problem: Not authenticated error
const credentialManager = new CredentialManager();await credentialManager.initialize();
if (!credentialManager.isAuthenticated()) { console.error('Not authenticated');}Solutions:
- Check if profile exists:
ls -la ~/.config/f5xc/profiles/- Verify active profile:
const profileManager = getProfileManager();const active = await profileManager.getActiveProfile();console.log('Active profile:', active?.name);- Set environment variables:
export F5XC_API_URL="https://mytenant.console.ves.volterra.io"export F5XC_API_TOKEN="your-token"Profile Not Found
Section titled “Profile Not Found”Problem: Profile doesn’t exist or can’t be loaded
const profile = await profileManager.load('production');if (!profile) { console.error('Profile not found');}Solutions:
- List available profiles:
const profiles = await profileManager.list();console.log('Available profiles:', profiles);- Create the profile:
await profileManager.save({ name: 'production', apiUrl: 'https://mytenant.console.ves.volterra.io', apiToken: 'your-token'});HTTP Client Not Available
Section titled “HTTP Client Not Available”Problem: httpClient.isAvailable() returns false
Solutions:
- Check authentication:
if (!credentialManager.isAuthenticated()) { console.error('Credential manager not authenticated');}- Verify credentials:
console.log('API URL:', credentialManager.getApiUrl());console.log('Tenant:', credentialManager.getTenant());- Check network connectivity:
curl -I https://mytenant.console.ves.volterra.ioTLS Certificate Errors
Section titled “TLS Certificate Errors”Problem: UNABLE_TO_VERIFY_LEAF_SIGNATURE or similar TLS errors
Solutions:
- For staging/development only:
export F5XC_TLS_INSECURE=true- For enterprise with custom CA:
export F5XC_CA_BUNDLE="/path/to/ca-bundle.pem"- Update Node.js certificates:
npm install -g nodePermission Errors
Section titled “Permission Errors”Problem: EACCES: permission denied when accessing profiles
Solutions:
- Check directory permissions:
ls -la ~/.config/f5xc/- Fix permissions:
chmod 700 ~/.config/f5xcchmod 600 ~/.config/f5xc/profiles/*.json- Check ownership:
chown -R $USER:$USER ~/.config/f5xcAPI Request Failures
Section titled “API Request Failures”Problem: API requests fail with 401 or 403
Solutions:
- Verify token is valid:
# Test with curlcurl -H "Authorization: APIToken YOUR_TOKEN" \ https://mytenant.console.ves.volterra.io/web/namespaces- Check token hasn’t expired:
// Tokens don't expire but can be revoked// Generate new token in F5 XC console if needed- Verify namespace access:
const namespace = credentialManager.getNamespace();console.log('Using namespace:', namespace);Debug Mode
Section titled “Debug Mode”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)
See Also
Section titled “See Also”- Authentication - Configure credentials properly
- CredentialManager API - API documentation
- ProfileManager API - Profile management API
- Environment Variables - Environment configuration