chia7712 commented on PR #17373: URL: https://github.com/apache/kafka/pull/17373#issuecomment-2508123859
@frankvicky In the end-to-end tests, you must use the correct file extension when passing the log4j2 YAML configuration. If you use an incorrect extension - for example - the output of `LOG.error` called by the console consumer gets redirected to `console_consumer.stdout`. This is the root cause of the connection error as it see output which should not be existent. As a straightforward solution, we can render the configuration file based on the specific node version. ``` args['log4j_param'] = get_log4j_config_param(node) args['log4j_config'] = get_log4j_config_for_tools(node) ... # Create and upload log properties log_config = self.render(get_log4j_config_for_tools(node), log_file=ConsoleConsumer.LOG_FILE) node.account.create_file(get_log4j_config_for_tools(node), log_config) ``` noted that `LOG4J_CONFIG` can be removed as we don't use it anymore. Additionally, you can apply this approach to all py files - such as `verifiable_producer.py`, `kafka.py`, `transactional_message_copier.py`, `consumer_performance.py`, `end_to_end_latency.py`, and `producer_performance.py`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org