Hi,
We are seeing an issue where the dashboard for a space is not loading.
We see the below issue:
Nothing is showing up on the Event Viewer on the Octopus server.
Our DBA team are also seeing no issues on the DB side.
Seeing this error in the Diagnostics:
An error occurred while trying to trying fetch the number of active SQL transactions: "Error while executing SQL command in transaction ‘SqlTransactionMetricsProducer.UpdateMetrics’: VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’.
The user does not have permission to perform this action.
The command being executed was:
SELECT COUNT() FROM sys.dm_tran_active_transactions" System.Exception: Error while executing SQL command in transaction ‘SqlTransactionMetricsProducer.UpdateMetrics’: VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’.
The user does not have permission to perform this action.
The command being executed was:
SELECT COUNT() FROM sys.dm_tran_active_transactions
—> Microsoft.Data.SqlClient.SqlException (0x80131904): VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’.
The user does not have permission to perform this action.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData() at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption) at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory
1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action
1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location --- at Nevermore.Transient.DbCommandExtensions.<>c__DisplayClass5_0.<<ExecuteScalarWithRetryAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Nevermore.Transient.DbCommandExtensions.<>c__DisplayClass5_0.<<ExecuteScalarWithRetryAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Nevermore.Transient.RetryPolicy.ExecuteActionAsync[TResult](Func
1 func)
at Nevermore.Transient.DbCommandExtensions.ExecuteScalarWithRetryAsync(DbCommand command, RetryPolicy commandRetryPolicy, RetryPolicy connectionRetryPolicy, String operationName, CancellationToken cancellationToken)
at Nevermore.CommandExecutor.ExecuteScalarAsync(CancellationToken cancellationToken)
ClientConnectionId:2a82df1d-eb3f-4e77-b5c5-4b95580bbc43
Error Number:300,State:1,Class:14
— End of inner exception stack trace —
at Nevermore.CommandExecutor.ExecuteScalarAsync(CancellationToken cancellationToken)
at Nevermore.Advanced.ReadTransaction.ExecuteScalarAsync[TResult](PreparedCommand preparedCommand, CancellationToken cancellationToken)
at Octopus.Core.RelationalStorage.RawRelationalTransaction.ExecuteScalarAsync[TResult](String query, CancellationToken cancellationToken, CommandParameterValues args, RetriableOperation retriableOperation, Nullable`1 commandTimeout) in ./source/Octopus.Core/RelationalStorage/RawRelationalTransaction.cs:line 182
at Octopus.Core.Infrastructure.OpenTelemetry.MetricProducers.SqlTransactionMetricsProducer.UpdateMetrics(CancellationToken cancellationToken) in ./source/Octopus.Core/Infrastructure/OpenTelemetry/MetricProducers/SqlTransactionMetricsProducer.cs:line 36
November 8th 2022 13:57:22Error
An error occurred while trying to trying fetch the number of active SQL transactions: “Error while executing SQL command in transaction ‘SqlTransactionMetricsProducer.UpdateMetrics’: VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’.
The user does not have permission to perform this action.
The command being executed was:
SELECT COUNT(*) FROM sys.dm_tran_active_transactions” System.Exception: Error while executing SQL command in transaction ‘SqlTransactionMetricsProducer.UpdateMetrics’: VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’.
The user does not have permission to perform this action.
Any idea why the Dashboard is not loading? Is the diagnostic error related to the dashboard not loading?
Kind Regards,
Micheál Power