-
Bug
-
Resolution: Fixed
-
Highest
-
None
-
CCMA - 3.4.0
-
None
-
17
-
Minor
Issue Summary
When trying to get the database CPU information, CCMA 3.4.0 throws an exception because the confluence db user doesn't have VIEW SERVER STATE permission to run the SQL query. Although the database CPU count query fails, CCMA 3.4.0 handles that case gracefully. It also just happens to be logging the error a bit misleading.
This is reproducible on Data Center:
Steps to Reproduce
- Install confluence with MS SQL Server
- Navigate to <confluence-url>/admin/darkfeatures.action
- Add the dark feature flag: migration-assistant.enable.new-space-export
- Create and run a new migration.
Expected Results
The migration should not produce any errors.
Actual Results
The below exception is thrown in the atlassian-confluence.log file:
ERROR [Caesium-1-4] [agent.newexport.store.JdbcConfluenceStore] fetchInteger Query failed at: Query(sql=SELECT CPU_COUNT FROM sys.dm_os_sys_info, tableName=null, exportName=null, userkeyColums=[], preserveIdentifierCase=false) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT CPU_COUNT FROM sys.dm_os_sys_info]; SQL state [S0001]; error code [300]; VIEW SERVER STATE permission was denied on object 'server', database 'master'.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: VIEW SERVER STATE permission was denied on object 'server', database 'master'. at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1542) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:738) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:794) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:243) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:252) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:268) at com.atlassian.migration.agent.newexport.store.JdbcConfluenceStore.fetchInteger(JdbcConfluenceStore.java:128) at com.atlassian.migration.agent.service.ClusterLimits.queryCpuCoreStatistic(ClusterLimits.java:152) at com.atlassian.migration.agent.service.ClusterLimits.runJob(ClusterLimits.java:102)
Workaround
The error is misleading and doesn't impact the migration. To avoid the error, grant the VIEW SERVER STATE permission to confluence db user.
If CCMA is not in use, disabling the plugin on Confluence it makes the message go away.
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
- relates to
-
MOVE-119611 Loading...
-
MOVE-119821 Loading...