Stuck at the start - Cannot connect to base monitor

Hi everyone,
I haven't used SQL Monitor in a few years, but we decided to install the latest version to monitor our new Azure VM environment.  I spun up a new win 2016 vm to hold the website (on IIS) and base monitor and followed the install instructions on the website.  When I got to "Starting up SQL Monitor for the First Time", I got the "Cannot connect to base monitor" error.  I tried the troubleshooting documentation to no avail, then started poking through the error logs where I found a couple things that seem relevant, but haven't proven fruitful yet.

In the base monitor error log are a bunch of these errors:
=====================================================================================
2021-03-29 21:50:23,927 [    5] ERROR RedGate.SqlMonitor.Common.Networking.Server.AsynchronousSocketListener - System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Span`1 buffer)
   at System.Net.Security.SslStream.FillHandshakeBufferAsync[TIOAdapter](TIOAdapter adapter, Int32 minSize)
   at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
   at System.Net.Security.SslStream.ProcessAuthentication(Boolean isAsync, Boolean isApm, CancellationToken cancellationToken)
   at System.Net.Security.SslStream.AuthenticateAsServer(SslServerAuthenticationOptions sslServerAuthenticationOptions)
   at RedGate.SqlMonitor.Common.Networking.Server.RpcSynchronousTcpServer.HandleClientSession(NetworkStream stream)
   at RedGate.SqlMonitor.Common.Networking.Server.AsynchronousSocketListener.RunWorker(Socket requestSocket)
===================================================================================

While the website log has a bunch of these errors:
=========================================================================================
2021-03-29 21:29:30,685 [   44] WARN  RedGate.SqlMonitor.UI.Website.Infrastructure.BaseMonitorConnectionTester - Couldn't connect to base monitor: BaseMonitorLocation(localhost:7399)
RedGate.SqlMonitor.Common.Networking.Exceptions.RpcNoChannelException: Couldn't connect to Base Monitor
   at RedGate.SqlMonitor.UI.Website.Infrastructure.BaseMonitorConnection.Open()
   at RedGate.SqlMonitor.UI.Website.Infrastructure.BaseMonitorConnectionFactory.OpenConnection(BaseMonitorLocation baseMonitorLocation, AuthenticatedUser authenticatedUser)
   at RedGate.SqlMonitor.UI.Website.Infrastructure.BaseMonitorConnectionTester.Test(BaseMonitorLocation location)
Inner exception:
   System.ComponentModel.Win32Exception: The credentials supplied to the package were not recognized
      at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
      at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
      at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
      at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
      at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
      at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
      at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
      at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
      at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
      at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
      at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
      at RedGate.SqlMonitor.Common.Networking.Client.RpcSynchronousTcpChannel..ctor(String hostName, Int32 port, X509Certificate certificate, RpcVersion rpcVersion, AuthenticatedUser authenticatedUser, IRpcConnectionStatsRecorder connectionStatsRecorder)
      at RedGate.SqlMonitor.UI.Website.Infrastructure.BaseMonitorConnection.Open()
End of inner exception:
==========================================================================================

are either of these pointing towards the cause of the error, or just symptoms of the error?  Can anyone help me figure out why my website can't connect to my base monitor?

thanks!
-dennis
Tagged:

Best Answer

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Dennis,

    It looks like there is an issue with the web being able to read or access the certificate of the base monitor to be able to maintain the connection between them.

    The internal portion of the "can't connect to base monitor" error is:

      System.ComponentModel.Win32Exception: The credentials supplied to the package were not recognized

    We've seen this happen before when the user that IIS is using for the application pool doesn't have the appropriate permission - and sometimes when an option in the application pool is disabled.

    The first thing to try would be to check if the Load user profile is set to true.  This option is in the Advanced settings of the Application Pool:


    If this option is not set to True, please set it to True and restart the app pool and web site and then see if the connection can be made:


    If that doesn't help, please try setting the Application Pool Identity to be the user that the base monitor service is running as and restart them again and see if that lets the base monitor be set.

    Hope that helps but please let us know if not!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Answers

Sign In or Register to comment.