ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myroslav Papyrkovskyy <mpapyrkovs...@hortonworks.com>
Subject RE: Oracle DB privileges
Date Sun, 20 Sep 2015 15:33:10 GMT
Hello, can you post some additional info, like which version are you upgrading from and to?
It looks like something went wrong and you have no data in "stack" table which had to be filled.
Did you use custom/modified stacks?
Can you share content of "clusters" and "stack" tables?

-----Original Message-----
From: hd2@uni.de [mailto:hd2@uni.de] 
Sent: Saturday, September 19, 2015 12:33 PM
To: user@ambari.apache.org
Subject: Re: Oracle DB privileges

Hi Myroslav,

thanks for your help! The upgrade is still quite fiddly.. after setting the permissions, we
had some trouble with the following
errors:

At first:
18 Sep 2015 15:13:39,913 ERROR [main] DBAccessorImpl:697 - Error executing query: ALTER TABLE
hosts ADD CONSTRAINT UQ_hosts_host_name UNIQUE (host_name)
java.sql.SQLSyntaxErrorException: ORA-02261: such unique or primary key already exists in
the table

> We were able to solve this by removing the unique attribute manually.

Afterwards:
18 Sep 2015 15:14:12,973 ERROR [main] DBAccessorImpl:697 - Error executing query: ALTER TABLE
repo_version DROP COLUMN stack
java.sql.SQLException: ORA-12991: column is referenced in a multi-column constraint

> We were able to solve this by removing the constraints manually.

The upgrade went through a few more steps after solving this issue, but stopped with a NPE
(which I don't know how to fix):

18 Sep 2015 15:35:26,601  INFO [main]
AmbariManagementControllerImpl:286 - Initializing the AmbariManagementControllerImpl
18 Sep 2015 15:35:26,660 ERROR [main] SchemaUpgradeHelper:222 - Upgrade failed.
java.lang.NullPointerException
at org.apache.ambari.server.state.StackId.<init>(StackId.java:54)
at org.apache.ambari.server.state.cluster.ClusterImpl.<init>(ClusterImpl.java:268)
at org.apache.ambari.server.state.cluster.ClusterImpl$$EnhancerByGuice$$4f8773ad.<init>(<generated>)
at org.apache.ambari.server.state.cluster.ClusterImpl$$EnhancerByGuice$$4f8773ad$$FastClassByGuice$$7964699e.newInstance(<generated>)
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.ProxyFactory$ProxyConstructor.newInstance(ProxyFactory.java:260)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
at com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632)
at com.sun.proxy.$Proxy10.create(Unknown Source) at org.apache.ambari.server.state.cluster.ClustersImpl.loadClustersAndHosts(ClustersImpl.java:180)
at org.apache.ambari.server.state.cluster.ClustersImpl.checkLoaded(ClustersImpl.java:168)
at org.apache.ambari.server.state.cluster.ClustersImpl.getClusters(ClustersImpl.java:594)
at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.addNewConfigurationsFromXml(AbstractUpgradeCatalog.java:266)
at org.apache.ambari.server.upgrade.UpgradeCatalog210.executeDMLUpdates(UpgradeCatalog210.java:994)
at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:536)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:220)
at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:297)


We see some WARNs for multiple columns in the logs beforehand.. but I have no idea if this
is connected:

18 Sep 2015 15:35:21,760  WARN [main] DBAccessorImpl:700 - Error executing query: ALTER TABLE
repo_version ADD CONSTRAINT fk_repoversion_stack_id FOREIGN KEY (stack_id) REFERENCES stack
(stack_id), errorCode = 2298, message = ORA-02298: cannot validate
(F123.FK_REPOVERSION_STACK_ID) - parent keys not found

Any idea how to fix this? Should I file a bug report? Please let me know if you need the log
file.

- Seb

2015-09-18 13:12 GMT+02:00 Myroslav Papyrkovskyy
<mpapyrkovskyy@hortonworks.com>:
> Hello Seb.
> Just took a look at docs, they seem to be outdated a bit.
> Try following set of roles and privileges:
>
> CREATE TABLE, CREATE SEQUENCE, CREATE PROCEDURE, CREATE TRIGGER, 
> CREATE SESSION, UNLIMITED TABLESPACE
>
> SELECT_CATALOG_ROLE
>
> CONNECT, RESOURCE
>
>
> I understand that some of them overlaps, but this set was verified to work.
> IMO 1st 5 privileges can be dropped.
>
> --
> Regards,
> Myroslav Papirkovskyi
> ________________________________
> Від: hd2@uni.de <hd2@uni.de>
> Надіслано: 18 вересня 2015 р. 12:47
> Кому: user@ambari.apache.org
> Тема: Oracle DB privileges
>
>
> Hi,
>
> I am currently trying to Upgrade HDP 2.2 to 2.3 which starts with 
> upgrading Ambari to v2.1 beforehand.
> I am using an Oracle 11g database which seems to be pretty 
> troublesome. The HDP docs state the following privileges:
>
> GRANT create session to <AMBARIUSER>;
> GRANT create TABLE to <AMBARIUSER>;
> GRANT create SEQUENCE to <AMBARIUSER>;
>
> But (at least for the upgrade process) these are not sufficient. I 
> needed to grant "drop any index" and "create any index" to the ambari 
> db user and I'm still having some issues.
>
> Is there a complete list which privileges are really necessary for 
> ambari to run/upgrade properly? I can't find anything in the docs.
>
> Thanks!
>
> - Seb

Mime
View raw message