[
https://issues.apache.org/jira/browse/AMBARI-2267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mahadev konar updated AMBARI-2267:
----------------------------------
Description:
When agent does not send a properly formatted version number (e.g. empty) the
warning reported in the server log is:
{code}
16:28:23,253 WARN ServletHandler:514 - /agent/v1/register/hostname-xxx
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 WARN
* Handle the error gracefully with a proper message explaining the problem
was:
When agent does not send a properly formatted version number (e.g. empty) the
warning reported in the server log 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 WARN
* Handle the error gracefully with a proper message explaining the problem
> During registrations, ambari server does not properly handle empty version
> numbers from agent
> ---------------------------------------------------------------------------------------------
>
> 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.5
>
> Attachments: AMBARI-2267.patch
>
>
> When agent does not send a properly formatted version number (e.g. empty) the
> warning reported in the server log is:
> {code}
> 16:28:23,253 WARN ServletHandler:514 - /agent/v1/register/hostname-xxx
> 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 WARN
> * Handle the error gracefully with a proper message explaining the problem
--
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