Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial rendering of insight dashboard #687

Closed
SebastianPfliegel opened this issue Feb 14, 2018 · 10 comments · Fixed by #688
Closed

Partial rendering of insight dashboard #687

SebastianPfliegel opened this issue Feb 14, 2018 · 10 comments · Fixed by #688
Assignees
Labels

Comments

@SebastianPfliegel
Copy link
Contributor

  • SQL Operations Studio Version: 0.26.4

Steps to Reproduce:
Right click server and select Manage. Sometimes the dashboard gets rendered partially. For example Backup Status and Database Size gets shown, but the Explorer widget and Tasks insight doesn't get displayed. When I try to manage a database from one of the servers where rendering doesn't work no insights get rendered there as well.

Btw, no changes to the config file have been applied for the insights.

@kburtram
Copy link
Member

I also saw an issue on this build last night were an Azure DB Server page was missing all its widgets. When I cleaned out all my cached state under C:\Users\karlb\AppData\Roaming\sqlops the page started working correctly again and I didn't have a consistent repro after that.

@anthonydresser @AbbiePetcht @erickangMSFT we should track down what's happening here and determine if we need to hold tomorrow's release to get this fixed.

@kburtram kburtram added this to the February Public Preview milestone Feb 14, 2018
@anthonydresser
Copy link
Contributor

I've never seen this before, any ideas what can trigger it?

@kburtram
Copy link
Member

What I saw yesterday was that the Server page on an Azure DB only showed the Server properties, but didn't have the tasks or explorer widgets. The Database page rendered fine. As mentioned, when I cleared the cached AppData and recreated the connection the issue went away.

I was guessing it was some "bad" data in my cache somehow breaking things, and was hoping it was related to something in my dev env. Now that we have another report of a similar issue I think there's a higher likely this will have broader impact. I would guess it has something to do with upgrading between builds and difference in cached metadata formats, or something like that, but I don't have a current repro.

Is there any data we could collect in a repro state that would help root cause the issue?

@kburtram kburtram reopened this Feb 14, 2018
@anthonydresser
Copy link
Contributor

@kburtram regarding the problem you were seeing, I think most likely it had nothing to do with your cache it just happened when you tried to repro it with your clean cache you didn't do the actual repro. The bug I fixed which I think is most likely causing the issue originally reported was when you render a dashboard it was setting the edition in the configuration settings for the widgets for the current edition of the dashboard (which is intended). However, this edition was being persisted accross different dashboards, which meant when you are viewing dashboards of different sql server editions, (on prem vs azure) you would see sporadic behavior regarding which widgets appear.

Another important note is that some of the default insights we have for the dashboard won't appear for azure as intended since those insights don't make sense for azure.

@kburtram
Copy link
Member

@anthonydresser sounds good, I didn't have a good repro for what I hit yesterday which is why I didn't log an issue.

@SebastianPfliegel 0.26.5 build at https://github.com/Microsoft/sqlopsstudio/releases/tag/0.26.5 has @anthonydresser's proposed fix. Please let us know if you still hit the issue with the latest build.

@SebastianPfliegel
Copy link
Contributor Author

Just used 0.26.6 and this particular bug has been fixed, but it might have opened another one. If I manage a connection for a database where I don't have access to master db (as it is an isolated database; don't know the actual feature name) I get following error (though insights get displayed correctly):

[Error - 10:13:51] Request admin/getdatabaseinfo failed.
  Message: System.AggregateException: One or more errors occurred. (Failed to connect to server AOCLGP11.) ---> Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server AOCLGP11. ---> System.Data.SqlClient.SqlException: Fehler bei der Anmeldung für den Benutzer "APOLLO-OPTIK\Pfliegel.Sebastian".
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.GetServerInformation()
   at Microsoft.SqlServer.Management.Smo.Server.IsAzureDbScopedConnection(ServerConnection sc)
   at Microsoft.SqlServer.Management.Smo.Server.GetExecutionManager()
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.get_ServerVersion()
   at Microsoft.SqlServer.Management.Smo.Information.get_Version()
   at Microsoft.SqlTools.ServiceLayer.Admin.DatabaseTaskHelper.Initialize(CDataContainer context) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\Database\DatabaseTaskHelper.cs:line 53
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.CreateDatabaseTaskHelper(ConnectionInfo connInfo, Boolean databaseExists) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 234
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.GetDatabaseInfo(ConnectionInfo connInfo) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 186
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_0.<<HandleGetDatabaseInfoRequest>b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 158
--- 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.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_1.<<HandleGetDatabaseInfoRequest>b__1>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 167
   --- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server AOCLGP11. ---> System.Data.SqlClient.SqlException: Fehler bei der Anmeldung für den Benutzer "APOLLO-OPTIK\Pfliegel.Sebastian".
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.GetServerInformation()
   at Microsoft.SqlServer.Management.Smo.Server.IsAzureDbScopedConnection(ServerConnection sc)
   at Microsoft.SqlServer.Management.Smo.Server.GetExecutionManager()
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.get_ServerVersion()
   at Microsoft.SqlServer.Management.Smo.Information.get_Version()
   at Microsoft.SqlTools.ServiceLayer.Admin.DatabaseTaskHelper.Initialize(CDataContainer context) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\Database\DatabaseTaskHelper.cs:line 53
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.CreateDatabaseTaskHelper(ConnectionInfo connInfo, Boolean databaseExists) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 234
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.GetDatabaseInfo(ConnectionInfo connInfo) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 186
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_0.<<HandleGetDatabaseInfoRequest>b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 158
--- 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.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_1.<<HandleGetDatabaseInfoRequest>b__1>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 167<---

  Code: 0 
[Error - 10:13:51] Request admin/getdatabaseinfo failed.
  Message: System.AggregateException: One or more errors occurred. (Failed to connect to server AOCLGP11.) ---> Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server AOCLGP11. ---> System.Data.SqlClient.SqlException: Fehler bei der Anmeldung für den Benutzer "APOLLO-OPTIK\Pfliegel.Sebastian".
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.GetServerInformation()
   at Microsoft.SqlServer.Management.Smo.Server.IsAzureDbScopedConnection(ServerConnection sc)
   at Microsoft.SqlServer.Management.Smo.Server.GetExecutionManager()
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.get_ServerVersion()
   at Microsoft.SqlServer.Management.Smo.Information.get_Version()
   at Microsoft.SqlTools.ServiceLayer.Admin.DatabaseTaskHelper.Initialize(CDataContainer context) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\Database\DatabaseTaskHelper.cs:line 53
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.CreateDatabaseTaskHelper(ConnectionInfo connInfo, Boolean databaseExists) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 234
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.GetDatabaseInfo(ConnectionInfo connInfo) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 186
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_0.<<HandleGetDatabaseInfoRequest>b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 158
--- 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.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_1.<<HandleGetDatabaseInfoRequest>b__1>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 167
   --- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server AOCLGP11. ---> System.Data.SqlClient.SqlException: Fehler bei der Anmeldung für den Benutzer "APOLLO-OPTIK\Pfliegel.Sebastian".
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
   at Microsoft.SqlServer.Management.Common.ConnectionManager.GetServerInformation()
   at Microsoft.SqlServer.Management.Smo.Server.IsAzureDbScopedConnection(ServerConnection sc)
   at Microsoft.SqlServer.Management.Smo.Server.GetExecutionManager()
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.get_ServerVersion()
   at Microsoft.SqlServer.Management.Smo.Information.get_Version()
   at Microsoft.SqlTools.ServiceLayer.Admin.DatabaseTaskHelper.Initialize(CDataContainer context) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\Database\DatabaseTaskHelper.cs:line 53
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.CreateDatabaseTaskHelper(ConnectionInfo connInfo, Boolean databaseExists) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 234
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.GetDatabaseInfo(ConnectionInfo connInfo) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 186
   at Microsoft.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_0.<<HandleGetDatabaseInfoRequest>b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 158
--- 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.SqlTools.ServiceLayer.Admin.AdminService.<>c__DisplayClass12_1.<<HandleGetDatabaseInfoRequest>b__1>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Admin\AdminService.cs:line 167<---

  Code: 0 

Is it related or should I open a new issue?

@kburtram
Copy link
Member

@SebastianPfliegel the exception looks unrelated as far as I can tell. Could you please open a separate issue so we can get repro steps? I think you're referring to connecting to a Contained Database. I'll see if I can get the same error.

@kburtram
Copy link
Member

@MattIrv could you please take a look at the above exception and see if it's related to microsoft/sqltoolsservice#583?

I think a workaround may be to add the database name for the contained DB explicitly in the connection dialog (instead of the using default) which should avoid running queries against master, right?

@MattIrv
Copy link
Contributor

MattIrv commented Feb 15, 2018

@SebastianPfliegel and @kburtram: I've opened issue #715 to track this and can confirm it repros for contained databases. Unfortunately the workaround suggested above doesn't work because you need to enter the database name in order to connect to a contained database in the first place.

@SebastianPfliegel
Copy link
Contributor Author

Contained database is the word I was looking for! And @MattIrv is right, I already had the database name selected (as it is required).

This one can be closed, though :)

@adsbot adsbot bot locked and limited conversation to collaborators Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants