Giter VIP home page Giter VIP logo

Comments (14)

DarioBalinzo avatar DarioBalinzo commented on July 24, 2024 2

Hi @nmousouros,
I was waiting for a confirmation about the feature request.
Thanks for sharing the other connector link, it will help me during the development.

I think that now I can start the development.

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024 1

Hi @DarioBalinzo ,
I think I have to ask my question precisely.
I am not talking about the SSL error while connecting to broker.
I am getting SSL error while connecting to Elasticsearch when the source connector makes connection to Elasticsearch, which is running over HTTPS.
So I am taking about ""es.scheme. If I use es.scheme-https then there is no provision to use truststore.

from kafka-connect-elasticsearch-source.

DarioBalinzo avatar DarioBalinzo commented on July 24, 2024

Hi,
please try configuring the port as integer and not as string:
changing
es.port = "9200"
to
es.port = 9200

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024

After changing it to an integre, it gives me below error.
Elasticsearch instance is running well on given host and port and I can connect using CURL.

Is there any problem of HTTPS/HTTP?
My Elasticsearch is runnong over HTTPS. I am using HTTP scheme in connector config because I didnt find any SSL config options in documentation.

[2021-05-12 19:30:46,241] ERROR error in searching index names (com.github.dariobalinzo.elastic.ElasticRepository:105)
[2021-05-12 19:30:46,242] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:121)
java.lang.RuntimeException: java.net.UnknownHostException: "myhost.uat.com": Name or service not known
at com.github.dariobalinzo.elastic.ElasticRepository.catIndices(ElasticRepository.java:106)
at com.github.dariobalinzo.ElasticSourceConnector.taskConfigs(ElasticSourceConnector.java:98)
at org.apache.kafka.connect.runtime.Worker.connectorTaskConfigs(Worker.java:319)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.recomputeTaskConfigs(StandaloneHerder.java:303)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.updateConnectorTasks(StandaloneHerder.java:329)
at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:214)
at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:115)
Caused by: java.net.UnknownHostException: "myhost.uat.com": Name or service not known

from kafka-connect-elasticsearch-source.

DarioBalinzo avatar DarioBalinzo commented on July 24, 2024

If you need to use https you can set this:
es.scheme = https

I will document better in the connector documentation

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024

from kafka-connect-elasticsearch-source.

DarioBalinzo avatar DarioBalinzo commented on July 24, 2024

Looking at the description: UnknownHostException: "myhost.uat.com": Name or service not known maybe the error is related to dns name resolution?
Can you connect using curl on the same machine where the connector is deployed?

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024

Hi @DarioBalinzo
I found the problem of UnknonHostExcpetion.
Actually I am using configuration with key value pair separated with '='
It doesnt accept hostname in double quote. So removing double quote it makes http connection with Elasticsearch.
However, since elasticsearch running on HTTPS, connection get closed and it prints in the log that connetion is closed.
I can see in Elasticsearch logs that request came from remote host and its closed.

Then I set the es.scheme=https. Once I restart, it throws "PKIX path builfing error......... Unbale to find valid certification path"

Of-course it will throw this error because we didnt provide any valid root-ca or truststore.
Is it possible to configure truststore location, password and TLS protocol scheme?

regards,
Sunil.

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024

Hi @DarioBalinzo ,
any setting to provide certification paths?

from kafka-connect-elasticsearch-source.

DarioBalinzo avatar DarioBalinzo commented on July 24, 2024

Hi @sunilmchaudhari ,
for the truststore I think you should look at the general kafka connect config, since they are not related to a single connector. Maybe you can find some info here or in the Kafka/Confluent documentation:
https://docs.confluent.io/platform/current/kafka/authentication_ssl.html#kconnect-long

from kafka-connect-elasticsearch-source.

DarioBalinzo avatar DarioBalinzo commented on July 24, 2024

It is possible to customize the settings related to https using the elasticsearch client.
I think that you need something similar to this: (e.g. the path of a custom truststore)
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_encrypted_communication.html

I will try to add this configuration to the connector in few days.

from kafka-connect-elasticsearch-source.

nmousouros avatar nmousouros commented on July 24, 2024

Hi @DarioBalinzo,

Any progress on that? We have the option indeed, to set those with the sink connector. ( https://github.com/ibm-messaging/kafka-connect-elastic-sink)

from kafka-connect-elasticsearch-source.

sunilmchaudhari avatar sunilmchaudhari commented on July 24, 2024

from kafka-connect-elasticsearch-source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.