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

Kusto service connection error: GetFileVersionInfoSize(clr.dll) failed #24872

Open cheenamalhotra opened 9 months ago

cheenamalhotra commented 9 months ago

Steps to Reproduce:

  1. Connect to a Kusto Cluster

Error captured:

23-11-03 7:10:42.8210327 pid:30676 tid:8 kustoservice Verbose: 0 : HandleConnectRequest
P.Utils Warning: 0 : ,2023-11-03T14:10:43.3882281Z,P.Utils,Warning,CM-P14S,CM-P14S/MicrosoftKustoServiceLayer/30676,30676,23980,,,,,2853A4E6,"GetFileVersionInfoSize(clr.dll) failed: 2"
ProcessId=30676
ThreadId=7
DateTime=2023-11-03T14:10:43.3897419Z
P.Utils Error: 0 : ,2023-11-03T14:10:43.5354096Z,P.Utils,Error,CM-P14S,CM-P14S/MicrosoftKustoServiceLayer/30676,30676,23980,,,,,00000000,"Exception object created: Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfoException
[0]Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfoException: Function 'GetFileVersionInfoSize' on file 'clr.dll' produced error '-2147467259' (The system cannot find the file specified.)
Timestamp=2023-11-03T14:10:43.3910612Z
MachineName=CM-P14S
ProcessName=MicrosoftKustoServiceLayer
ProcessId=30676
ThreadId=23980
AppDomainName=MicrosoftKustoServiceLayer
ActivityStack=(Empty activity stack)
FileName=clr.dll
Function=GetFileVersionInfoSize

   at Kusto.Cloud.Platform.Utils.ExceptionsTemplateHelper.Construct_Trace(Exception that, ITraceSource traceSource)
   at Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfoException.Construct_Trace()
   at Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfoException.Construct(Boolean deserializing, Nullable`1 failureCode, String failureSubCode, Nullable`1 isPermanent)
   at Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfoException..ctor(String fileName, String function, Int32 errorCode, Nullable`1 failureCode, String failureSubCode, Nullable`1 isPermanent)
   at Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfo..ctor(String fileName)
   at Kusto.Cloud.Platform.Utils.ExtendedFileVersionInfo.TryGetVersionString(String fileName, String name, String& result)
   at Kusto.Cloud.Platform.Utils.ExtendedEnvironment.GetClrDllVersionString(Boolean concise)
   at Kusto.Cloud.Platform.Utils.ExtendedEnvironment.GetNetAndClrVersionString(Boolean concise)
   at Kusto.Cloud.Platform.Utils.ExtendedEnvironment.get_NetAndClrVersionShort()
   at Kusto.Cloud.Platform.Utils.ClientDetails.GetClientVersionStringForAssembly(Type typeInAssembly)
   at Kusto.Data.KustoConnectionStringBuilder..cctor()
   at Kusto.Data.KustoConnectionStringBuilder..ctor(String hostAddress, String database)
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoClient.GetKustoConnectionStringBuilder(DataSourceConnectionDetails connectionDetails) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoClient.cs:line 81
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoClient.Initialize(DataSourceConnectionDetails connectionDetails) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoClient.cs:line 43
   at Microsoft.Kusto.ServiceLayer.DataSource.Kusto.KustoClient..ctor(DataSourceConnectionDetails connectionDetails, String ownerUri) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\Kusto\KustoClient.cs:line 38
   at Microsoft.Kusto.ServiceLayer.DataSource.DataSourceFactory.Create(ConnectionDetails connectionDetails, String ownerUri) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\DataSource\DataSourceFactory.cs:line 36
   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
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.Connect(ConnectParams connectionParams) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\Connection\ConnectionService.cs:line 193
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.Connect(ConnectParams connectionParams)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.RunConnectRequestHandlerTask(ConnectParams connectParams) in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\Connection\ConnectionService.cs:line 794
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.RunConnectRequestHandlerTask(ConnectParams connectParams)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.<>c__DisplayClass42_0.<<HandleConnectRequest>b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.Kusto.ServiceLayer\Connection\ConnectionService.cs:line 780
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.Kusto.ServiceLayer.Connection.ConnectionService.<>c__DisplayClass42_0.<HandleConnectRequest>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread)
   at System.Threading.Tasks.Task.ExecuteFromThreadPool(Thread threadPoolThread)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
"
ProcessId=30676
ThreadId=7
DateTime=2023-11-03T14:10:43.5356472Z
Charles-Gagnon commented 9 months ago

@cheenamalhotra FWIW I'm not seeing this myself. Maybe try deleting the STS folder under the kusto extension so it redownloads to see if it's something that got messed up when it was unzipping the service?

cheenamalhotra commented 9 months ago

This error doesn't pop up when you make a connection so it can be deceptive, can you check if you see any error in the log file?

Charles-Gagnon commented 9 months ago

Ah, yup there it is. Well that's fun!

(had to also change logging level from Critical -> Warning)