-
Notifications
You must be signed in to change notification settings - Fork 432
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
DOCS-208 - Connect Elastic Quickstart not working #166
Conversation
1d85dca
to
3c82675
Compare
@ewencp @kaiwaehner i haven't been able to actually get this to work locally. can you take a look? the staging server is here. |
[WIP] DOCS-208 - Connect Elastic Quickstart not working WIP
3c82675
to
14259dd
Compare
Hi Joel, I checked your link... I can only confirm that it worked for me using standalone mode started via regular Kafka script. I did not start it using Confluent CLI and distributed mode. I think this did not work for me either (IIRC). Also not sure, but probably best to start Elastic as first step (not sure if you did)... Kai |
in your comments here didn't you use the CLI to start Schema Registry; and start Kafka Connect as standalone? my instructions are:
|
011ef61
to
c933bf3
Compare
@joel-hamill I tagged the connect team for review, they should be able to help review and get this into a good state. |
Why are we advising in the quickstart to use a mix of CLI and connect-standalone? My impression is that the old quickstart just contained a stray reference to Asking just before I try to run the quickstart again with the CLI. I believe that if there's something buggy there we just need to fix that, instead of using standalone connect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just ran the quickstart. My understanding is that the CLI is not the problem.
The problem is compatibility with ES 6.x.x.
If I use ES 5.x.x the quickstart works as it used to. Given that, I've added suggestions inline, but that's the main caveat currently.
docs/elasticsearch_connector.rst
Outdated
|
||
.. sourcecode:: bash | ||
$ confluent start schema-registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should start everything with the CLI. Here we just need:
$ confluent start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CP installed and running is now listed as a prerequisite (like the other quick starts).
docs/elasticsearch_connector.rst
Outdated
|
||
$ confluent start | ||
#. Start Schema Registry using the Confluent CLI. This also starts its dependencies, |zk| and Kafka. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have here what we have for the other connectors, letting users know that the need to start all services with the CLI
docs/elasticsearch_connector.rst
Outdated
kafka is [UP] | ||
Starting schema-registry | ||
schema-registry is [UP] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to include startup message for kafka-rest
and connect
, as shown when we run confluent start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CP installed and running is now listed as a prerequisite (like the other quick starts).
docs/elasticsearch_connector.rst
Outdated
schema-registry is [UP] | ||
|
||
|
||
#. Start Kafka Connect as a standalone service. Do not use the Confluent CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove or mention that we start everything with the CLI.
docs/elasticsearch_connector.rst
Outdated
|
||
.. sourcecode:: bash | ||
|
||
[2018-01-17 10:37:08,097] INFO Kafka Connect standalone worker initializing ... (org.apache.kafka.connect.cli.ConnectStandalone:65) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This output won't apply when the CLI is used to start the Connect worker.
docs/elasticsearch_connector.rst
Outdated
|
||
Next, start the Avro console producer to import a few records to Kafka: | ||
<path-to-confluent>/bin/connect-standalone \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not apply now.
docs/elasticsearch_connector.rst
Outdated
"type": null | ||
} | ||
|
||
.. tip:: For non-CLI users, you can load the Elasticsearch connector with this command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: Maybe mention that we use standalone mode? Because there's also distributed (without CLI) that loads the connector hitting the REST endpoint (commonly with a curl command).
If you don't think we overstress the meaning in the sentence this could be:
For non-CLI users, you can load the Elasticsearch connector by running Connect in standalone mode with this command:
or similar.
|
||
.. sourcecode:: bash | ||
|
||
$ curl -XGET 'http://localhost:9200/test-elasticsearch-sink/_search?pretty' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the caveat, and probably why it didn't work for others so far.
This example (the three records above) work with the connector when elasticsearch is of version 5.x.x (tried it with 5.6.6). With version 6.x.x (tried 6.1.2) we are hitting this issue: #154
Somehow we need to make this quickstart functional before we fix the issue above. That's either by mentioning the compatibility with ES 5 only or by changing the example not to use string types (which is not great if the users attempt to extend their examples following this quickstart and try string types later on).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will add the limitation to version 5.x.x
docs/elasticsearch_connector.rst
Outdated
|
||
.. sourcecode:: bash | ||
|
||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output I had after successfully running the connector with ES 5.6.6 was:
curl -XGET 'http://localhost:9200/test-elasticsearch-sink/_search?pretty'
{
"took" : 39,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 3,
"max_score" : 1.0,
"hits" : [
{
"_index" : "test-elasticsearch-sink",
"_type" : "kafka-connect",
"_id" : "test-elasticsearch-sink+0+0",
"_score" : 1.0,
"_source" : {
"f1" : "value1"
}
},
{
"_index" : "test-elasticsearch-sink",
"_type" : "kafka-connect",
"_id" : "test-elasticsearch-sink+0+2",
"_score" : 1.0,
"_source" : {
"f1" : "value3"
}
},
{
"_index" : "test-elasticsearch-sink",
"_type" : "kafka-connect",
"_id" : "test-elasticsearch-sink+0+1",
"_score" : 1.0,
"_source" : {
"f1" : "value2"
}
}
]
}
}
Yeah, I just used a mix of CLI and standalone as the other one did not work :-) Agree that we should use CLI for all... Much better experience. I think using Elastic 5 for now is fine for the quickstart. (highlighting that Elastic 6 does not work until an open issue is solved so that other do not try this out for hours) We could move to Elastic 6 when the bug kkonstantine mentioned is fixed. |
@kaiwaehner @kkonstantine is there a known Elastic issue for 6.x that i can link to for more information? |
e37b8e2
to
64deef8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after recent changes.
This is fixed with #169 |
https://confluentinc.atlassian.net/browse/DOCS-208
Staging server http://staging-docs.confluent.io.s3-website-us-west-2.amazonaws.com/PR/693/3.3.0/connect/connect-elasticsearch/docs/elasticsearch_connector.html#quick-start