Connection error when trying to create Oracle connector

1,218 views
Skip to first unread message

jeevan bindu

unread,
Jul 13, 2021, 4:09:18 AM7/13/21
to debezium
Hi 
 Am getting the following error while running the below command

curl -i -X POST -H "Accept:application/json" -H  "Content-Type:application/json" http://localhost:8083/connectors/ -d {
  "name": "inventory-connector",
  "config": {
    "connector.class" : "io.debezium.connector.oracle.OracleConnector",
    "tasks.max" : "1",
    "database.server.name" : "server1",
    "database.hostname" : "oracle-ip",
    "database.port" : "1521",
    "database.user" : "sys",
    "database.password" : "OraPasswd1",
    "database.dbname" : "ORCLCDB",
    "database.pdb.name" : "ORCLPDB1",
    "database.connection.adapter" : "logminer",
    "database.history.kafka.bootstrap.servers" : "kafka-ip:9092",
    "database.history.kafka.topic": "schema-changes.inventory"
  }
}


But getting the below error 
HTTP/1.1 400 Bad Request
Date: Tue, 13 Jul 2021 08:07:10 GMT
Content-Type: application/json
Content-Length: 279
Server: Jetty(9.4.33.v20201020)

{"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`"}

Can anyone help me out with this issue?


~

Chris Cranford

unread,
Jul 13, 2021, 7:01:10 AM7/13/21
to debe...@googlegroups.com, jeevan bindu
Hi Jeevan -

The message indicates "Unable to connect" which implies either the Oracle hostname/port isn't accessible from the machine that is running Connect or the credentials aren't correct.

If you download the nightly snapshot of the Oracle connector:
https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.debezium&a=debezium-connector-oracle&v=LATEST&c=plugin&e=tar.gz

The latest 1.7.0-SNAPSHOT builds provide a more detailed reason for the failure in the connect logs if you need more guidance on what could be wrong with your configuration.

HTH,
Chris
--
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/17da7960-a15c-462d-a2b9-c4f638179b84n%40googlegroups.com.

jeevan bindu

unread,
Jul 13, 2021, 10:00:31 AM7/13/21
to Chris Cranford, debe...@googlegroups.com
Hi Chris

I am able to connect to oracle from the machine that is running connect but getting error while running json

when i run the tar file 

i got below error

HTTP request sent, awaiting response... 400 Bad Request
2021-07-13 11:46:15 ERROR 400: Bad Request.

Do you have any document how to install and configure oracle in debezium

Chris Cranford

unread,
Jul 13, 2021, 10:32:18 AM7/13/21
to jeevan bindu, debe...@googlegroups.com
Jeevan -

What JSON are you using and what endpoint are you trying to send the JSON to? 

You can also check-out our tutorial example which has a section on using the Oracle connector if you'd like to compare what you're doing to the example:
https://github.com/debezium/debezium-examples/tree/master/tutorial

CC

jeevan bindu

unread,
Jul 14, 2021, 11:33:09 AM7/14/21
to Chris Cranford, debe...@googlegroups.com
Hi Chris

Followed above mentioned docker compose files for installation and configuration of oracle

Now I can create a connector in kafka connect 

But now I am getting error in kafka Tried  Watch for one topic  but getting error  and warn in kafka topics 

Not able to get incremental data into topics 

bootstrap broker 0.0.0.0:9092 disconnected


Installed kafka ui to check kafka messages 

It's showing size as below image because of that am unable to view schema message in kafka topic



IMG_20210714_205325.jpg

Chris Cranford

unread,
Jul 15, 2021, 11:17:33 AM7/15/21
to jeevan bindu, debe...@googlegroups.com
Hi Jeevan -
   
I also noticed in your original connector configuration you are using the "SYS" user, which is a big no-no.

The Oracle connector purposely does not track changes both to database objects (DDL) nor data changes (DML) made by "SYS" and "SYSTEM".  These system accounts are special accounts in Oracle and should never be used in conjunction with the connector.  As outlined in the documentation [1], please setup a specific connector user if you haven't that will be responsible for reading the changes.  Secondly, in 1.6.0.Final and earlier, this connector user you defined is also excluded from DDL/DML tracking.  We plan to relax this constraint in 1.6.1.Final and 1.7 so until those are released, I suggest you also create one additional user that you use to create and manipulate database objects as well as perform any DML operations with while interacting with the connector.  I'm hoping your lack of seeing the data in Kafka is due to this user usage pattern but if not, the following information would be helpful:

    * Your current connector configuration
    * Output From: "SELECT GROUP#, THREAD#, BYTES/1024/1024||'MB', MEMBERS FROM V$LOG"
    * Output From: "SELECT * FROM V$VERSION WHERE BANNER LIKE '%Database%'"
    * Output From: "SELECT NAME, LOG_MODE, SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_ALL, CDB FROM V$DATABASE"

[1]: https://debezium.io/documentation/reference/1.6/connectors/oracle.html#setting-up-oracle

CC

Reply all
Reply to author
Forward
0 new messages