confluentinc / cp-demo

Confluent Platform Demo including Apache Kafka, ksqlDB, Control Center, Schema Registry, Security, Schema Linking, and Cluster Linking
Apache License 2.0
38 stars 322 forks source link

Docker commands in helper functions.sh need "-T" to properly pipe to jq #415

Closed chuck-confluent closed 2 years ago

chuck-confluent commented 2 years ago

Description

The check_connector_status_running isn't properly parsing whether the connector is running, causing the start script to timeout. Same problem with host_check_schema_registered. The solution is to add the -T option to the docker-compose exec commands to disable teletype so the output is properly sent as stdout to the jq command. See this stackoverflow comment.

Here is an example where start.sh times out while retrying:

Start streaming from the Wikipedia SSE source connector:
...
{"name":"wikipedia-sse","connector":{"state":"RUNNING","worker_id":"connect:8083"},"tasks":[{"id":0,"state":"RUNNING","worker_id":"connect:8083"}],"type":"source"}

Troubleshooting After adding the -T flag to the various docker-compose exec commands in functions.sh fixed the issue and CP Demo was able to start normally. PR incoming.

Environment