Sumit Mohanty created AMBARI-2267:
-------------------------------------

             Summary: BE does not handle empty version numbers from agent 
properly
                 Key: AMBARI-2267
                 URL: https://issues.apache.org/jira/browse/AMBARI-2267
             Project: Ambari
          Issue Type: Bug
          Components: controller
    Affects Versions: 1.2.4
            Reporter: Sumit Mohanty
            Assignee: Sumit Mohanty
             Fix For: 1.2.4


When agent does not send a properly formatted version number (or empty) the 
error reported is:
{code}
16:28:23,253  WARN ServletHandler:514 - 
/agent/v1/register/ab6-hddn-lab-01.corp.ads
java.lang.IllegalArgumentException: version2 cannot be null or empty
        at 
org.apache.ambari.server.utils.VersionUtils.compareVersions(VersionUtils.java:40)
        at 
org.apache.ambari.server.utils.VersionUtils.areVersionsEqual(VersionUtils.java:86)
        at 
org.apache.ambari.server.utils.VersionUtils.areVersionsCompatible(VersionUtils.java:99)
        at 
org.apache.ambari.server.agent.HeartBeatHandler.handleRegistration(HeartBeatHandler.java:395)
        at 
org.apache.ambari.server.agent.rest.AgentResource.register(AgentResource.java:81)
        at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
{code}

The above log does not make it easy to debug the problem. We need to make the 
following improvements:
* Have the error logged as ERROR and not Warning
* Handle the error gracefully with a proper message

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to