Skip to content
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

Merged
merged 3 commits into from
Feb 1, 2018

Conversation

@joel-hamill joel-hamill changed the title Joel hamill/fix elastic docs 208 [WIP] DOCS-208 - Connect Elastic Quickstart not working Jan 17, 2018
@joel-hamill joel-hamill changed the title [WIP] DOCS-208 - Connect Elastic Quickstart not working DOCS-208 - Connect Elastic Quickstart not working Jan 17, 2018
@joel-hamill joel-hamill force-pushed the joel-hamill/fix-elastic-DOCS-208 branch from 1d85dca to 3c82675 Compare January 17, 2018 21:40
@joel-hamill
Copy link
Contributor Author

@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
@joel-hamill joel-hamill force-pushed the joel-hamill/fix-elastic-DOCS-208 branch from 3c82675 to 14259dd Compare January 17, 2018 22:22
@kaiwaehner
Copy link

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

@joel-hamill
Copy link
Contributor Author

joel-hamill commented Jan 18, 2018

@kaiwaehner

I did not start it using Confluent CLI and distributed mode.

in your comments here didn't you use the CLI to start Schema Registry; and start Kafka Connect as standalone? my instructions are:

  1. Start Schema Registry, Kafka, ZK using the CLI
  2. Start Kafka Connect as standalone
    ...

@joel-hamill joel-hamill force-pushed the joel-hamill/fix-elastic-DOCS-208 branch from 011ef61 to c933bf3 Compare January 18, 2018 22:58
@ewencp ewencp requested a review from a team January 19, 2018 00:09
@ewencp
Copy link
Contributor

ewencp commented Jan 19, 2018

@joel-hamill I tagged the connect team for review, they should be able to help review and get this into a good state.

@kkonstantine
Copy link
Member

kkonstantine commented Jan 19, 2018

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 connect-standalone that we should remove it. But what is wrong with using the CLI from start to finish like we do with our other connectors?

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.

Copy link
Member

@kkonstantine kkonstantine left a 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.


.. sourcecode:: bash
$ confluent start schema-registry
Copy link
Member

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

Copy link
Contributor Author

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).


$ confluent start
#. Start Schema Registry using the Confluent CLI. This also starts its dependencies, |zk| and Kafka.
Copy link
Member

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

kafka is [UP]
Starting schema-registry
schema-registry is [UP]

Copy link
Member

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

Copy link
Contributor Author

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).

schema-registry is [UP]


#. Start Kafka Connect as a standalone service. Do not use the Confluent CLI.
Copy link
Member

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.


.. sourcecode:: bash

[2018-01-17 10:37:08,097] INFO Kafka Connect standalone worker initializing ... (org.apache.kafka.connect.cli.ConnectStandalone:65)
Copy link
Member

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.


Next, start the Avro console producer to import a few records to Kafka:
<path-to-confluent>/bin/connect-standalone \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not apply now.

"type": null
}

.. tip:: For non-CLI users, you can load the Elasticsearch connector with this command:
Copy link
Member

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'
Copy link
Member

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).

Copy link
Contributor Author

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


.. sourcecode:: bash

{
Copy link
Member

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"
        }
      }
    ]
  }
}

@kaiwaehner
Copy link

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.

@joel-hamill
Copy link
Contributor Author

@kaiwaehner @kkonstantine is there a known Elastic issue for 6.x that i can link to for more information?

@joel-hamill joel-hamill force-pushed the joel-hamill/fix-elastic-DOCS-208 branch from e37b8e2 to 64deef8 Compare February 1, 2018 21:46
Copy link
Member

@kkonstantine kkonstantine left a 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.

@joel-hamill joel-hamill merged commit f02ec4d into 3.3.0-post Feb 1, 2018
@joel-hamill joel-hamill deleted the joel-hamill/fix-elastic-DOCS-208 branch February 1, 2018 21:50
@rayokota
Copy link
Member

This is fixed with #169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants