Integration استكشاف الأخطاء وإصلاحها
This guide provides step-by-step instructions for diagnosing and resolving common integration, database connection, storage access, and webhook delivery issues.
1. Database Connection Failures
When configuring or running a Database Connector, you may encounter connectivity errors.
Common Error Messages & Resolutions
🔴 Connection الوقتout (timeout=20s)
- Possible Cause: A network firewall or security group is blocking outbound traffic from the AIIA worker container to the target database server.
- Troubleshooting Steps:
- Verify the hostname and port are correct.
- Log in to the host machine running AIIA and test basic TCP connectivity:
nc -zvw3 <target-host> <target-port>
- Ensure that your organization's network security team has whitelisted the outbound IP address of the AIIA worker node for the specific database port.
🔴 Connection Refused
- Possible Cause: The database service is not running on the target server, or it is not listening on the specified network interface.
- Troubleshooting Steps:
- Verify the database service status on the target host.
- Confirm the database configuration permits remote TCP/IP connections (e.g., check
postgresql.conf'slisten_addresses = '*'for PostgreSQL).
🔴 FATAL: password authentication failed for user "..."
- Possible Cause: Incorrect username or password configured in the connector.
- Troubleshooting Steps:
- Re-enter the password in the Edit Connector form.
- Verify that the user credentials work by logging in manually from another client using the same user.
- Ensure the database user has been granted
SELECTprivileges on the target schema tables.
2. Object Storage (S3 / MinIO) Failures
If evidence file uploads fail or S3 data refresh jobs throw errors:
Common Error Messages & Resolutions
🔴 الوصولDenied (403): User is not authorized to perform: s3:GetObject
- Possible Cause: The AWS IAM policy or MinIO access policy associated with the API Key/Secret Key does not have sufficient bucket permissions.
- Troubleshooting Steps:
- Verify the IAM policy allows the following actions on the target bucket:
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Action": ["s3:GetObject","s3:PutObject","s3:ListBucket"],"Resource": ["arn:aws:s3:::your-bucket-name","arn:aws:s3:::your-bucket-name/*"]}]}
- Verify the IAM policy allows the following actions on the target bucket:
🔴 SignatureDoesلاtMatch
- Possible Cause: Incorrect API Key or Secret Key configured in the connector, or the system time on the AIIA worker host is out of sync.
- Troubleshooting Steps:
- Re-configure the access keys in the connector.
- Verify clock synchronization on the host machine using NTP:
chronyc sources -v || ntpq -p
[!IMPORTANT] S3 API requests will fail if the client clock deviates by more than 5 minutes from the S3 server clock.
3. Webhook Delivery Failures
If external systems are not receiving event notifications:
Common Error Messages & Resolutions
🔴 الحالة Code: 401 Unauthorized
- Possible Cause: The webhook signature verification is failing on the receiver side.
- Troubleshooting Steps:
- Verify that the secret key configured on the receiving server matches the signing secret displayed in the AIIA Admin → Webhooks panel.
- Check for clock skew issues. If the receiver rejects requests where
tis more than 5 minutes old, ensure both servers sync via NTP. - Print and inspect the computed signature on the receiver side to check for format differences.
🔴 الحالة Code: 403 Forbidden
- Possible Cause: The receiver's firewall or application gateway is blocking requests from the AIIA worker IP.
- Troubleshooting Steps:
- Check the receiver's security logs.
- Add the outbound IP of the AIIA worker node to the receiver's IP whitelist.
🔴 Connection الوقتout / Host Unreachable
- Possible Cause: The receiver endpoint is offline, or the URL is misconfigured.
- Troubleshooting Steps:
- Verify the webhook URL is correct and starts with
https://(production) orhttp://(internal testing). - Ensure the target domain resolves correctly from the AIIA worker container.
- Verify the webhook URL is correct and starts with
4. تحديث البيانات Latency & Queue Backlog
If a data refresh job is stuck in the Pending status:
- Possible Cause: The Celery/worker queue is overloaded with long-running tasks, or the worker service is offline.
- Troubleshooting Steps:
- Check worker service status in Docker:
docker compose ps worker
- Inspect worker logs for active processing or errors:
docker compose logs worker --tail=100
- Check the active task queue depth using the Redis CLI:
If the depth is high, consider allocating additional worker instances or optimizing connector schedules.docker compose exec redis redis-cli LLEN celery
- Check worker service status in Docker: