<?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: Error Configuring MySQL for Hive Metastore:  column A0.SCHEMA_VERSION_V2 does not exist in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63626#M73353</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/25426"&gt;@mm25&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/opt/cloudera/parcels/CDH-5.13.1-1.cdh5.13.1.p0.2/lib/hive/conf/hive-site.xml is merely a stock file that is not used to start a service.&amp;nbsp; When you manage a cluster with Cloudera Manager, Cloudera Manager will initiate the start of the service.&amp;nbsp; It will use what you have configured in Cloudera Manager to generate all files necessary to start the process.&amp;nbsp; This includes hive-site.xml.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, in short, the answer to why Hive is trying to use postgres is that you have it configured to do so in the configuration stored in Cloudera Manager.&amp;nbsp; To affect change you will need to change the configuration within Cloudera Manager's configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- go to &lt;STRONG&gt;Clusters --&amp;gt; Hive&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Click on &lt;STRONG&gt;Configuration&lt;/STRONG&gt; (subtab)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will display your configuration.&lt;/P&gt;&lt;P&gt;- On the left side, Click on &lt;STRONG&gt;Hive Metastore Database&lt;/STRONG&gt; to view all database-related configuraiton options.&lt;/P&gt;&lt;P&gt;- You can update the configuration and Save/Restart Hive to have the changes take effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to view the generated configuration files, you can view them in a Role's Processes subtab or view them at the commandline in &lt;STRONG&gt;/var/run/cloudera-scm-agent/process&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each time a process is started by Cloudera Manager, a new process directory is created under that dir.&lt;/P&gt;&lt;P&gt;I generally use &lt;STRONG&gt;ls -lrt |grep hive&lt;/STRONG&gt; or something of the sort to see the most recent process directory created for a service's roles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that does the trick!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2018 21:05:50 GMT</pubDate>
    <dc:creator>bgooley</dc:creator>
    <dc:date>2018-01-11T21:05:50Z</dc:date>
    <item>
      <title>Error Configuring MySQL for Hive Metastore:  column A0.SCHEMA_VERSION_V2 does not exist</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63594#M73352</link>
      <description>&lt;P&gt;I&amp;nbsp;am trying to configure a pseudo cluster with both CM 5.13 and CHD 5.13 installed in the cluster nodes&amp;nbsp; (docker containers), but am having some problems getting the Hive service work.&lt;/P&gt;&lt;P&gt;Specifically the issue I have is that the Hive Metastore is not using my local MySQL database, but is instead defaulting to a non existent Postgresql database .&lt;/P&gt;&lt;P&gt;Here are the steps I took:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I configured Mysql server and a database for the metastore by following the official steps here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_hive_metastore_configure.html#topic_18_4_3__title_515" target="_blank"&gt;https://www.cloudera.com/documentation/enterprise/latest/topics/cdh_ig_hive_metastore_configure.html#topic_18_4_3__title_515&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And as described in the last step, I added the following properties to /opt/cloudera/parcels/CDH-5.13.1-1.cdh5.13.1.p0.2/lib/hive&lt;SPAN&gt;/conf/hive-site.xml:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(...) xml that was already there (...)

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;javax.jdo.option.ConnectionURL&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;jdbc:mysql://localhost/metastore&amp;lt;/value&amp;gt;
  &amp;lt;description&amp;gt;the URL of the MySQL database&amp;lt;/description&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;javax.jdo.option.ConnectionDriverName&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;com.mysql.jdbc.Driver&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;javax.jdo.option.ConnectionUserName&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;hive&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;javax.jdo.option.ConnectionPassword&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;mypassword&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;datanucleus.autoCreateSchema&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;false&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;datanucleus.fixedDatastore&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;datanucleus.autoStartMechanism&amp;lt;/name&amp;gt; 
  &amp;lt;value&amp;gt;SchemaTable&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt; 

&amp;lt;property&amp;gt;
&amp;lt;name&amp;gt;hive.metastore.schema.verification&amp;lt;/name&amp;gt;
&amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;And finally I restarted the CMS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) After this I tried to start the Hive Metastore from the CM&amp;nbsp; but it did not work, and after inspecting the stderr log I found the following error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;+ exec /opt/cloudera/parcels/CDH-5.13.1-1.cdh5.13.1.p0.2/lib/hive/bin/hive --config /var/run/cloudera-scm-agent/process/188-hive-HIVEMETASTORE --service metastore -p 9083~

javax.jdo.JDOException: Exception thrown when executing query
	at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:596)
....
org.postgresql.util.PSQLException: ERROR: column A0.SCHEMA_VERSION_V2 does not exist&lt;/PRE&gt;&lt;P&gt;And indeed, after checking&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/var/run/cloudera-scm-agent/process/188-hive-HIVEMETASTORE/hive-site.xml&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The first line of the file was:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
&amp;lt;name&amp;gt;javax.jdo.option.ConnectionURL&amp;lt;/name&amp;gt;
&amp;lt;value&amp;gt;jdbc:postgresql://headnode1.cluster:7432/hive&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The error&amp;nbsp; "column A0.SCHEMA_VERSION_V2 does not exist", from what I could tell, is related to the metastore database schema not being correct, but in my Mysql metastore database I used:&lt;/P&gt;&lt;PRE&gt;SOURCE /usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-1.1.0.mysql.sql;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I believe the problem here is the fact that the CSM is ignoring the config file in&amp;nbsp;&lt;SPAN&gt;/opt/cloudera/parcels/CDH-5.13.1-1.cdh5.13.1.p0.2/lib/hive&lt;/SPAN&gt;&lt;SPAN&gt;/conf/hive-site.xml&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any ideas on this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:43:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63594#M73352</guid>
      <dc:creator>mm25</dc:creator>
      <dc:date>2022-09-16T12:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error Configuring MySQL for Hive Metastore:  column A0.SCHEMA_VERSION_V2 does not exist</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63626#M73353</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/25426"&gt;@mm25&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/opt/cloudera/parcels/CDH-5.13.1-1.cdh5.13.1.p0.2/lib/hive/conf/hive-site.xml is merely a stock file that is not used to start a service.&amp;nbsp; When you manage a cluster with Cloudera Manager, Cloudera Manager will initiate the start of the service.&amp;nbsp; It will use what you have configured in Cloudera Manager to generate all files necessary to start the process.&amp;nbsp; This includes hive-site.xml.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, in short, the answer to why Hive is trying to use postgres is that you have it configured to do so in the configuration stored in Cloudera Manager.&amp;nbsp; To affect change you will need to change the configuration within Cloudera Manager's configuration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- go to &lt;STRONG&gt;Clusters --&amp;gt; Hive&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Click on &lt;STRONG&gt;Configuration&lt;/STRONG&gt; (subtab)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will display your configuration.&lt;/P&gt;&lt;P&gt;- On the left side, Click on &lt;STRONG&gt;Hive Metastore Database&lt;/STRONG&gt; to view all database-related configuraiton options.&lt;/P&gt;&lt;P&gt;- You can update the configuration and Save/Restart Hive to have the changes take effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to view the generated configuration files, you can view them in a Role's Processes subtab or view them at the commandline in &lt;STRONG&gt;/var/run/cloudera-scm-agent/process&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each time a process is started by Cloudera Manager, a new process directory is created under that dir.&lt;/P&gt;&lt;P&gt;I generally use &lt;STRONG&gt;ls -lrt |grep hive&lt;/STRONG&gt; or something of the sort to see the most recent process directory created for a service's roles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that does the trick!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 21:05:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63626#M73353</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-01-11T21:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error Configuring MySQL for Hive Metastore:  column A0.SCHEMA_VERSION_V2 does not exist</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63756#M73354</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/4054"&gt;@bgooley&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Sorry about the late reply. But yup, that was exactly the issue, once I inserted the right configurations in Cloudera Manager it connected to the Mysql server correctly&lt;/P&gt;&lt;P&gt;Thank you for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 17:59:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63756#M73354</guid>
      <dc:creator>mm25</dc:creator>
      <dc:date>2018-01-17T17:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error Configuring MySQL for Hive Metastore:  column A0.SCHEMA_VERSION_V2 does not exist</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63757#M73355</link>
      <description>&lt;P&gt;Awesome!&amp;nbsp; Thank you for following up with the good news!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 18:01:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-Configuring-MySQL-for-Hive-Metastore-column-A0-SCHEMA/m-p/63757#M73355</guid>
      <dc:creator>bgooley</dc:creator>
      <dc:date>2018-01-17T18:01:36Z</dc:date>
    </item>
  </channel>
</rss>

