You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Philip Zeyliger (JIRA)" <ji...@apache.org> on 2018/08/16 20:27:00 UTC

[jira] [Resolved] (IMPALA-7455) log4j2 can sneak into classpath and break logging

     [ https://issues.apache.org/jira/browse/IMPALA-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Zeyliger resolved IMPALA-7455.
-------------------------------------
    Resolution: Fixed

> log4j2 can sneak into classpath and break logging
> -------------------------------------------------
>
>                 Key: IMPALA-7455
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7455
>             Project: IMPALA
>          Issue Type: Task
>            Reporter: Philip Zeyliger
>            Priority: Major
>
> {{bin/set-classpath}} sets the classpath based on {{fe/target/dependency/*}} and uses a shell glob. These globs are sorted according to your locale settings. The sorting differs between the C locale and the {{en_US.UTF-8}} locale:
> {code}
> impdev@phiblip:~/Impala$ LC_ALL=en_US.UTF-8 bash -c 'echo fe/target/dependency/*' | tr ' ' '\n' | grep log4j
> fe/target/dependency/log4j-1.2.17.jar
> fe/target/dependency/log4j-1.2-api-2.8.2.jar
> fe/target/dependency/log4j-api-2.8.2.jar
> fe/target/dependency/log4j-core-2.8.2.jar
> fe/target/dependency/log4j-web-2.8.2.jar
> fe/target/dependency/slf4j-log4j12-1.7.25.jar
> impdev@phiblip:~/Impala$ LC_ALL=C bash -c 'echo fe/target/dependency/*' | tr ' ' '\n' | grep log4j
> fe/target/dependency/log4j-1.2-api-2.8.2.jar
> fe/target/dependency/log4j-1.2.17.jar
> fe/target/dependency/log4j-api-2.8.2.jar
> fe/target/dependency/log4j-core-2.8.2.jar
> fe/target/dependency/log4j-web-2.8.2.jar
> fe/target/dependency/slf4j-log4j12-1.7.25.jar
> {code}
> When the {{LC_ALL=C}} locale is in play, you get logs like the following in custom cluster tests:
> {code}
> $cat impalad.philip-dev.gce.cloudera.com.philip.log.ERROR.20180815-093713.22141
> Log file created at: 2018/08/15 09:37:13
> Running on machine: philip-dev.gce.cloudera.com
> Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
> E0815 09:37:13.841073 22141 logging.cc:121] stderr will be logged to this file.
> ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
> {code}
> What I think is going on is the following dependency pulled in via {{hive-exec}}:
> {code}
> [INFO] +- org.apache.hive:hive-exec:jar:2.1.1-cdh6.x-SNAPSHOT:compile
> [INFO] |  +- org.apache.logging.log4j:log4j-1.2-api:jar:2.8.2:compile
> {code}
> Impala configures log4j manually in {{GlogAppender.Install()}} that uses log4j-1.2 (and not log4j2) configuration.
> I'll be trying to rip out this dependency and see what happens.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org