Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1182

Improve writeAuthToken exception when OOZIE_URL is improperly set without a URI.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.0
    • Fix Version/s: None
    • Component/s: client, security
    • Labels:
      None

      Description

      It would be good to improve the below exception to detect a improper URL
      in a secure Oozie environment, rather than flag it as a writeAuthToken failure

      [rjustice@cm1 ~]$ export OOZIE_URL=http://cm1.rgjustice.com:11000
      [rjustice@cm1 ~]$ oozie jobs -verbose -auth SIMPLE
      java.lang.NullPointerException
      at java.io.Writer.write(Writer.java:140)
      at org.apache.oozie.client.AuthOozieClient.writeAuthToken(AuthOozieClient.java:182)
      at org.apache.oozie.client.AuthOozieClient.createConnection(AuthOozieClient.java:137)
      at org.apache.oozie.client.OozieClient.validateWSVersion(OozieClient.java:243)
      at org.apache.oozie.client.OozieClient.createURL(OozieClient.java:344)
      at org.apache.oozie.client.OozieClient.access$000(OozieClient.java:76)
      at org.apache.oozie.client.OozieClient$ClientCallable.call(OozieClient.java:410)
      at org.apache.oozie.client.OozieClient.getJobsInfo(OozieClient.java:1154)
      at org.apache.oozie.cli.OozieCLI.jobsCommand(OozieCLI.java:1179)
      at org.apache.oozie.cli.OozieCLI.processCommand(OozieCLI.java:496)
      at org.apache.oozie.cli.OozieCLI.run(OozieCLI.java:466)
      at org.apache.oozie.cli.OozieCLI.main(OozieCLI.java:176)
      null

      [rjustice@cm1 ~]$ export OOZIE_URL=http://cm1.rgjustice.com:11000/oozie
      [rjustice@cm1 ~]$ oozie jobs -verbose -auth SIMPLE
      Error: AUTHENTICATION : Could not authenticate, Authentication failed, status: 401, message: Unauthorized

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rjustice Robert Justice
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: