I got this message from a failed sync. "Warning fr...
# ask-ai
m
I got this message from a failed sync. "Warning from source: The main container of the CHECK operation returned an exit code 2". What does that mean?
k
The message "The main container of the CHECK operation returned an exit code 2" indicates that the connector's check operation failed, and the process inside the container exited with code 2. In Airbyte, the CHECK operation is used to validate the configuration and connectivity of a source or destination connector before running a sync. An exit code of 2 is a generic error code that typically means the connector encountered an error during the check process, but the specific reason is not provided in the message itself. The root cause could be related to misconfiguration, network issues, authentication problems, or a bug in the connector. To determine the exact cause, you should review the detailed logs for the failed check operation, as they may contain error messages or stack traces that provide more context. For example, in the case of the MongoDB source connector, a non-zero exit code (such as 2) was associated with the connector stopping unexpectedly or encountering an error during its operation, but the logs were needed to diagnose the specific issue further. The exit code alone does not specify the root cause; it only signals that the check did not complete successfully and further investigation is required in the logs for more details [MongoDb source connector stops working / not stable (non-zero exit code 2)](https://github.com/airbytehq/airbyte/issues/38705). In summary, exit code 2 means the check failed, but you need to consult the connector logs to understand why.
m
@kapa.ai here is the complete logs: 2025-08-18 115726 platform INFO APPLY Stage: BUILD — (workloadId=200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check) 2025-08-18 115726 platform INFO APPLY Stage: CLAIM — (workloadId=200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check) 2025-08-18 115726 platform INFO Claimed: true for 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check via API for ef12e747-c4cb-4afe-8fbd-103298762b98 2025-08-18 115726 platform INFO APPLY Stage: LOAD_SHED — (workloadId=200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check) 2025-08-18 115726 platform INFO APPLY Stage: CHECK_STATUS — (workloadId=200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check) 2025-08-18 115726 platform INFO No pod found running for workload 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check 2025-08-18 115726 platform INFO APPLY Stage: MUTEX — (workloadId=200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check) 2025-08-18 115726 platform INFO No mutex key specified for workload: 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check. Continuing... 2025-08-18 115726 platform INFO APPLY Stage: LAUNCH — (workloadId=200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check) 2025-08-18 115726 platform INFO [initContainer] image: airbyte/workload-init-container:1.6.2 resources: ResourceRequirements(claims=[], limits={}, requests={}, additionalProperties={}) 2025-08-18 115736 platform INFO 2025-08-18 115736 platform INFO Connector exited, processing output 2025-08-18 115736 platform INFO ----- START CHECK ----- 2025-08-18 115736 platform INFO Output file jobOutput.json found 2025-08-18 115736 platform INFO 2025-08-18 115736 platform INFO Connector exited with exit code 2 2025-08-18 115736 platform INFO Reading messages from protocol version 0.2.0 2025-08-18 115736 platform INFO Checking for optional control message... 2025-08-18 115736 platform INFO Writing output of 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check to the doc store 2025-08-18 115736 platform INFO Marking workload 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check as successful 2025-08-18 115736 platform INFO Deliberately exiting process with code 0. 2025-08-18 115736 platform INFO 2025-08-18 115736 platform INFO ----- END CHECK ----- 2025-08-18 115736 platform INFO 2025-08-18 115737 platform INFO Retry State: RetryManager(completeFailureBackoffPolicy=BackoffPolicy(minInterval=PT10S, maxInterval=PT30M, base=3), partialFailureBackoffPolicy=null, successiveCompleteFailureLimit=5, successivePartialFailureLimit=1000, totalCompleteFailureLimit=10, totalPartialFailureLimit=20, successiveCompleteFailures=1, successivePartialFailures=0, totalCompleteFailures=1, totalPartialFailures=0) Backoff before next attempt: 10 seconds 2025-08-18 115737 platform INFO Attempting to update workload: 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check to LAUNCHED. 2025-08-18 115737 platform WARN Failed to update workload status to launched. Workload may be reprocessed on restart.Exception: io.airbyte.workload.api.client.generated.infrastructure.ClientException: Client error : 410 Gone {"message":"Heartbeat a workload in a terminal state"} message: Client error : 410 Gone {"message":"Heartbeat a workload in a terminal state"} stackTrace: [Ljava.lang.StackTraceElement;@4612f6c8 2025-08-18 115737 platform INFO Pipeline completed for workload: 200330b2-ea62-4d11-ac6d-cfe3e3f8ab2b_197794_0_check.
k
A message from kapa.ai
Based on the logs you provided, the key line is:
Copy code
2025-08-18 11:57:36 platform INFO Connector exited with exit code 2
This means the connector's CHECK operation failed and the process inside the container exited with code 2. In Airbyte, an exit code of 2 is a generic error indicating that the connector encountered an error during the check process, but the logs do not specify the exact reason for the failure. The rest of the log shows that the output file (
jobOutput.json
) was found, and the workload was marked as successful from the platform's perspective, but the CHECK itself did not succeed. There is also a warning about a failed attempt to update the workload status due to a "Heartbeat a workload in a terminal state" error, which is a platform-level message and not the root cause of the connector failure. Unfortunately, the knowledge sources do not provide a detailed mapping of exit code 2 to a specific error condition. The exit code simply signals that the check did not complete successfully, and you would need to look for more detailed error messages in the connector's logs (not shown in your snippet) to determine the root cause. This could be due to misconfiguration, authentication issues, network problems, or a bug in the connector. In summary: Exit code 2 means the connector's check failed, but the logs you provided do not specify why. You will need to review the connector's detailed logs for more information about the failure. This is consistent with other Airbyte issues where exit code 2 is a generic failure and further log inspection is required to diagnose the problem [[source]](https://github.com/airbytehq/airbyte/issues/48600).