Skip to content

Non-supported character in postgres-cdc connector password field #21932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
qgab-flowdesk opened this issue May 20, 2025 · 1 comment · May be fixed by #21943
Open

Non-supported character in postgres-cdc connector password field #21932

qgab-flowdesk opened this issue May 20, 2025 · 1 comment · May be fixed by #21943
Labels
S-reproduced Status: Reproduced, waiting to be fixed. type/bug Type: Bug. Only for issues.
Milestone

Comments

@qgab-flowdesk
Copy link

Describe the bug

Attempting a PostgreSQL creation with the following DDL on version v2.3.2, only the snapshot is obtained, not the subsequent events.

CREATE SOURCE exposure_api_db WITH (
    connector = 'postgres-cdc',
    hostname='redacted',
    port=5432,
    username='redacted',
    password='redacted',
    database.name='postgres',
    schema.name='public',
    table.name='cdc_test',
    slot.name='risingwave_slot',
    publication.name='risingwave_publication',
    auto.schema.changes=true
);

CREATE TABLE cdc_table (
    category varchar,
    timestamp timestamptz,
    value numeric,
    PRIMARY KEY (category)
) WITH (
    snapshot='true'
)
FROM exposure_api_db TABLE 'public.cdc_test';

CREATE MATERIALIZED VIEW cdc_table_mv AS
WITH subscription AS CHANGELOG FROM cdc_table 
SELECT 
    category,
    timestamp, 
    value, 
    case 
        when changelog_op = 1 then 'create' 
        when changelog_op = 3 then 'update' 
        when changelog_op = 4 then 'delete' 
    end AS __op,
    _changelog_row_id::bigint AS __row_id
FROM subscription;

SELECT * FROM cdc_table_mv;

This seems to be caused by special characters in the password: %I\GYg-7anx1Ox{y .

Error message/log

│ compute 2025-05-20T16:13:50.63862789Z ERROR risingwave_connector_node: engine#5541 terminated with error. message: Connector configuration is not valid. Error while validating connector config: FATAL: password authentication failed for user "quentin"  ││
│ thread="rw-dbz-engine-runner-5541" class="com.risingwave.connector.source.core.DbzCdcEngineRunner"                                                                                                                                                          ││
│ compute 2025-05-20T16:13:50.638703789Z  WARN actor{otel.name="Actor 29724" actor_id=29724 prev_epoch=8553917820764160 curr_epoch=8553917886300160}:executor{otel.name="Source 741C00002712"}: risingwave_stream::executor::source::reader_stream: build str ││
│ eam source reader error, retry in 1s error=Connector configuration is not valid. Error while validating connector config: FATAL: password authentication failed for user "quentin"                                                                          ││
│ compute                                                                                                                                                                                                                                                     ││
│ compute Backtrace:                                                                                                                                                                                                                                          ││
│ compute    0: anyhow::kind::Adhoc::new                                                                                                                                                                                                                      ││
│ compute              at ./root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.86/src/backtrace.rs:27:14                                                                                                                                    ││
│ compute    1: risingwave_jni_core::Java_com_risingwave_java_binding_Binding_sendCdcSourceErrorToChannel::{{closure}}                                                                                                                                        ││
│ compute              at ./risingwave/src/jni_core/src/lib.rs:1049:58                                                                                                                                                                                        ││
│ compute    2: risingwave_jni_core::execute_and_catch::{{closure}}                                                                                                                                                                                           ││
│ compute              at ./risingwave/src/jni_core/src/lib.rs:222:59                                                                                                                                                                                         ││
│ compute    3: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once                                                                                                                                                 ││
│ compute              at ./rustc/f9e0239a7bc813b4aceffc7f069f4797cde3175c/library/core/src/panic/unwind_safe.rs:272:9                                                                                                                                        ││
│ compute    4: std::panicking::try::do_call                                                                                                                                                                                                                  ││
│ compute              at ./rustc/f9e0239a7bc813b4aceffc7f069f4797cde3175c/library/std/src/panicking.rs:587:40                                                                                                                                                ││
│ compute    5: std::panicking::try                                                                                                                                                                                                                           ││
│ compute              at ./rustc/f9e0239a7bc813b4aceffc7f069f4797cde3175c/library/std/src/panicking.rs:550:19                                                                                                                                                ││
│ compute    6: std::panic::catch_unwind                                                                                                                                                                                                                      ││
│ compute              at ./rustc/f9e0239a7bc813b4aceffc7f069f4797cde3175c/library/std/src/panic.rs:359:14                                                                                                                                                    ││
│ compute    7: risingwave_common::util::panic::rw_catch_unwind::{{closure}}                                                                                                                                                                                  ││
│ compute              at ./risingwave/src/common/src/util/panic.rs:44:9                                                                                                                                                                                      ││
│ compute    8: tokio::task::task_local::LocalKey<T>::scope_inner                                                                                                                                                                                             ││
│ compute              at ./root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.40.0/src/task/task_local.rs:217:19                                                                                                                              ││
│ compute    9: tokio::task::task_local::LocalKey<T>::sync_scope                                                                                                                                                                                              ││
│ compute              at ./root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.40.0/src/task/task_local.rs:173:15                                                                                                                              ││
│ compute   10: risingwave_common::util::panic::rw_catch_unwind                                                                                                                                                                                               ││
│ compute              at ./risingwave/src/common/src/util/panic.rs:42:5                                                                                                                                                                                      ││
│ compute   11: risingwave_jni_core::execute_and_catch                                                                                                                                                                                                        ││
│ compute              at ./risingwave/src/jni_core/src/lib.rs:222:11                                                                                                                                                                                         ││
│ compute   12: Java_com_risingwave_java_binding_Binding_sendCdcSourceErrorToChannel                                                                                                                                                                          ││
│ compute              at ./risingwave/src/jni_core/src/lib.rs:1044:5                                                                                                                                                                                         ││
│ compute   13: <unknown>                                                                                                                                                                                                                                     ││
│ compute                                                                                                                                                                                                                                                     ││
│ compute

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@qgab-flowdesk qgab-flowdesk added the type/bug Type: Bug. Only for issues. label May 20, 2025
@github-actions github-actions bot added this to the release-2.5 milestone May 20, 2025
@xiangjinwu
Copy link
Contributor

xiangjinwu commented May 21, 2025

Thanks for the bug report. We have identified the problem and will work on a fix.

Note that if you workaround the issue by using an extra slash password = '%I\\GYg-7anx1Ox{y', the upcoming fix would be a breaking change - it would expect password = '%I\GYg-7anx1Ox{y' and reject the workaround.

https://github.com/risingwavelabs/risingwave/blob/main/java/connector-node/risingwave-connector-service/src/main/java/com/risingwave/connector/source/common/DbzConnectorConfig.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-reproduced Status: Reproduced, waiting to be fixed. type/bug Type: Bug. Only for issues.
Projects
None yet
3 participants