You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bigtop.apache.org by "Kengo Seki (Jira)" <ji...@apache.org> on 2021/03/01 01:19:00 UTC

[jira] [Commented] (BIGTOP-3508) Sqoop bin script doesn't work on Debian 10 if libslf4j-java is installed

    [ https://issues.apache.org/jira/browse/BIGTOP-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17292557#comment-17292557 ] 

Kengo Seki commented on BIGTOP-3508:
------------------------------------

Thank you for the confirmation [~elukey]!
How about removing the /usr/share/java directory from classpath and adding some notes about this change so that users can address it themselves? We will have similar pages to https://cwiki.apache.org/confluence/display/BIGTOP/Bigtop+1.5.0+Release and https://cwiki.apache.org/confluence/display/BIGTOP/Overview+of+Bigtop+1.5.0+Support+Matrix when publishing the 3.0.0 release, and I think they are suitable for such notification.
If it's OK for you, would you submit a PR?

> Sqoop bin script doesn't work on Debian 10 if libslf4j-java is installed
> ------------------------------------------------------------------------
>
>                 Key: BIGTOP-3508
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-3508
>             Project: Bigtop
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>            Reporter: Luca Toscano
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hi everybody,
> The sqoop's default bin script (created via install_sqoop.sh afaics) leads to the following error on Debian 10 if libslf4j-java is installed:
> {code}
>  SLF4J: Class path contains multiple SLF4J bindings.
>  SLF4J: Found binding in [jar:file:/usr/lib/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/share/java/maven3-slf4j-provider.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/share/java/slf4j-jcl.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/share/java/slf4j-jdk14.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/share/java/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/share/java/slf4j-nop.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/share/java/slf4j-simple.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: Found binding in [jar:file:/usr/lib/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>  SLF4J: See [http://www.slf4j.org/codes.html#multiple_bindings] for an explanation.
>  SLF4J: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. 
>  SLF4J: See also [http://www.slf4j.org/codes.html#log4jDelegationLoop] for more details.
>  Exception in thread "main" java.lang.ExceptionInInitializerError
>  at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:72)
>  at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:45)
>  at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
>  at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
>  at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
>  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
>  at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
>  at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:671)
>  at org.apache.sqoop.Sqoop.<clinit>(Sqoop.java:42)
>  Caused by: java.lang.IllegalStateException: Detected both log4j-over-slf4j.jar AND bound slf4j-log4j12.jar on the class path, preempting StackOverflowError. See also [http://www.slf4j.org/codes.html#log4jDelegationLoop] for more details.
>  at org.slf4j.impl.Log4jLoggerFactory.<clinit>(Log4jLoggerFactory.java:54)
>  ... 9 more
> {code}
> The issue seems to be this bit of code:
> {code}
>  SQOOP_JARS=\`ls /var/lib/sqoop/*.jar /usr/share/java/*.jar 2>/dev/null\`
> {code}
> Since it blindly loads jars from /usr/share/java, and on Debian 10 I have:
> {code}
>  elukey@stat1004:~$ ls /var/lib/sqoop/*.jar /usr/share/java/*.jar 2>/dev/null | tr " " "\n" | grep log4j
>  /usr/share/java/log4j-over-slf4j-1.7.25.jar
>  /usr/share/java/log4j-over-slf4j.jar
>  /usr/share/java/slf4j-log4j12-1.7.25.jar
>  /usr/share/java/slf4j-log4j12.jar
> {code}
> If I remove `/usr/share/java/log4j-over-slf4j.jar` the issue is gone, since the /usr/share/java/log4j-over-slf4j-1.7.25.jar is a symlink to it. The jars are brought by the libslf4j-java package.
> I added a more detailed description in [https://phabricator.wikimedia.org/T274866#6843187].
> Should we filter the SQOOP_JARS jar list for this use case, or do you have a better idea?
> Thanks in advance :)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)