-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Low
-
None
-
Affects Version/s: None
-
Component/s: Supportability
-
Severity 3 - Minor
Summary
When a user is created on Oracle database according to our documentation:
- Connecting Bitbucket Server to Oracle
Grant the Bitbucket Server user connect and resource roles only. The connect role is required to set up a connection, while resource role is required to allow the user to create objects in its own schema.
CREATE USER <user> IDENTIFIED BY <password> DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS; GRANT CONNECT, RESOURCE to <user>; CREATE VIEW <user>.all_objects AS SELECT * FROM sys.all_objects WHERE owner = upper('<user>');
But when the tablespace itself doesn't not have sufficient quota available, the exception thrown in Bitbucket logs are misleading.
Environment
Bitbucket with an Oracle database.
Steps to Reproduce
- Install Bitbucket
- Connect to Oracle
- Make a table with insufficient quota available
Expected Results
A stack trace indicating that the problem is related to insufficient quota available should be thrown.
Actual Results
The below exception is thrown in the atlassian-stash.log file:
Bitbucket does not have adequate permissions to modify the target database when connected as the specified user. Please check that the user has permission to CREATE and DROP tables and to INSERT and DELETE data. For information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation. If you continue having issues, get in touch with our support team and we'll help get you up and running. Hide details Bitbucket does not have adequate permissions to modify the target database when connected as the specified user. Please check that the user has permission to CREATE and DROP tables and to INSERT and DELETE data. For information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation. com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:239) com.atlassian.stash.internal.migration.DefaultMigrationService.validateConfiguration(DefaultMigrationService.java:85) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
This makes you believe that the problem is related to permissions.
Workaround
Check the database server logs and allow sufficient quota available for the tablespace.