Andras Salamon created OOZIE-3422:
-------------------------------------

             Summary: Enhance logging of Oozie client connecting to the Oozie 
server
                 Key: OOZIE-3422
                 URL: https://issues.apache.org/jira/browse/OOZIE-3422
             Project: Oozie
          Issue Type: Improvement
    Affects Versions: 5.1.0
            Reporter: Andras Salamon
            Assignee: Andras Salamon


When the Oozie client tries to connect to the server and fails the error 
message is not always helpful.
{noformat}
$ oozie jobs -oozie http://thisisawrongurl                                      
                                                                                
                                                                                
                                                                                
                  
Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server. No 
of retries = 1. Exception = thisisawrongurl
{noformat}
A few examples with more helpful error messages:
{noformat}
$ 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
{noformat}
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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to