[jira] [Commented] (AMBARI-22891) Logging improvement during the Upgrade when there is invalid Alert definition

2018-02-13 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16362971#comment-16362971
 ] 

Hudson commented on AMBARI-22891:
-

FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #8722 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/8722/])
AMBARI-22891 : Logging improvement during the Upgrade when there is (swagle: 
[https://gitbox.apache.org/repos/asf?p=ambari.git=commit=6d1dc6c4e5baa5b8044806ef0c29f6d15050d70e])
* (edit) 
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java


> Logging improvement during the Upgrade when there is invalid Alert definition
> -
>
> Key: AMBARI-22891
> URL: https://issues.apache.org/jira/browse/AMBARI-22891
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.6.1
>Reporter: amarnath reddy pappu
>Assignee: amarnath reddy pappu
>Priority: Major
>  Labels: pull-request-available
> Fix For: 2.6.2
>
> Attachments: AMBARI-22891.txt
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> If there is invalid definition/json in alert definition then Upgrade would 
> fail with below exception. there is no way to determine which alert is 
> causing the issue here.
> its not clear how this alert definition gets corrupted but we have seen this 
> with 3 to 4 customers already - printing the alert definition name would he 
> helpful in support point of view to determine the root cause.. other wise it 
> is very difficult to find it out - had a give a dev patch to customers to 
> find it out.
> {noformat}
> 29 Jan 2018 19:58:50,173 ERROR [main] AlertDefinitionFactory:199 - Unable to 
> deserialize the alert definition source during coercion
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected STRING but was BEGIN_OBJECT
>   at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
>   at com.google.gson.Gson.fromJson(Gson.java:795)
>   at com.google.gson.Gson.fromJson(Gson.java:859)
>   at com.google.gson.Gson$2.deserialize(Gson.java:131)
>   at 
> org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:373)
>   at 
> org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:313)
>   at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
>   at com.google.gson.Gson.fromJson(Gson.java:795)
>   at com.google.gson.Gson.fromJson(Gson.java:761)
>   at com.google.gson.Gson.fromJson(Gson.java:710)
>   at com.google.gson.Gson.fromJson(Gson.java:682)
>   at 
> org.apache.ambari.server.state.alert.AlertDefinitionFactory.coerce(AlertDefinitionFactory.java:196)
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1150)
>   at 
> org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46)
>   at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:946)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:450)
> Caused by: java.lang.IllegalStateException: Expected STRING but was 
> BEGIN_OBJECT
>   at 
> com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154)
>   at 
> com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:349)
>   at 
> com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:337)
>   at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>   at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>   ... 16 more
> 29 Jan 2018 19:58:50,176 ERROR [main] SchemaUpgradeHelper:239 - Upgrade 
> failed. 
> java.lang.NullPointerException
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1163)
>   at 
> org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46)
>   at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:946)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:450)
> 29 Jan 

[jira] [Commented] (AMBARI-22891) Logging improvement during the Upgrade when there is invalid Alert definition

2018-02-05 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/AMBARI-22891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16353171#comment-16353171
 ] 

Hudson commented on AMBARI-22891:
-

FAILURE: Integrated in Jenkins build Ambari-branch-2.6 #592 (See 
[https://builds.apache.org/job/Ambari-branch-2.6/592/])
AMBARI-22891 : Logging improvement during the Upgrade when there is (swagle: 
[https://gitbox.apache.org/repos/asf?p=ambari.git=commit=be34314a4c60cf04e595a35ff790445f27e49679])
* (edit) 
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java


> Logging improvement during the Upgrade when there is invalid Alert definition
> -
>
> Key: AMBARI-22891
> URL: https://issues.apache.org/jira/browse/AMBARI-22891
> Project: Ambari
>  Issue Type: Bug
>  Components: ambari-server
>Affects Versions: 2.6.1
>Reporter: amarnath reddy pappu
>Assignee: amarnath reddy pappu
>Priority: Major
>  Labels: pull-request-available
> Fix For: 2.6.2
>
> Attachments: AMBARI-22891.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> If there is invalid definition/json in alert definition then Upgrade would 
> fail with below exception. there is no way to determine which alert is 
> causing the issue here.
> its not clear how this alert definition gets corrupted but we have seen this 
> with 3 to 4 customers already - printing the alert definition name would he 
> helpful in support point of view to determine the root cause.. other wise it 
> is very difficult to find it out - had a give a dev patch to customers to 
> find it out.
> {noformat}
> 29 Jan 2018 19:58:50,173 ERROR [main] AlertDefinitionFactory:199 - Unable to 
> deserialize the alert definition source during coercion
> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: 
> Expected STRING but was BEGIN_OBJECT
>   at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
>   at com.google.gson.Gson.fromJson(Gson.java:795)
>   at com.google.gson.Gson.fromJson(Gson.java:859)
>   at com.google.gson.Gson$2.deserialize(Gson.java:131)
>   at 
> org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:373)
>   at 
> org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:313)
>   at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
>   at com.google.gson.Gson.fromJson(Gson.java:795)
>   at com.google.gson.Gson.fromJson(Gson.java:761)
>   at com.google.gson.Gson.fromJson(Gson.java:710)
>   at com.google.gson.Gson.fromJson(Gson.java:682)
>   at 
> org.apache.ambari.server.state.alert.AlertDefinitionFactory.coerce(AlertDefinitionFactory.java:196)
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1150)
>   at 
> org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46)
>   at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:946)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:450)
> Caused by: java.lang.IllegalStateException: Expected STRING but was 
> BEGIN_OBJECT
>   at 
> com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154)
>   at 
> com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:349)
>   at 
> com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:337)
>   at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>   at 
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>   ... 16 more
> 29 Jan 2018 19:58:50,176 ERROR [main] SchemaUpgradeHelper:239 - Upgrade 
> failed. 
> java.lang.NullPointerException
>   at 
> org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1163)
>   at 
> org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46)
>   at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:946)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
>   at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:450)
> 29 Jan 2018