<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Ambari Upgrade Failure : AlertDefinitionFactory - Unable to deserialize the alert definition source during coercion - Expected number, got : STRING in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176648#M67663</link>
    <description>&lt;P&gt;The JSON of the alert definition must have an invalid property set on it. Not sure how it happened, but there are a couple of options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Find the offending alert definition and correct its JSON in the database. Chances are it's the one after yarn_app_timeline_server_webui.&lt;/LI&gt;&lt;LI&gt;Just remove all alert data and have Ambari bootstrap the definitions back in from the stack. This is a good option if you haven't added or modified any alert definitions from the ones that ship with the product.&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Wed, 06 Sep 2017 20:56:26 GMT</pubDate>
    <dc:creator>jonathanhurley</dc:creator>
    <dc:date>2017-09-06T20:56:26Z</dc:date>
    <item>
      <title>Ambari Upgrade Failure : AlertDefinitionFactory - Unable to deserialize the alert definition source during coercion - Expected number, got : STRING</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176647#M67662</link>
      <description>&lt;P&gt;Upgrading Ambari 2.5.0.3 to Ambari 2.5.2.0 it fails with following stack trace:&lt;/P&gt;&lt;P&gt;Ambari Logs:&lt;/P&gt;&lt;P&gt;05 Sep 2017 16:58:54,928 ERROR [main] AlertDefinitionFactory:199 - Unable to deserialize the alert definition source during coercion &lt;/P&gt;&lt;P&gt;com.google.gson.JsonSyntaxException: Expecting number, got: STRING &lt;BR /&gt;at com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:304) &lt;BR /&gt;at com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:293) &lt;BR /&gt;at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) &lt;BR /&gt;at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) &lt;BR /&gt;at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) &lt;BR /&gt;at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) &lt;BR /&gt;at com.google.gson.Gson.fromJson(Gson.java:795) &lt;BR /&gt;at com.google.gson.Gson.fromJson(Gson.java:859) &lt;BR /&gt;at com.google.gson.Gson$2.deserialize(Gson.java:131) &lt;BR /&gt;at org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:373) &lt;BR /&gt;at org.apache.ambari.server.state.alert.AlertDefinitionFactory$AlertDefinitionSourceAdapter.deserialize(AlertDefinitionFactory.java:313) &lt;BR /&gt;at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) &lt;BR /&gt;at com.google.gson.Gson.fromJson(Gson.java:795) &lt;BR /&gt;at com.google.gson.Gson.fromJson(Gson.java:761) &lt;BR /&gt;at com.google.gson.Gson.fromJson(Gson.java:710) &lt;BR /&gt;at com.google.gson.Gson.fromJson(Gson.java:682) &lt;BR /&gt;at org.apache.ambari.server.state.alert.AlertDefinitionFactory.coerce(AlertDefinitionFactory.java:196) &lt;BR /&gt;at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1164) &lt;BR /&gt;at org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46) &lt;BR /&gt;at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:940) &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:240) &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:433) &lt;BR /&gt;05 Sep 2017 16:58:54,929 DEBUG [main] AmbariMetaInfo:1172 - The alert named yarn_app_timeline_server_webui has been modified from the stack definition and will not be merged &lt;BR /&gt;05 Sep 2017 16:58:54,929 ERROR [main] SchemaUpgradeHelper:242 - Upgrade failed. &lt;BR /&gt;java.lang.NullPointerException &lt;BR /&gt;at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1177) &lt;BR /&gt;at org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46) &lt;BR /&gt;at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:940) &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:240) &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:433) &lt;BR /&gt;05 Sep 2017 16:58:54,929 ERROR [main] SchemaUpgradeHelper:446 - Exception occurred during upgrade, failed &lt;BR /&gt;org.apache.ambari.server.AmbariException &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:243) &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:433) &lt;BR /&gt;Caused by: java.lang.NullPointerException &lt;BR /&gt;at org.apache.ambari.server.api.services.AmbariMetaInfo.reconcileAlertDefinitions(AmbariMetaInfo.java:1177) &lt;BR /&gt;at org.apache.ambari.server.upgrade.UpdateAlertScriptPaths.executeDMLUpdates(UpdateAlertScriptPaths.java:46) &lt;BR /&gt;at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:940) &lt;BR /&gt;at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:240) &lt;BR /&gt;=================================================================================== &lt;/P&gt;&lt;P&gt;On investigation, I found the columns in alert_definition table in ambari database were ordered differently in 2.5.2.0 and 2.5.0.3&lt;/P&gt;&lt;P&gt;I made changes to the table schema and corrected the column order to match the schema in 2.5.2.0, however, I still get the same error.&lt;/P&gt;&lt;P&gt;Appreciate any hints.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 08:52:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176647#M67662</guid>
      <dc:creator>dineshc</dc:creator>
      <dc:date>2017-09-06T08:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Upgrade Failure : AlertDefinitionFactory - Unable to deserialize the alert definition source during coercion - Expected number, got : STRING</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176648#M67663</link>
      <description>&lt;P&gt;The JSON of the alert definition must have an invalid property set on it. Not sure how it happened, but there are a couple of options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Find the offending alert definition and correct its JSON in the database. Chances are it's the one after yarn_app_timeline_server_webui.&lt;/LI&gt;&lt;LI&gt;Just remove all alert data and have Ambari bootstrap the definitions back in from the stack. This is a good option if you haven't added or modified any alert definitions from the ones that ship with the product.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 06 Sep 2017 20:56:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176648#M67663</guid>
      <dc:creator>jonathanhurley</dc:creator>
      <dc:date>2017-09-06T20:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Upgrade Failure : AlertDefinitionFactory - Unable to deserialize the alert definition source during coercion - Expected number, got : STRING</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176649#M67664</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/485/jhurley.html" nodeid="485"&gt;@Jonathan Hurley&lt;/A&gt; thanks for the inputs! Solved it the hard way with help from Amar but you are spot on with your guidance here!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 04:24:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176649#M67664</guid>
      <dc:creator>dineshc</dc:creator>
      <dc:date>2017-09-07T04:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Upgrade Failure : AlertDefinitionFactory - Unable to deserialize the alert definition source during coercion - Expected number, got : STRING</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176650#M67665</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13511/dineshchitlangia.html" nodeid="13511"&gt;@Dinesh Chitlangia&lt;/A&gt; Glad you got it resolved. By any chance, did you determine which alert definition it was and what the invalid JSON was? We might want to file a bug if we can figure out how it happened. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 06:40:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176650#M67665</guid>
      <dc:creator>jonathanhurley</dc:creator>
      <dc:date>2017-09-07T06:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Upgrade Failure : AlertDefinitionFactory - Unable to deserialize the alert definition source during coercion - Expected number, got : STRING</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176651#M67666</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/485/jhurley.html" nodeid="485"&gt;@Jonathan Hurley&lt;/A&gt; it is yarn_app_timeline_server_webui alert. for some reason alert_source had incorrect value.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 10:37:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Upgrade-Failure-AlertDefinitionFactory-Unable-to/m-p/176651#M67666</guid>
      <dc:creator>apappu</dc:creator>
      <dc:date>2017-09-07T10:37:02Z</dc:date>
    </item>
  </channel>
</rss>

