Re: [debezium] Failed to resolve Oracle database version

1,532 views
Skip to first unread message

Chris Cranford

unread,
Mar 29, 2023, 8:37:17 AM3/29/23
to debe...@googlegroups.com
Hi, please take a look in the connector log files, there should be an error/stack-trace or message that tells you why the failure occurred, i.e. invalid credentials, etc.

Hope that helps.
Chris

On 3/28/23 01:50, Nguyễn Thế Anh wrote:
Hi,

Context:
I have created a source with my test Oracle database then sink to Postgres.
The database is on cloud and public.

But when I POST to a connector it show the following issue:

$ curl -i -X POST -H "Accept:application/json"   -H "Content-Type:application/json"   localhost:8083/connectors   -d @source_oracle.json
HTTP/1.1 400 Bad Request
Date: Tue, 28 Mar 2023 04:46:57 GMT
Content-Type: application/json
Content-Length: 279
Server: Jetty(9.4.44.v20210927)

{"error_code":400,"message":"Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect: Failed to resolve Oracle database version\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"}

I'm currently using the 11g XE.

My json is connected as follow:
{
"name": "inventory-connector",
"config": {
"connector.class" : "io.debezium.connector.oracle.OracleConnector",
"tasks.max" : "1",
"topic.prefix" : "server1",
"database.server.name" : "serverora",
"database.user" : "sys",
"database.password" : "oracle",
"database.dbname" :"XE",
"database.history.kafka.bootstrap.servers" : "kafka:9092",
"database.history.kafka.topic": "schema-changes.inventory",
"database.connection.adapter": "logminer",
"table.include.list" : "INVENTORY.CUSTOMERS, INVENTORY.PRODUCTS, INVENTORY.ORDERS",
"database.schema": "inventory"
}
}

I can connect via Dbeaver but can not connected via Kafka Connect

Screenshot from 2023-03-28 12-45-02.png

My solution was to change from  "database.dbname" :"XE" to "database.sid" :"XE"
But then 1 faced other error:

error_code":400,"message":"Connector configuration is invalid and contains the following 1 error(s):\nA value is required\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"}

Note: I used this docker for Kafka Connect: https://github.com/Trendyol/debezium-with-smt

Is there any hint or solution to fix that?

Thanks in advance,
Anh.


--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/afcf59a5-61a6-4ff2-b0f2-01534851ac8an%40googlegroups.com.

Javierchik Paz Zagaceta

unread,
Apr 11, 2023, 5:19:26 AM4/11/23
to debe...@googlegroups.com
Hi Anh,
           I realize that you are connecting with SYS and sys can connect as sysdba, and you need to connect with the user that is goin to collect the data, like in this doc. says "The connector captures database changes that are made by its own Oracle user account. However, it does not capture changes that are made by the SYS or SYSTEM user accounts."
            As your database is public, so I connected (sorry for that :D ) with the user that you created "c##dbzuser" and was successful , here are the 2 json formats that i tryit.

1 with database.url
{
    "name": "inventory-connector2",

    "config": {
        "connector.class" : "io.debezium.connector.oracle.OracleConnector",
        "tasks.max" : "1",
        "topic.prefix" : "server1",
        "database.server.name" : "serverora",
        "database.user" : "c##dbzuser",
        "database.password" : "dbz",

        "database.dbname" :"XE",
        "database.url": "jdbc:oracle:thin:@165.22.61.66:49161:XE",
        "database.history.kafka.bootstrap.servers" : "kafka:9092",
        "database.history.kafka.topic": "schema-changes.inventory",
        "database.connection.adapter": "logminer",
        "table.include.list" : "INVENTORY.CUSTOMERS, INVENTORY.PRODUCTS, INVENTORY.ORDERS",
        "database.schema": "inventory"
    }
}

2 with hostname

{
    "name": "inventory-connector",
    "config": {
        "connector.class" : "io.debezium.connector.oracle.OracleConnector",
        "tasks.max" : "1",
        "topic.prefix" : "server1",
        "database.server.name" : "serverora",
"database.hostname" : "165.22.61.66",
"database.port" : "49161",
"database.user" : "c##dbzuser",
        "database.password" : "dbz",
"database.dbname" : "XE",

        "database.history.kafka.bootstrap.servers" : "kafka:9092",
        "database.history.kafka.topic": "schema-changes.inventory",
        "database.connection.adapter": "logminer",
        "table.include.list" : "INVENTORY.CUSTOMERS, INVENTORY.PRODUCTS, INVENTORY.ORDERS",
        "database.schema": "inventory"
    }
}

json oracle.png

Regards
Javier Paz


Reply all
Reply to author
Forward
0 new messages