-
Notifications
You must be signed in to change notification settings - Fork 914
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
Cannot connect #14382
Comments
We need more info to debug your particular issue. If you could attach your logs to the issue (ensure no private data is in them), it would help us fix the issue much faster. There are two types of logs to collect: Console Logs
Application Logs
|
Also - what type of server are you connecting to? SQL On-Prem (remote or localhost)/Azure/etc. |
Hello, Best regards |
@Simone-86828 we update the SqlClient driver in this build, which always has possibility for regressions/side-effects. Though we aren't seeing wide-spread connectivity problems related to the upgrade yet this morning. The error is indicating a network related problem accessing the server. Have you ruled out that there may have been an intermittent network issue to these servers at the time you tested the new build (I assume this isn't the problem, but I'm not seeing anything to really go on with this issue yet)? e.g. if you had time I wonder if trying to upgrade again to see if the problem persists. |
@mas-dse-juremigi thanks for confirming! Let's close the other issue as a duplicate and track the issue here. |
@mas-dse-juremigi are you also using a mac client? can you provide any additional info about the servers you're connecting to? is there anything interesting in the logs (besides the exception callstack) that could help determine what's happening here. |
@kburtram I am using mac client. I also get a connectivity error using Windows Authentication. It says run kinit but when I run it, it has no impact. Goes back to showing the following error:
|
@Code-DJ it likes a different issue than the other ones. But could also be related to the driver bump (though we did specifically test windows auth on mac, there were some changes in the driver in this area). Just to connections are working fine on 1.25.3 and broke with today's update? |
@kburtram yes, it was working on 1.25.3 and then broke on 1.26. |
@Code-DJ What type of server are you trying to connect to? On-Prem/Azure/etc? |
@Charles-Gagnon On-Prem SQL Server 2019. |
@Code-DJ are you trying to run kinit through ADS or through Terminal? |
@cssuh through Terminal on ADS. Just tried it through iTerm2, same issue. |
after running kinit, does it give any messages? Also, after running kinit, if you run klist, do you get a message containing the credentials issued and expire date? |
@kburtram Yes, I am using a Mac. I am using On-Prem SQL Servers. kinit works without issue as I can authenticate with other services. I have no issue connecting to the same sql servers using python, pyodbc + latest version of Microsoft ODBC drivers (which also authenticate using kerberos). Only Azure Data Studio is having issues. |
kinit does not throw any errors. klist shows the following output:
|
@kburtram I have verified the macOS zip file. It works fine. BTW, on Windows I don't have any issues with 1.26 Stable build, it connects fine using Windows Authentication. |
I confirm it works fine as well. As for what suggested on yesterday about possible network problems, I tend to exclude them. I can have 1.25.3 and 1.26.0 running at same time, one connects and the other doesn't. |
@Code-DJ @Simone-86828 thanks for confirming! |
@kburtram is this dotnet/SqlClient#848 included in the upgraded Client version for ADS? |
It is - we were using the latest 2.1.1 release which contains that fix. |
The SqlClient team said that this might be because of a known issue - dotnet/SqlClient#868 Can you confirm whether you are attempting to connect to a non-default instance? |
@Charles-Gagnon I am connecting to a default instance. Here's one of the connections in the settings.json
I tried 2.1.1 with a .net project and the following connection string and get kerberos error. Don't get the error with 2.0.1
|
Would you mind opening an issue in the SqlClient repo with that information? We can track further progress on the issue there. |
Hi @Code-DJ , please feel free to create an issue in dotnet/sqlclient so we can look further into it. |
@Charles-Gagnon @karinazhou done dotnet/SqlClient#926 Thanks |
See dotnet/SqlClient#926 (comment) for the fix. 2.1.1 changed the way it checks for SPN. It now includes the default port number in the name, so you have to include the default port number (1433) when setting the SPN. |
Thanks @Code-DJ for following up with this! @Simone-86828 @mas-dse-juremigi Could you see if their suggested fix helps you out as well? |
@Charles-Gagnon I cannot test this as I don't manage our sql servers. |
Are you using SQL auth or Integrated auth through kerberos? |
@Charles-Gagnon I am using integrated through kerberos |
Folks, I have reopened dotnet/SqlClient#926 |
Hello everybody, |
Identical situation here on macOS Catalina. Establishing a connection to a SQL server installed on another system / VM via instance like 'servername\instance' is no longer possible since version 1.26.0. Test Build https://azuredatastudiobuilds.blob.core.windows.net/test/1.26.0/azuredatastudio-macos-1.26.0-driver.zip is working! |
Same issue for me. Also happened when upgrading to 1.25.0 below was the ticket for that one: |
Hi, If you are connecting with named instances that have If you are using the default instances, that is related to the SPN generation change in the driver. We are currently working on the fix. Thanks, |
We'll be releasing a hotfix to roll back the driver change to unblock folks hitting this with ADS. But for anyone running into this issue it would be helpful if you could go over to dotnet/SqlClient#926 and comment there to try and track down this issue so that we're able to update to the new driver version in the future without breaking everyone again 😄 |
Update 1.26.1 is available that rolls back the SQL Client driver. Please let us know if there are still connectivity issues with the latest build. |
@kburtram @Charles-Gagnon FYI, the issue is resolved in SqlClient dotnet/SqlClient#926 |
@Code-DJ thanks for the update! I'm not sure the exact plans for trying the driver update again at the moment. The last two releases required hotfixing a driver rollback, so we may wait a little to try to avoid pulling in additional regressions next month. I believe there are some fixes for AlwaysEncrypted Secure Enclaves we're trying to pickup with the driver update. |
I know this is closed, but I am a new user of ADS and am getting the same error as @Code-DJ is above...I am on version 1.26.1 on macOS Catalina 10.15.7. The difference is, I am able to connect to 1 server (the first server I tried, for some reason, no idea why others don't connect, no difference in other servers, slight minor version difference, same AD credentials, work's without issue on windows using SSMS for example), but none others. After running kinit and then klist inside ADS terminal I see my credentials and expiration date. These are on-prem SQL Server instances. Any assistance would be helpful. Thanks
|
We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug
Since the upgrade to 1.26.0 I can no longer connect to any server. Downloaded again the 1.25.3 and it works just fine.
Any particular change or is this a bug?
Please the error message I get here below:
Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server)
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, SqlAuthenticationMethod authType) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool) at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at Microsoft.Data.ProviderBase.DbConnectionFactory.<>c__DisplayClass47_0.<CreateReplaceConnectionContinuation>b__0(Task
1 _)at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>c__DisplayClass30_0.<b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ManagedBatchParser\ReliableConnection\ReliableSqlConnection.cs:line 314
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Connection\ConnectionService.cs:line 550
ClientConnectionId:00000000-0000-0000-0000-000000000000
Here is the about screen:
Version: 1.26.0
Commit: 995095f
Date: 2021-02-19T03:24:52.069Z
VS Code: 1.48.0
Electron: 9.4.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 19.6.0
Azure Data Studio version: azuredatastudio 1.26.0 (995095f, 2021-02-19T03:24:52.069Z)
OS version: Darwin x64 19.6.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (8)
The text was updated successfully, but these errors were encountered: