Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3059

ssl-server.xml causes NullPointer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.1
    • 2.8.0, 3.0.0-alpha1
    • datanode, security

    Description

      If ssl is enabled (dfs.https.enable) but ssl-server.xml is not available, a DN will crash during startup while setting up an SSL socket with a NullPointerException:

      12/03/07 17:08:36 DEBUG security.Krb5AndCertsSslSocketConnector: useKerb = false, useCerts = true
      jetty.ssl.password : jetty.ssl.keypassword : 12/03/07 17:08:36 INFO mortbay.log: jetty-6.1.26.cloudera.1
      12/03/07 17:08:36 INFO mortbay.log: Started SelectChannelConnector@p-worker35.alley.sara.nl:1006
      12/03/07 17:08:36 DEBUG security.Krb5AndCertsSslSocketConnector: Creating new KrbServerSocket for: 0.0.0.0
      12/03/07 17:08:36 WARN mortbay.log: java.lang.NullPointerException
      12/03/07 17:08:36 WARN mortbay.log: failed Krb5AndCertsSslSocketConnector@0.0.0.0:50475: java.io.IOException: !JsseListener: java.lang.NullPointerException
      12/03/07 17:08:36 WARN mortbay.log: failed Server@604788d5: java.io.IOException: !JsseListener: java.lang.NullPointerException
      12/03/07 17:08:36 INFO mortbay.log: Stopped Krb5AndCertsSslSocketConnector@0.0.0.0:50475
      12/03/07 17:08:36 INFO mortbay.log: Stopped SelectChannelConnector@p-worker35.alley.sara.nl:1006
      12/03/07 17:08:37 INFO datanode.DataNode: Waiting for threadgroup to exit, active threads is 0

      The same happens if I set an absolute path to an existing dfs.https.server.keystore.resource - in this case the file cannot be found but not even a WARN is given.

      Since in dfs.https.server.keystore.resource we know we need to have 4 properties specified (ssl.server.truststore.location, ssl.server.keystore.location, ssl.server.keystore.password, and ssl.server.keystore.keypassword) we should check if they are set and throw an IOException if they are not.

      Attachments

        1. HDFS-3059.02.patch
          2 kB
          Allen Wittenauer
        2. HDFS-3059.03.patch
          2 kB
          Ravi Prakash
        3. HDFS-3059.04.patch
          6 kB
          Xiao Chen
        4. HDFS-3059.05.patch
          6 kB
          Xiao Chen
        5. HDFS-3059.06.patch
          6 kB
          Xiao Chen
        6. HDFS-3059.07.patch
          8 kB
          Xiao Chen
        7. HDFS-3059.08.patch
          9 kB
          Xiao Chen
        8. HDFS-3059.patch
          1.0 kB
          Evert Lammerts
        9. HDFS-3059.patch.2
          2 kB
          Evert Lammerts
        10. HDFS-3059-branch2.patch
          9 kB
          Xiao Chen

        Issue Links

          Activity

            People

              xiaochen Xiao Chen
              evertlammerts Evert Lammerts
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: