You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When all services were started and the Kafka log is inspected with the help of docker logs adempiere-ui-gateway.kafka | less
The result is a recurrent exception, which is thrown constantly every 10 seconds, cluttering the log:
The exception and the 10 seconds stem from the docker compose Kafka healthcheck definition:
Luckily, this exception doesn't mark the container as unhealthy, but it makes the log unreadable and can cause confusion.
It is thus desirable to get rid of it.
According to Stackoverflow and other sites, Kafka doesn't accept HTTP requests, as GET, but only its own commands.
Here are some of the suggestions for a Kafka healthcheck:
The less invasive is the last one, which communicates with the Kafka server and gets __consumer_offsets, the only topic existing after creating the container:
When all services were started and the Kafka log is inspected with the help of
docker logs adempiere-ui-gateway.kafka | less
The result is a recurrent exception, which is thrown constantly every 10 seconds, cluttering the log:
The exception and the 10 seconds stem from the docker compose Kafka healthcheck definition:
Luckily, this exception doesn't mark the container as unhealthy, but it makes the log unreadable and can cause confusion.
It is thus desirable to get rid of it.
According to Stackoverflow and other sites, Kafka doesn't accept HTTP requests, as GET, but only its own commands.
Here are some of the suggestions for a Kafka healthcheck:
Suggestion # 1: create a topic, read and delete it
test: ["CMD-SHELL", "echo 'test-message' | /usr/bin/kafka-console-producer --broker-list localhost:9092 --topic adempiere-test-health-check-topic && /usr/bin/kafka-console-consumer --bootstrap-server localhost:9092 --topic adempiere-test-health-check-topic --from-beginning --max-messages 1 | grep 'test-message' & /usr/bin/kafka-topics --bootstrap-server localhost:9092 --delete --topic adempiere-test-health-check-topic"]
Suggestion # 2: create a topic and read it
test: ["CMD-SHELL", "echo 'test-message' | /usr/bin/kafka-console-producer --broker-list localhost:9092 --topic adempiere-test-health-check-topic && /usr/bin/kafka-console-consumer --bootstrap-server localhost:9092 --topic adempiere-test-health-check-topic --from-beginning --max-messages 1 | grep 'test-message' "]
Suggestion # 3: call a command
test: [ "CMD-SHELL", "/usr/bin/kafka-broker-api-versions --bootstrap-server localhost:9092" ]
Suggestion # 4: list existig topics
test: [ "CMD-SHELL", "/usr/bin/kafka-topics --bootstrap-server localhost:9092 --list "]
The less invasive is the last one, which communicates with the Kafka server and gets __consumer_offsets, the only topic existing after creating the container:
The text was updated successfully, but these errors were encountered: