Hi Gautam,
we're seeing the following log output:
2016-02-12 14:46:57,327 - Writing
File['/usr/hdp/current/ranger-admin/install.properties'] because
contents don't match
2016-02-12 14:46:57,328 - Separate DBA property not set. Assuming
Ranger DB and DB User exists!
2016-02-12 14:46:57,329 - Execute['python
/usr/hdp/current/ranger-admin/db_setup.py'] {'logoutput': True,
'environment': {'RANGER_ADMIN_HOME': '/usr/hdp/current/ranger-admin',
'JAVA_HOME': '/usr/jdk64/jdk1.7.0_67/'}, 'user': 'ranger'}
su: warning: cannot change directory to /home/ranger: No such file or directory
2016-02-12 14:46:57,463 [I] DB FLAVOR :ORACLE
2016-02-12 14:46:57,463 [I] --------- Verifying Ranger DB connection ---------
2016-02-12 14:46:57,463 [I] Checking connection
2016-02-12 14:46:58,240 [I] Connection success
2016-02-12 14:46:58,240 [I] --------- Verifying Ranger DB tables ---------
2016-02-12 14:46:58,240 [I] --------- bin NICHT auf ambari ---------
2016-02-12 14:46:58,241 [I] --------- Verifying upgrade history table ---------
2016-02-12 14:46:58,241 [I] --------- bin NICHT auf ambari ---------
2016-02-12 14:46:58,241 [I] --------- Applying Ranger DB patches ---------
2016-02-12 14:46:58,241 [I] Executing patch on s100on1t from file:
001-groupsource.sql
SQLException : SQL state: 42000 java.sql.SQLSyntaxErrorException:
ORA-00942: table or view does not exist
ErrorCode: 942
(Please don't mind the "bin NICHT auf ambari" output - we changed some
log-info to find out which script gets executed where).
As you can see, line 2 states "Assuming Ranger DB and DB User exists!"
-> So why is Ranger trying to apply patches afterwards? As far as I
can see, the loglines originate from db_setup.py and not from
dba_script.py.
- Sebastian
2016-02-16 4:57 GMT+01:00 Gautam Borad <[email protected]>:
> Hi Sebastian
> As per the 2.1 codebase the dba_script.py script should not be called
> if "Setup DB and DB user" is unchecked. Can you verify if the changes were
> saved before calling the setup.
>
> You can also look for the INFO message Setting up Ranger DB and DB User" in
> the logs. This log should ideally be not called, since you had set the flag
> to OFF. Thanks.
>
> On Mon, Feb 15, 2016 at 7:56 PM, <[email protected]> wrote:
>>
>> Hi,
>>
>> we ran into some trouble trying to install Ranger using Ambari (2.1.0)
>> with a pre-setup Oracle database (we used the SQL files from
>>
>> https://github.com/apache/incubator-ranger/tree/ranger-0.5/security-admin/db/oracle
>> for manual setup).
>> By enterprise policy, we are unable to let the Ambari-setup do the
>> table/user creation stuff.
>>
>> When starting the installation process, we cleared the "Setup DB and
>> DB user" check box under “Advanced ranger-env”.
>>
>> First problem:
>> In the setup procedure, Ambari runs some function called
>> "verify_tablespace" (dba_script.py) where it checks whether the User
>> tablespace equals the entered database name.
>>
>> Question: Why is this match necessary? After talking to our db-admins
>> I was assured it is not uncommon that these two might differ - as it
>> is in our case -> so the installation fails.
>> We had to refactor the code to always return true (and so "skip" the
>> validation) to proceed with the setup.
>>
>> Second problem:
>> After successfully working around the verify_tablespace problem, we
>> ran into another problem: it looks like Ambari tries to run some
>> database-patches, even though we cleared the "Setup DB and User" check
>> box! Of course, the patching fails (and so the installation fails),
>> because the ranger db-user has no privileges to run ALTER TABLE etc.!
>>
>> Question: Why does Ambari run db patches, even with unchecked "Setup
>> db/user" properties?
>>
>> Any help/hints appreciated.
>>
>> -Sebastian
>
>
>
>
> --
> Regards,
> Gautam.