Good afternoon everyone! We are running Airbyte on...
# replication-troubleshooting
i
Good afternoon everyone! We are running Airbyte on docker and since Saturday morning we are experiencing Postgres connector failures using the CDC. It says lack of permits, we review the documentation, we follow step by step what is indicated and it fails. We also tried assigning it a superuser and it didn't work. Does anyone else happen? I share the code for the user.
Copy code
CREATE USER "shared-h3-airbyte" WITH PASSWORD '**********';
GRANT USAGE ON SCHEMA public TO "shared-h3-airbyte";
GRANT SELECT ON TABLE public.addresses_cells TO "shared-h3-airbyte";
GRANT SELECT ON TABLE public.coverages_cells TO "shared-h3-airbyte";
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO "shared-h3-airbyte";
GRANT rds_replication TO "shared-h3-airbyte";

SELECT pg_drop_replication_slot('airbyte_shared_h3');

SELECT pg_create_logical_replication_slot('airbyte_shared_h3', 'pgoutput');

ALTER TABLE addresses_cells REPLICA IDENTITY DEFAULT;
ALTER TABLE coverages_cells REPLICA IDENTITY DEFAULT;

DROP PUBLICATION airbyte_publication_shared_h3;

CREATE PUBLICATION airbyte_publication_shared_h3 FOR TABLE addresses_cells,coverages_cells;
j
Hi people we share the log 🙏
Copy code
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.i.s.p.PostgresSource(lambda$getReplicationSlot$4):274 Attempting to find the named replication slot using the query: HikariProxyPreparedStatement@1492822331 wrapping SELECT * FROM pg_replication_slots WHERE slot_name = 'airbyte_shared_h3' AND plugin = 'pgoutput' AND database = 'shared-h3'
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.d.j.s.AdaptiveStreamingQueryConfig(initialize):38 Set initial fetch size: 10 rows
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.i.s.p.PostgresSource(lambda$getCheckOperations$6):305 Attempting to find the publication using the query: HikariProxyPreparedStatement@1128158063 wrapping SELECT * FROM pg_publication WHERE pubname = 'airbyte_publication_shared_h3'
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.d.j.s.AdaptiveStreamingQueryConfig(initialize):38 Set initial fetch size: 10 rows
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.i.s.p.PostgresSource(lambda$getCheckOperations$9):328 Verifying required privileges for user: shared-h3-airbyte
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.d.j.s.AdaptiveStreamingQueryConfig(initialize):38 Set initial fetch size: 10 rows
2023-02-22 22:04:42 INFO i.a.w.i.DefaultAirbyteStreamFactory(internalLog):120 - INFO i.a.i.s.r.AbstractDbSource(check):99 Exception while checking connection: io.airbyte.commons.exceptions.ConfigErrorException: User 'shared-h3-airbyte' does not have enough privileges for CDC replication. Please read the docs and add required privileges.
        at io.airbyte.integrations.source.postgres.PostgresSource.lambda$getCheckOperations$10(PostgresSource.java:333) ~[io.airbyte.airbyte-integrations.connectors-source-postgres-0.40.32.jar:?]
        at io.airbyte.integrations.source.relationaldb.AbstractDbSource.check(AbstractDbSource.java:87) ~[io.airbyte.airbyte-integrations.connectors-source-relational-db-0.40.32.jar:?]
        at io.airbyte.integrations.source.postgres.PostgresSource.check(PostgresSource.java:532) ~[io.airbyte.airbyte-integrations.connectors-source-postgres-0.40.32.jar:?]
        at io.airbyte.integrations.base.ssh.SshTunnel.sshWrap(SshTunnel.java:270) ~[io.airbyte.airbyte-integrations.bases-base-java-0.40.32.jar:?]
        at io.airbyte.integrations.base.ssh.SshWrappedSource.check(SshWrappedSource.java:43) ~[io.airbyte.airbyte-integrations.bases-base-java-0.40.32.jar:?]
        at io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:123) ~[io.airbyte.airbyte-integrations.bases-base-java-0.40.32.jar:?]
        at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:98) ~[io.airbyte.airbyte-integrations.bases-base-java-0.40.32.jar:?]
        at io.airbyte.integrations.base.adaptive.AdaptiveSourceRunner$Runner.run(AdaptiveSourceRunner.java:86) ~[io.airbyte.airbyte-integrations.bases-base-java-0.40.32.jar:?]
        at io.airbyte.integrations.source.postgres.PostgresSourceRunner.main(PostgresSourceRunner.java:15) ~[io.airbyte.airbyte-integrations.connectors-source-postgres-0.40.32.jar:?]

Stack Trace: io.airbyte.commons.exceptions.ConfigErrorException: User 'shared-h3-airbyte' does not have enough privileges for CDC replication. Please read the docs and add required privileges.
The version of connector postgres is 1.0.46
if this has happened to any of you, can you please tell us how to solve it?
@Sunny Hashmi (Airbyte) help us, please 🙏
What we can detect is that the postgresql connector of the current version, does not detect the role rds_replication of RDS, we did a test with a local database and granted the role REPLICATION and it worked. Do you know how to fix this issue for AWS postgresql?
The versión 1.0.45 I think this changed 🤔
Is there any method or documentation to go back to version 1.0.44 and test this theory?
@Pedro Lopez (Airbyte) 🙏
p
@Jhon Edison Bambague Calderon, I'm not familiar with these changes, but if you are on Airbyte OSS you should be able to go to the settings page and change the version manually
j
Hi, Thank you Pedro, I really didn't know that
Now it works thanks, it is definitely a bug to be fixed in the new versions, .45 and .46. 👍
👍 1
p
I brought this up internally and it looks like there’s a fix PR up here that should be ready to go soon https://github.com/airbytehq/airbyte/pull/23330
j
The problem @Pedro Lopez (Airbyte) is that in rds postgresql you can not assign the role REPLICATION, it is done with the role rds_replication and fails, in conclusion the solution now only applies to Postgresql that are not RDS.
p
FYI seems like 1.0.47 has been released with a fix if you want to try it out
👍 1
👀 1
i
We appreciate that ! thx