You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Alejandro Fernandez (JIRA)" <ji...@apache.org> on 2014/07/29 02:11:40 UTC
[jira] [Resolved] (AMBARI-6643) Error upgrading from 1.6.0 to 1.6.1
using external Postgres DB
[ https://issues.apache.org/jira/browse/AMBARI-6643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alejandro Fernandez resolved AMBARI-6643.
-----------------------------------------
Resolution: Duplicate
> Error upgrading from 1.6.0 to 1.6.1 using external Postgres DB
> --------------------------------------------------------------
>
> Key: AMBARI-6643
> URL: https://issues.apache.org/jira/browse/AMBARI-6643
> Project: Ambari
> Issue Type: Bug
> Affects Versions: 1.6.1
> Reporter: Alejandro Fernandez
> Assignee: Alejandro Fernandez
> Fix For: 1.7.0
>
>
> If a user has an external postgres database either without a schema, or a schema whose name is different from the database name, then running "ambari-server upgrade" fails.
> The most common case is for an embedded postgres database, in which the database and schema name are the same, so this is not an issue.
> However, when using an external postgres database, it's likely that the schema is empty, so the upgrade fails due to a bug in which it expects the schema name to be the same as the database name.
> {code}
> 14:16:57,584 INFO [main] SchemaUpgradeHelper:224 - Upgrading schema to target version = 1.6.1
> 14:16:57,620 INFO [main] SchemaUpgradeHelper:233 - Upgrading schema from source version = 1.6.0
> 14:16:57,623 INFO [main] SchemaUpgradeHelper:142 - Upgrade path: [{ ugradeCatalog: sourceVersion = 1.6.0, targetVersion = 1.6.1 }]
> 14:16:57,623 INFO [main] SchemaUpgradeHelper:173 - Executing DDL upgrade...
> 14:16:57,630 INFO [main] DBAccessorImpl:472 - Executing query: ALTER SCHEMA postgres OWNER TO "sc_ambari";
> 14:16:57,645 WARN [main] DBAccessorImpl:478 - Error executing query: ALTER SCHEMA postgres OWNER TO "sc_ambari";
> org.postgresql.util.PSQLException: ERROR: schema "postgres" does not exist
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:395)
> at org.apache.ambari.server.orm.DBAccessorImpl.executeQuery(DBAccessorImpl.java:475)
> at org.apache.ambari.server.orm.DBAccessorImpl.executeQuery(DBAccessorImpl.java:461)
> at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.changePostgresSearchPath(AbstractUpgradeCatalog.java:169)
> at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeSchema(AbstractUpgradeCatalog.java:252)
> at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:178)
> at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:238)
> {code}
> _ambari.properties_ had roughly the following values
> {code}
> server.jdbc.database=postgres
> server.jdbc.driver=org.postgresql.Driver
> server.jdbc.hostname=server
> server.jdbc.port=5432
> server.jdbc.properties.sslmode=verify-full
> server.jdbc.properties.ssl=true
> server.jdbc.rca.driver=org.postgresql.Driver
> server.jdbc.rca.url=jdbc:postgresql://server:5432/ambari?ssl=true;sslmode=verify-full
> server.jdbc.rca.user.name=sc_ambari
> server.jdbc.rca.user.passwd=/etc/ambari-server/conf/password.dat
> server.jdbc.schema=ambari
> server.jdbc.url=jdbc:postgresql://server:5432/ambari?ssl=true;sslmode=verify-full
> server.jdbc.user.name=sc_ambari
> server.jdbc.user.passwd=/etc/ambari-server/conf/password.dat
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)