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

[client] Enhance logging of Oozie client connecting to the Oozie server

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.0
    • Fix Version/s: 5.2.0
    • Component/s: client
    • Labels:
      None

      Description

      When the Oozie client tries to connect to the server and fails the error message is not always helpful.

      $ oozie jobs -oozie http://thisisawrongurl                                                                                                                                                                                                                                                                                                        
      Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server. No of retries = 1. Exception = thisisawrongurl
      

      A few examples with more helpful error messages:

      $ oozie jobs -oozie http://localhost:11001
      Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 1 sec. Retry count = 1
      Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 2 sec. Retry count = 2
      Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 4 sec. Retry count = 3
      Connection exception has occurred [ java.net.ConnectException Connection refused (Connection refused) ]. Trying after 8 sec. Retry count = 4
      Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server. No of retries = 4. Exception = Connection refused (Connection refused)
      
      $ oozie jobs -oozie http://localhost:11000/oozietypo
      Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server. No of retries = 1. Exception = Could not authenticate, Authentication failed, status: 404, message: Not Found
      

      It is not enought to print out the getMessage() of the Exception, we should also print out the full stack trace in the ConnectionRetriableClient class.

        Attachments

        1. OOZIE-3422-01.patch
          0.7 kB
          Andras Salamon

          Activity

            People

            • Assignee:
              asalamon74 Andras Salamon
              Reporter:
              asalamon74 Andras Salamon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: