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 Wed, 23 Sep 2015 21:38:12 GMT
Hello, I don’t thing simple setup re-run will help.
Database looks broken to me, ids in stack table and references to it from clusters one don't
match.
I looked at code and didn’t find how this could appear.
Even more strange thing is that I was able to successfully run upgrade from 1.7.0 to 2.1.1
with oracle database using just documented permissions (e.g. CREATE SESSION, CREATE TABLE,
CREATE SEQUENCE). Please, check that ambari user is owner of tables, and that tables are in
ambari user schema.
Probably difference occurred due to multiple upgrade reruns.
You can try to manually fix reference. For example if you used HDP 2.2:
UPDATE clusters SET desired_stack_id=153 WHERE cluster_id =1;
And retry upgrade run.
In case if that won't help I would recommend clean reinstall to same nodes.
If you can write down steps how to reproduce your troubles, please file a JIRA so we can investigate
and fix it.

Regards,
Myroslav

-----Original Message-----
From: hd2@uni.de [mailto:hd2@uni.de] 
Sent: Wednesday, September 23, 2015 11:26 PM
To: user@ambari.apache.org
Subject: Re: Oracle DB privileges

Hi Myroslav,

any recommendations? Should I re-run ambari setup?


2015-09-21 9:44 GMT+02:00  <hd2@uni.de>:
> Hey,
>
> I'm upgrading from Ambari 2.0 to 2.1. There are no custom/modified 
> stacks in use.
>
> The "stack" table looks like this:
> https://dl.dropboxusercontent.com/u/13919777/stack.gif
>
> Clusters:
> https://dl.dropboxusercontent.com/u/13919777/cluster.gif
>
>
> 2015-09-20 17:33 GMT+02:00 Myroslav Papyrkovskyy
> <mpapyrkovskyy@hortonworks.com>:
>> 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(ConstructorI
>> njector.java:85) at 
>> com.google.inject.internal.ConstructorBindingImpl$Factory.get(Constru
>> ctorBindingImpl.java:254) at 
>> com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:97
>> 8) at 
>> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.ja
>> va:1024) at 
>> com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
>> at 
>> com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvi
>> der2.java:632) at com.sun.proxy.$Proxy10.create(Unknown Source) at 
>> org.apache.ambari.server.state.cluster.ClustersImpl.loadClustersAndHo
>> sts(ClustersImpl.java:180) at 
>> org.apache.ambari.server.state.cluster.ClustersImpl.checkLoaded(Clust
>> ersImpl.java:168) at 
>> org.apache.ambari.server.state.cluster.ClustersImpl.getClusters(Clust
>> ersImpl.java:594) at 
>> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.addNewConfigu
>> rationsFromXml(AbstractUpgradeCatalog.java:266)
>> at 
>> org.apache.ambari.server.upgrade.UpgradeCatalog210.executeDMLUpdates(
>> UpgradeCatalog210.java:994) at 
>> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(A
>> bstractUpgradeCatalog.java:536) at 
>> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdate
>> s(SchemaUpgradeHelper.java:220) at 
>> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgra
>> deHelper.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