Troubleshooting¶
Common issues and solutions for AAP Bridge.
Connection Issues¶
Cannot connect to source AAP¶
Symptoms:
Solutions:
- Verify the URL is correct in
.env - Check network connectivity:
curl -I https://source-aap.example.com/api/ - Verify the API token is valid and has read scope
- Check firewall rules
Cannot connect to target AAP (Platform Gateway)¶
Symptoms:
Solution:
Use the host URL only in .env — API paths are auto-discovered:
On AAP 2.5+, organizations and other shared resources are routed to
/api/gateway/v1/ automatically. Legacy /api/v2/ paths in TARGET__URL are
stripped but no longer required.
Authentication errors¶
Symptoms:
Solutions:
- Regenerate API token in AAP UI
- Verify token scope matches the instance role:
- Source: read-only scope is sufficient; the user must be able to read all resources being migrated
- Target: read/write scope with admin-level privileges is required for import, cleanup, and validation
- Check token hasn't expired
Database Issues¶
Cannot connect to PostgreSQL¶
Symptoms:
Solutions:
- Verify PostgreSQL is running:
systemctl status postgresql - Check connection string format:
- Verify user permissions:
State database corruption¶
Symptoms:
Solution:
Reset the state database:
Warning
This will require re-running the full migration.
Export Issues¶
Export runs out of memory¶
Symptoms:
Solutions:
- Reduce batch sizes in
config/config.yaml:
- Enable file splitting:
Export takes too long¶
Solutions:
- Export specific resource types:
- Increase concurrency (if AAP can handle it):
Import Issues¶
"SKIPPED - no importer" warning¶
Symptoms:
Cause: Missing entry in export_import.py method_map.
Solution: This is a code issue. Check
docs/developer-guide/adding-resource-types.md for how to add new resource
types.
Resource already exists¶
Symptoms:
Behavior: AAP Bridge handles this automatically by:
- Comparing existing resource with import data
- Updating if different, skipping if identical
- Recording the ID mapping
This is not an error - it's idempotent behavior.
Unresolved dependency¶
Symptoms:
Causes:
- Dependency wasn't exported
- Dependency export failed
- Resources exported out of order
Solutions:
- Check if the dependency exists in exports
- Re-run export for the missing type
- Check state database for mapping
Bulk import errors¶
Symptoms:
Error: Bulk host create failed: 400 Bad Request
Number of hosts exceeds system setting BULK_HOST_MAX_CREATE
Cause: AAP Bridge batch size (performance.batch_sizes.hosts) exceeds the
target controller setting BULK_HOST_MAX_CREATE. Stock AAP/AWX installs default
this to 100, while the bulk API accepts up to 200 hosts per request.
Bridge used to default to 200, which fails on unmodified targets.
Solutions:
- Set Bridge batch size to match (or stay below) the target limit:
-
Or raise the limit on the target: Settings → Bulk Actions → Max number of hosts to allow to be created in a single bulk action (requires admin access).
-
Verify the target limit before migrating:
Bridge now defaults to 100 and auto-caps batch size at import time when it can
read BULK_HOST_MAX_CREATE from the target.
Other bulk import failures:
- Check for invalid host data (duplicate names, invalid characters)
- Reduce batch size further if hosts have large
variablespayloads (nginx ~1MB body limit):
- Check target AAP logs for details
Migration appears stuck polling inventory sources¶
Symptoms:
- Import seems frozen after inventory sources (often mistaken for job template creation, which runs later in phase 2)
- Logs repeatedly show successful
GETrequests to/api/controller/v2/inventory_sources/<id>/every few seconds - Target UI may already show those sources as healthy while Bridge keeps polling
Cause: After importing inventory sources, Bridge triggers a sync and waits
for each inventory_update before continuing (smart/constructed inventories,
hosts, then job templates). The wait polls the inventory source object until
status leaves active states (pending, waiting, running, never updated,
etc.), up to inventory_source_update_job_timeout_seconds (default 3600).
Diagnosis:
- Prefer structured sync events over URL-only greps:
grep -E 'inventory_source_sync_poll_state|inventory_source_update_triggered|inventory_source_sync_timeout|inventory_source_sync_failed|inventory_source_sync_expected_job_mismatch' logs/migration.log
-
In the target UI/API, confirm the source can sync (
can_update): SCM sources need a validsource_project; cloud sources need credentials;source=filecannot be updated via the API. -
Check whether an inventory update job is actually running or stuck pending (capacity, project sync dependency).
Workarounds:
- Lower the wait timeout so a stuck sync fails faster and later phases can
proceed when
inventory_source_sync_fail_on_job_failureisfalse(default):
performance:
inventory_source_update_job_timeout_seconds: 600
inventory_source_update_poll_interval_seconds: 3
inventory_source_sync_fail_on_job_failure: false
- Fix the source on the target (project sync, credentials), sync it manually in AAP if needed, then resume/rerun import.
Validation Issues¶
Count mismatch¶
Symptoms:
Causes:
- Some resources failed to import
- Some resources were skipped (duplicates)
- Import still in progress
Solutions:
- Check import logs for errors
- Review skipped resources in state database
- Re-run import (idempotent - safe to repeat)
Performance Issues¶
Migration is slow¶
Solutions:
- Increase concurrency:
-
Use bulk APIs (enabled by default for hosts)
-
Check AAP instance capacity - it may be the bottleneck
Rate limiting errors¶
Symptoms:
Solutions:
- Reduce rate limit:
- Reduce concurrency:
Logging and Debugging¶
Enable debug logging¶
Check log files¶
Enable payload logging¶
In config/config.yaml:
Warning
Payload logging may contain sensitive data. Use only for debugging.
Getting Help¶
If you can't resolve an issue:
- Check the GitHub Issues
- Search existing issues for similar problems
- Open a new issue with:
- AAP Bridge version
- Source/Target AAP versions
- Error messages (scrubbed of secrets)
- Relevant log excerpts