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

Elasticsearch connector fails to start - timing issue? #233

Open
rmoff opened this issue Jul 2, 2020 · 0 comments
Open

Elasticsearch connector fails to start - timing issue? #233

rmoff opened this issue Jul 2, 2020 · 0 comments

Comments

@rmoff
Copy link
Contributor

rmoff commented Jul 2, 2020

cp-demo 5.5.1
Startup from scratch using ./scripts/start.sh

elasticsearch-ksqldb connector fails to start. Worker log shows

HttpHostConnectException: Connect to elasticsearch:9200 [elasticsearch/192.168.128.11] failed: Connection refused (Connection refused)

Elasticsearch is running, and if I restart the connector it comes up fine, so I guess this is a timing error.

docker-compose exec connect curl -X POST --cert /etc/kafka/secrets/connect.certificate.pem --key /etc/kafka/secrets/connect.key --tlsv1.2 --cacert /etc/kafka/secrets/snakeoil-ca-1.crt -u superUser:superUser https://connect:8083/connectors/elasticsearch-ksqldb/tasks/0/restart

Starts fine:

docker-compose exec connect curl -X GET --cert /etc/kafka/secrets/connect.certificate.pem --key /etc/kafka/secrets/connect.key --tlsv1.2 --cacert /etc/kafka/secrets/snakeoil-ca-1.crt -u superUser:superUser https://connect:8083/connectors/elasticsearch-ksqldb/status | jq -r ".connector.state, .tasks[].state"
RUNNING
RUNNING

To avoid this problem the startup script could poll Elasticsearch for readiness e.g. / e.g.

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

No branches or pull requests

1 participant