microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.52k stars 894 forks source link

Connection Failure: Object reference... for only one cluster #25123

Open iserrato opened 8 months ago

iserrato commented 8 months ago

Type: Bug

Version: 1.48.0-insider (user setup) Commit: 6a58a6b51497f459002c3db285ece2623087dca8 Date: 2023-12-12T22:59:52.172Z VS Code: 1.82.0 Electron: 25.9.6 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631

When running a function, I received the error "Connection Error: Object reference not set to an instance of an object" for the cluster https://azurehpcsre.centralus.kusto.windows.net/. I attempted to reconnect to the cluster but received the same error. I then removed it from my list of clusters and tried to add it as a new cluster, with the same error. I tried signing out of my account, restarting ADS, and signing back in, same error. I downloaded the Insider version and attempted to connect, same error. I can still connect to other clusters and add new clusters; only azurehcpsre.centralus is failing.

Details:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoIntellisenseClient.TranslateParameters(String parameters) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoIntellisenseClient.cs:line 204
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoIntellisenseClient.LoadDatabase(IEnumerable`1 tableSchemas, IEnumerable`1 functionSchemas, String databaseName) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoIntellisenseClient.cs:line 117
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoIntellisenseClient.AddOrUpdateDatabase(IEnumerable`1 tableSchemas, IEnumerable`1 functionSchemas, GlobalState globals, String databaseName, String clusterName) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoIntellisenseClient.cs:line 63
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoIntellisenseClient.LoadSchemaState(String databaseName, String clusterName) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoIntellisenseClient.cs:line 47
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoIntellisenseClient..ctor(IKustoClient kustoClient) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoIntellisenseClient.cs:line 20
   at Microsoft.Kusto.ServiceLayer.DataSource.DataSourceFactory.Create(ConnectionDetails connectionDetails, String ownerUri) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\DataSourceFactory.cs:line 38
   at Microsoft.Kusto.ServiceLayer.Connection.ReliableDataSourceConnection..ctor(ConnectionDetails connectionDetails, RetryPolicy connectionRetryPolicy, RetryPolicy commandRetryPolicy, IDataSourceFactory dataSourceFactory, String ownerUri) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\ReliableDataSourceConnection.cs:line 65
   at Microsoft.Kusto.ServiceLayer.Connection.DataSourceConnectionFactory.CreateDataSourceConnection(ConnectionDetails connectionDetails, String ownerUri) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\Connection\DataSourceConnectionFactory.cs:line 36
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\Connection\ConnectionService.cs:line 402

Extension version: 0.5.8 Azure Data Studio version: azuredatastudio-insiders 1.48.0-insider (6a58a6b51497f459002c3db285ece2623087dca8, 2023-12-12T22:59:52.172Z) OS version: Windows_NT x64 10.0.22631 Restricted Mode: No Preview Features: Enabled Modes:

System Info |Item|Value| |---|---| |CPUs|AMD EPYC 7763 64-Core Processor (16 x 2445)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software| |Load (avg)|undefined| |Memory (System)|63.95GB (36.47GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
datruongMS commented 2 months ago

Getting the exact same error on one of my Kusto clusters too. Tried deleting settings from %APPDATA/azuredatastudio, reinstalling ADS, reinstalling Kusto extension, restarted machine, and nothing has worked. It happened after I was idle for an hour and attempted to run a query on the connection and then it would never reconnect or allow a new connection to the same Kusto cluster.