Open rspurgeon opened 4 years ago
By default, ksql-server-start
configures log4j with the config/log4j-rolling.properties
file, which writes output to ${ksql.log.dir}/ksql.log
.
To access the logging you're after, you can use:
tail -f logs/ksql.log
in a separate terminal, orKSQL_LOG4J_OPTS="-Dlog4j.configuration=file:config/log4j.properties" bin/ksql-server-start config/ksql-server.properties
to use log4j settings that write to stdout in the same terminal.In both cases, the expected output for the invalid broker scenario should log:
[2020-03-06 08:06:26,774] WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient:762)
@rspurgeon could you point to the documentation you were looking at? We can clarify the behavior there.
Oh, I remembered you referenced CONTRIBUTING.md in the #ksqldb-dev community slack thread. There is a relevant line there:
Check the logs folder for the log files that the server writes including any errors.
Do you have any suggestions for making this stand out more?
@colinhicks Thanks, I see that log now. I changed the title of this issue and removed the bug label and changed it to a UX issue instead. IMO we would want to show a runner of the service on the CLI a message that broker connection failed.
Description When starting ksqlDB via
bin/ksql-server config/ksql-server.properties
as documented, and the Kafka broker is unreachable for any reason, ksqlDB will print minimal log4j 'headers', hang for a significant period of time, then the process will die with no meaningful debugging output.To Reproduce
bootstrap.servers=localhost:12345
, wherelocalhost:12345
is a non-existent kafka broker../bin/ksql-server config/ksql-server.properties
(not in daemon mode to see the loggign)Expected behavior I would expect to see logging output to indicate that ksqlDB is attempting and unable to connect to a valid broker.
Actual behaviour