Hi Eyal,

Sounds trivial, but can you verify that the file actually exists in
/opt/flink/conf/log4j-console.properties? Also, verify that the user
running the process has read permissions to that file.
You said you use Flink in YARN mode, but the the example above you run
inside a docker image so this is a bit confusing. Notice that the official
docker images run as "flink" user and group ids.

If you wish to try to use Logback instead, you can place you logback.xml
file as part of your project resources folder to include it in the
classpath. That should automatically get detected on startup.

Hope this helps,
Rafi


On Tue, Mar 10, 2020 at 1:42 PM Eyal Pe'er <eyal.p...@startapp.com> wrote:

> Hi,
>
> I am running Flink in YARN mode using the official image with few
> additional files.
>
> I’ve noticed that my logger failed to initialize:
>
>
>
> root:~# docker logs flink-task-manager
>
> Starting taskexecutor as a console application on host ***.
>
> log4j:WARN No appenders could be found for logger
> (org.apache.flink.runtime.taskexecutor.TaskManagerRunner).
>
> log4j:WARN Please initialize the log4j system properly.
>
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
> more info.
>
>
>
> I followed the documentation
> <https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/logging.html>
> and seems like all related configuration files exist.
>
> Currently, I am using the default files from the official image
> https://github.com/apache/flink/tree/master/flink-dist/src/main/flink-bin/conf
>
>
>
> In addition, seems like the process got the right parameters:
>
> root     21892 21866  1 08:29 ?        00:02:06
> /usr/local/openjdk-8/bin/java -XX:+UseG1GC
> -Dlog4j.configuration=file:/opt/flink/conf/log4j-console.properties
> -Dlogback.configurationFile=file:/opt/flink/conf/logback-console.xml
> -classpath
> /opt/flink/lib/flink-metrics-prometheus-1.9.2.jar:/opt/flink/lib/flink-table-blink_2.11-1.9.2.jar:/opt/flink/lib/flink-table_2.11-1.9.2.jar:/opt/flink/lib/log4j-1.2.17.jar:/opt/flink/lib/slf4j-log4j12-1.7.15.jar:/opt/flink/lib/flink-dist_2.11-1.9.2.jar:::
> org.apache.flink.runtime.taskexecutor.TaskManagerRunner --configDir
> /opt/flink/conf
>
>
>
> What am I doing wrong ? How can I turn logger on?
>
> Best regards
>
> Eyal Peer
>

Reply via email to