<@U04S8PLJWMT> getting below error, how I can fix ...
# ask-ai
r
@kapa.ai getting below error, how I can fix it?
k
Sorry @Rahul, it looks like your question contains files, which I cannot process. Please reformulate your question without including any files.
r
2025-11-06 185458 replication-orchestrator INFO Failures: [ { "failureOrigin" : "source", "failureType" : "system_error", "internalMessage" : "io.airbyte.cdk.integrations.source.relationaldb.state.FailedRecordIteratorException: java.lang.RuntimeException: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near \"FROM\"\n Position: 21", "externalMessage" : "Something went wrong in the connector. See the logs for more details.", "metadata" : { "attemptNumber" : 1, "jobId" : 32, "from_trace_message" : true, "connector_command" : "read" }, "stacktrace" : "io.airbyte.cdk.integrations.source.relationaldb.state.FailedRecordIteratorException: java.lang.RuntimeException: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near \"FROM\"\n Position: 21\n\tat io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator.computeNext(SourceStateIterator.kt:38)\n\tat io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator.computeNext(SourceStateIterator.kt:18)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:46)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.CompositeIterator.computeNext(CompositeIterator.kt:67)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.produceMessages(IntegrationRunner.kt:234)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.readSerial(IntegrationRunner.kt:291)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:190)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:119)\n\tat io.airbyte.integrations.source.postgres.PostgresSource.main(PostgresSource.java:712)\nCaused by: java.lang.RuntimeException: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near \"FROM\"\n Position: 21\n\tat io.airbyte.integrations.source.postgres.ctid.InitialSyncCtidIterator.computeNext(InitialSyncCtidIterator.java:168)\n\tat io.airbyte.integrations.source.postgres.ctid.InitialSyncCtidIterator.computeNext(InitialSyncCtidIterator.java:50)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:46)\n\tat io.airbyte.commons.util.DefaultAutoCloseableIterator.computeNext(DefaultAutoCloseableIterator.kt:42)\n\tat com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)\n\tat com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)\n\tat io.airbyte.cdk.integrations.source.relationaldb.state.SourceStateIterator.computeNext(SourceStateIterator.kt:32)\n\t... 25 more\nCaused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: syntax error at or near \"FROM\"\n Position: 21\n\tat io.airbyte.cdk.db.jdbc.StreamingJdbcDatabase.unsafeQuery(StreamingJdbcDatabase.kt:73)\n\tat io.airbyte.integrations.source.postgres.ctid.InitialSyncCtidIterator.getStream(InitialSyncCtidIterator.java:173)\n\tat io.airbyte.integrations.source.postgres.ctid.InitialSyncCtidIterator.computeNext(InitialSyncCtidIterator.java:162)\n\t... 33 more\nCaused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near \"FROM\"\n Position: 21\n\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2733)\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2420)\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:372)\n\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:517)\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:434)\n\tat org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:194)\n\tat org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:137)\n\tat com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)\n\tat com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)\n\tat io.airbyte.cdk.db.jdbc.StreamingJdbcDatabase.unsafeQuery(StreamingJdbcDatabase.kt:58)\n\t... 35 more\n", "timestamp" : 1762435490644 }, { "failureOrigin" : "destination", "failureType" : "transient_error", "internalMessage" : "Some streams either received an INCOMPLETE stream status, or did not receive a stream status at all: postgres.account_client\nio.airbyte.commons.exceptions.TransientErrorException: Some streams were unsuccessful due to a source error. See logs for details.", "externalMessage" : "Some streams were unsuccessful due to a source error. See logs for details.", "metadata" : { "attemptNumber" : 1, "jobId" : 32, "from_trace_message" : true, "connector_command" : "write" }, "stacktrace" : "io.airbyte.commons.exceptions.TransientErrorException: Some streams were unsuccessful due to a source error. See logs for details.\n\tat io.airbyte.cdk.integrations.destination.async.AsyncStreamConsumer.close(AsyncStreamConsumer.kt:217)\n\tat kotlin.jdk7.AutoCloseableKt.closeFinally(AutoCloseableJVM.kt:48)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.kt:215)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run(IntegrationRunner.kt:119)\n\tat io.airbyte.cdk.integrations.base.IntegrationRunner.run$default(IntegrationRunner.kt:113)\n\tat io.airbyte.cdk.integrations.base.adaptive.AdaptiveDestinationRunner$Runner.run(AdaptiveDestinationRunner.kt:68)\n\tat io.airbyte.integrations.destination.snowflake.SnowflakeDestinationKt.main(SnowflakeDestination.kt:422)\n", "timestamp" : 1762435497979 }, { "failureOrigin" : "source", "internalMessage" : "Source process exited with non-zero exit code 1", "externalMessage" : "Something went wrong within the source connector", "metadata" : { "attemptNumber" : 1, "jobId" : 32, "connector_command" : "read" }, "stacktrace" : "io.airbyte.workers.internal.exception.SourceException: Source process exited with non-zero exit code 1\n\tat io.airbyte.container.orchestrator.worker.SourceReader.run(ReplicationTask.kt:196)\n\tat io.airbyte.container.orchestrator.worker.SourceReader$run$1.invokeSuspend(ReplicationTask.kt)\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n", "timestamp" : 1762435498370 } ] 2025-11-06 185458 replication-orchestrator INFO Closing io.micronaut.context.propagation.instrument.execution.ExecutorServiceInstrumenter$2@71c74011 2025-11-06 185458 replication-orchestrator INFO Closing io.airbyte.container.orchestrator.worker.io.LocalContainerAirbyteDestination@1d884a19 2025-11-06 185458 replication-orchestrator INFO 2025-11-06 185458 replication-orchestrator INFO ----- END REPLICATION ----- 2025-11-06 185458 replication-orchestrator INFO 2025-11-06 185458 replication-orchestrator ERROR Error closing resource io.airbyte.container.orchestrator.worker.io.LocalContainerAirbyteDestination@1d884a19; recording failure but continuing. 2025-11-06 185458 replication-orchestrator INFO Closing io.airbyte.container.orchestrator.worker.io.LocalContainerAirbyteSource@553d828a 2025-11-06 185458 replication-orchestrator ERROR Error closing resource io.airbyte.container.orchestrator.worker.io.LocalContainerAirbyteSource@553d828a; recording failure but continuing. 2025-11-06 185458 replication-orchestrator INFO Closing io.airbyte.container.orchestrator.worker.RecordSchemaValidator@2ba9765b 2025-11-06 185458 replication-orchestrator INFO Closing io.airbyte.container.orchestrator.persistence.SyncPersistenceImpl@5f233f9 2025-11-06 185459 replication-orchestrator INFO Returning output... 2025-11-06 185459 platform INFO ----- START POST REPLICATION OPERATIONS ----- 2025-11-06 185459 platform INFO No post-replication operation(s) to perform. 2025-11-06 185459 platform INFO ----- END POST REPLICATION OPERATIONS ----- 2025-11-06 185459 platform INFO Retry State: RetryManager(completeFailureBackoffPolicy=BackoffPolicy(minInterval=PT10S, maxInterval=PT30M, base=3), partialFailureBackoffPolicy=null, successiveCompleteFailureLimit=5, successivePartialFailureLimit=1000, totalCompleteFailureLimit=10, totalPartialFailureLimit=20, successiveCompleteFailures=2, successivePartialFailures=0, totalCompleteFailures=2, totalPartialFailures=0) Backoff before next attempt: 30 seconds @kapa.ai getting above error how to fix it???
k
Based on the error logs you've provided, the root cause of your sync failure is a PostgreSQL syntax error in the source connector:
Copy code
ERROR: syntax error at or near "FROM" Position: 21
This error originates from the
InitialSyncCtidIterator
in the PostgreSQL source connector, indicating that Airbyte is generating an invalid SQL query when trying to read data from your PostgreSQL database. ## How to Fix This Issue While the knowledge sources don't contain a specific solution for this exact error, here are the recommended troubleshooting steps: 1. Check your source configuration: Review the PostgreSQL source connector configuration, particularly: - Table/schema selection settings - Any custom SQL queries or transformations - Column names that might contain special characters or reserved keywords 2. Verify database permissions: Ensure the database user has proper read permissions on the tables you're trying to sync. 3. Review the stream configuration: The error mentions
postgres.account_client
stream. Check if this table has any unusual characteristics: - Special characters in column names - Reserved keywords as column names - Complex data types 4. Update connector versions: Consider updating both your PostgreSQL source connector and Airbyte platform to the latest versions, as this could be a bug that has been fixed in newer releases. 5. Check for similar issues: The knowledge sources show various connector failures, but none match your specific SQL syntax error. You may want to search the [Airbyte GitHub issues](https://github.com/airbytehq/airbyte/issues) for similar PostgreSQL syntax errors or create a new issue with your specific error details. Unfortunately, the knowledge sources don't contain enough information about this specific PostgreSQL syntax error to provide a more detailed solution. I recommend reaching out to Airbyte support or the community with the full connector logs and your source configuration details for more targeted assistance.
r
@kapa.ai I am getting same error even after the updating to laster postgres version
k
A message from kapa.ai
I understand you're still experiencing the PostgreSQL syntax error even after updating to the latest connector version. Unfortunately, the knowledge sources don't contain specific information about this particular "syntax error at or near 'FROM'" issue or its resolution. However, based on the knowledge sources, here are some additional troubleshooting steps you can try: 1. Check for reserved keywords: As mentioned in [Destination Clickhouse: Clickhouse needs some keywords to be quoted](https://github.com/airbytehq/airbyte/issues/27408), column names that are reserved keywords (like "FROM") need to be properly quoted. Check if your
account_client
table has any column names that are PostgreSQL reserved keywords. 2. Review connector configuration after upgrade: According to [Postgres to Postgres suddenly failing](https://discuss.airbyte.io/t/2348), after upgrading connectors, configuration settings may need to be validated. Try checking your connector settings and re-validating the connection. 3. Consider connection reset: The [Upgrading the Postgres Source Connector after v0.4.18](https://discuss.airbyte.io/t/1542) discussion mentions that some upgrades may require creating new connections rather than upgrading existing ones. 4. Report the issue: Since this appears to be a SQL generation bug in the connector, I recommend: - Creating a GitHub issue with your specific error details - Including the PostgreSQL connector version you upgraded to - Providing the schema of the
account_client
table - Sharing the full connector logs The knowledge sources don't contain enough information about this specific SQL syntax error to provide a definitive solution. You may need direct support from the Airbyte team to resolve this issue.