Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-15596

Stack trace should not be printed out when running hadoop key commands

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.0
    • 3.2.0
    • common
    • None
    • Reviewed

    Description

      Stack trace is printed outĀ if any exception occurs while executing hadoop key commands. The whole stack trace should not be printed out.

      For example when the kms is down, we get this error message for the hadoop key list command:

       -bash-4.1$ hadoop key list
       Cannot list keys for KeyProvider: KMSClientProvider[http://example.com:16000/kms/v1/]: Connection refusedjava.net.ConnectException: Connection refused
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
       at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
       at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
       at java.net.Socket.connect(Socket.java:579)
       at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
       at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
       at sun.net.www.http.HttpClient.New(HttpClient.java:308)
       at sun.net.www.http.HttpClient.New(HttpClient.java:326)
       at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
       at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
       at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
       at org.apache.hadoop.security.authentication.client.KerberosAuthenticator.authenticate(KerberosAuthenticator.java:186)
       at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.authenticate(DelegationTokenAuthenticator.java:125)
       at org.apache.hadoop.security.authentication.client.AuthenticatedURL.openConnection(AuthenticatedURL.java:216)
       at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticatedURL.openConnection(DelegationTokenAuthenticatedURL.java:312)
       at org.apache.hadoop.crypto.key.kms.KMSClientProvider$1.run(KMSClientProvider.java:397)
       at org.apache.hadoop.crypto.key.kms.KMSClientProvider$1.run(KMSClientProvider.java:392)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.Subject.doAs(Subject.java:415)
       at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)
       at org.apache.hadoop.crypto.key.kms.KMSClientProvider.createConnection(KMSClientProvider.java:392)
       at org.apache.hadoop.crypto.key.kms.KMSClientProvider.getKeys(KMSClientProvider.java:479)
       at org.apache.hadoop.crypto.key.KeyShell$ListCommand.execute(KeyShell.java:286)
       at org.apache.hadoop.crypto.key.KeyShell.run(KeyShell.java:79)
       at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
       at org.apache.hadoop.crypto.key.KeyShell.main(KeyShell.java:513)
      

      Attachments

        1. HADOOP-15596.003.patch
          6 kB
          Kitti Nanasi
        2. HADOOP-15596.002.patch
          5 kB
          Kitti Nanasi
        3. HADOOP-15596.001.patch
          5 kB
          Kitti Nanasi

        Issue Links

          Activity

            People

              knanasi Kitti Nanasi
              knanasi Kitti Nanasi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: