Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-47796

Spark Session is not created for spark-2.1.1 when log4j is migrated from 1.* to 2.17.1 to fix the security issue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Workaround
    • 2.1.1
    • 2.1.1
    • Spark Shell, Spark Submit
    • None

    Description

      Spark Download Link: https://archive.apache.org/dist/spark/spark-2.1.1/spark-2.1.1-bin-hadoop2.7.tgz

      log4j Migration: 

      https://logging.apache.org/log4j/2.x/manual/migration.html

      The spark creation is not happening .

      Below is the exception:

      1.exception.png (Attached)

      When  analyzed further found that the class file “RendererMap“ is not at all present in the bridge jar.

      log4j-1.2.17 

      2.log4j1.png (Attached)

       ** log4j-1.2-api-2.17.1.jar (Bridge jar)

      3.log4j-2.png (Attached)

      Following the migration steps in https://logging.apache.org/log4j/2.x/manual/migration.html

      We are simply replacing the

      Jar: /usr/local/spark/jars/log4j-1.2.17.jar

      With:

      • log4j-1.2-api-2.17.1.jar
      • log4j-api-2.17.1.jar
      • log4j-core-2.17.1.jar

      similar to what we had done 2 years back for version spark 2.1.3 version for which we were not downloading the spark zip on fly ,but we already had a downloaded zip on which we applied the patching changes. That seemed to work for 2.1.3 but for an older version where we are downloading the tar.gz now i.e 2.1.1, there seems to be an issue.

      Looking for a right resolution in this regard. Kindly let us know if any further information is required.

      FYI, Some of the various things tried:

      1. Upgrading the bridge ,api ,core jar to 2.17.2 and even to the latest
      2. Replaced the two slf4j jars with higher version : ex. slf4j-api-1.7.25.jar slf4j-log4j12-1.7.25.jar
      3. Adding a log4j.properties file from the template available.

      Attachments

        1. 1.exception.png
          222 kB
          Mahima Khatri
        2. 2.log4j1.png
          52 kB
          Mahima Khatri
        3. 3.log4j-2.png
          51 kB
          Mahima Khatri

        Activity

          People

            Unassigned Unassigned
            Mahima Mahima Khatri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: