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.6k stars 909 forks source link

can't connect to mssql server on secondary dns through linux app #8636

Open DomRVA opened 4 years ago

DomRVA commented 4 years ago

We have written the needed data into your clipboard because it was too large to send. Please paste. Issue Type: Bug

we have sql server instance on a secondary dns. When I use azure data studio on my windows 10 machine, i can connect to the database with no problem. When i try to connect to the same database with Azure Data Studio in Ubuntu or in Linux containers on a chromebook, the connection times out. I have no problems connecting to a different sql server on the primary dns in linux Azure Data Studio. Here is the error i get:

System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed during the post-login phase. The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=11; [Login] initialization=0; authentication=0; [Post-Login] complete=14011; ---> System.ComponentModel.Win32Exception (258): Unknown error 258 at System.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) 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.<>cDisplayClass40_0.b_1(Task`1 ) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() 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.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>cDisplayClass30_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 524 ClientConnectionId:123d2d4a-7db0-47b1-9ee8-d574a0a36d02 Error Number:-2,State:0,Class:11

Azure Data Studio version: azuredatastudio 1.13.1 (d08d07fe39c7fe74f9265db02cb963c38d048299, 2019-11-14T22:56:48.883Z) OS version: Linux x64 5.3.0-24-generic

System Info |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz (4 x 2599)| |GPU Status|2d_canvas: unavailable_software
flash_3d: unavailable_off
flash_stage3d: unavailable_off
flash_stage3d_baseline: unavailable_off
gpu_compositing: unavailable_off
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled_readback
webgl2: unavailable_off| |Load (avg)|0, 0, 0| |Memory (System)|3.84GB (0.73GB free)| |Process Argv|--unity-launch| |Screen Reader|no| |VM|100%|
Extensions: none
adsbot[bot] commented 4 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

Charles-Gagnon commented 4 years ago

Have you tried increasing the timeout value to see if it connects eventually?

TheCleric commented 3 years ago

I am also having this issue. To answer @Charles-Gagnon 's earlier question, I did up my timeout to 300 seconds, which did not resolve the issue, just delays the time for it to error.

TheCleric commented 3 years ago

I found another issue that has solved this for me!

https://github.com/microsoft/azuredatastudio/issues/10337#issuecomment-686853270