Event - 4221 - SQL Server Reporting Discovery MP

AdamMohamed-3032 56 Reputation points
2024-01-13T15:14:09.0566667+00:00
Management Group: "Test"
Module: Microsoft.SQLServer.ReportingServices.Windows.Module.Discovery.DeploymentSeedDiscovery
Version: 7.2.0.0

Error(s) was(were) occurred:
Message: An error occurred during discovery.


---------- Exception: ----------
Exception Type: System.Data.SqlClient.SqlException
Message: Cannot open database "ReportServer" requested by the login. The login failed.
Login failed for user '\svc___msaa'.
Number: 4060
Source: .Net SqlClient Data Provider
Stack Trace: 
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<GetNewOpenedConnectionInternalAsync>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<InitConnectionAsync>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandInternalAsync>d__41`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandWrapperAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.ReportingServices.Windows.Module.Discovery.DeploymentSeedDiscovery.<FillListsOfClassesAndRelationsAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.Base.DataItemHelper.<GetDiscoveryDataAsyncStatic>d__6.MoveNext()


State:
The configuration properties are: 
ManagementGroupName = Test
Publisher = SQLReportingServicesDiscoveryWindows
DBConnectionString = DB server name
InstallationID = 966e2193-f0bb-44ec-8273-4e52b6136678
InstanceName = SSRS
MachineName = MS Server Name
Login = 
DBName = ReportServer
DBServerFQDN = 
DeploymentSeedClassId = 5b935dfa-a383-f063-1308-8c3f5b791b11
DiscoverySourceManagedEntityId = 42b0dcb2-2ac3-8a5e-cb81-5d5b90debc6e
DiscoverySourceObjectId = 5a3de8aa-ff73-4e21-3f82-86109e389da0
Password = ********
SqlTimeoutSeconds = 15
TempDBName = ReportServerTempDB
TimeoutSeconds = 300

Error(s):
An error occurred during discovery.


---------- Exception: ----------
Exception Type: System.Data.SqlClient.SqlException
Message: Cannot open database "ReportServer" requested by the login. The login failed.
Login failed for user 'TM\svc__t_msaa'.
Number: 4060
Source: .Net SqlClient Data Provider
Stack Trace: 
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<GetNewOpenedConnectionInternalAsync>d__46.MoveNext()
--- End 
of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<InitConnectionAsync>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandInternalAsync>d__41`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandWrapperAsync>d__45`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.ReportingServices.Windows.Module.Discovery.DeploymentSeedDiscovery.<FillListsOfClassesAndRelationsAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.SQLServer.Module.Helper.Base.DataItemHelper.<GetDiscoveryDataAsyncStatic>d__6.MoveNext()

Could someone please advise how to fix this issue.

Regards,
Adam
Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,493 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AlexZhu-MSFT 5,956 Reputation points Microsoft Vendor
    2024-01-15T02:56:00.3066667+00:00

    Hi,

    In the event description, is the account the action account or run as account? Here's a similar thread that discusses the event 4221.

    https://learn.microsoft.com/en-us/answers/questions/988279/scom-is-trying-to-connect-to-sql-on-a-db-server-us

    4221-eid

    Regards,

    Alex


  2. Marius Ene 335 Reputation points
    2024-02-01T00:43:44.3+00:00

    Hi ,

    • Enable the SQL Server Browser service. This service is required for Reporting Services discovery and monitoring and must be running on computers with Reporting Services and on computers that host the reporting server database.- Use a domain account for monitoring. Monitoring with a domain account is highly recommended. For more information, see Least-Privilege Monitoring Configuration. You can use the Local System account or HealthService SSID as an action account.

    Source: https://learn.microsoft.com/en-us/system-center/scom/reporting-services-management-pack-management-pack-delivery?view=sc-om-2022

    NotePre-installation of Microsoft SQL Server on Windows (Discovery) version 7.0.20.0 or later is required to discover Server Reporting Services Deployment. This MP file is part of the Microsoft System Center Management Pack for SQL Server on Windows delivery. In case of absence of Microsoft SQL Server on Windows (Discovery), this management pack won't be able to discover and monitor the availability and performance of Server Reporting Services Deployment. Monitoring of Server Reporting Services is still possible without having Microsoft SQL Server on Windows (Discovery) installed.

    To test can you use a regular domain account for the discovery instead of using '\svc___msaa'?

    Marius ENE (https://mariusene.com/ )

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.