question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MS SQLServer] Cannot connect with instance specified

See original GitHub issue

Hello,

When trying to connect to a Microsoft SQL Server, I cannot connect to all servers with instances.

I have 3, yet dbeaver can only connect to 1.

The other two try to connect, but fail after like 10 seconds with an error message.

JDBC URL looks like jdbc:sqlserver://value\instance:1433 Read-only Connection. Driver: Microsoft Driver Platform: Microsoft Windows 7 and Ubuntu 16.04 (I tested on both). Everything else is default (no proxy, no tunnel, no database/schema.

Error:

2017-01-02 15:12:25.860 - DBeaver 3.8.2 is starting
2017-01-02 15:12:25.863 - Install path: '/usr/share/dbeaver'
2017-01-02 15:12:25.863 - Instance path: 'file:/home/user/.dbeaver/'
2017-01-02 15:12:25.863 - Memory available 239Mb/3547Mb
2017-01-02 15:12:25.866 - Starting RMI server at 55295
2017-01-02 15:12:25.951 - Initialize display
2017-01-02 15:12:27.154 - Initializing DBeaver 3.8.2
2017-01-02 15:12:27.156 - Host plugin: org.jkiss.dbeaver.core.application 3.8.2
2017-01-02 15:12:27.158 - Initialize Core...
2017-01-02 15:12:27.291 - Core initialized (133ms)
2017-01-02 15:12:27.293 - Configure workbench window
2017-01-02 15:12:27.334 - Create actions
2017-01-02 15:12:27.647 - Initialize workbench window
2017-01-02 15:12:27.668 - Finish initialization
2017-01-02 15:12:31.447 - Connect with 'XXX (MS SQL Server - instance)' (mssql_ms-1595f5c034b-1e0770addfeddaac)
2017-01-02 15:12:46.025 - Connection failed (mssql_ms-1595f5c034b-1e0770addfeddaac)
2017-01-02 15:12:46.026 - org.jkiss.dbeaver.model.exec.DBCConnectException: The TCP/IP connection to the host value, port 1433 has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
org.jkiss.dbeaver.model.exec.DBCConnectException: The TCP/IP connection to the host value, port 1433 has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:173)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:73)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.<init>(JDBCDataSource.java:99)
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.<init>(GenericDataSource.java:84)
	at org.jkiss.dbeaver.ext.generic.model.meta.GenericMetaModel.createDataSource(GenericMetaModel.java:86)
	at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:153)
	at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:679)
	at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:74)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host value, port 1433 has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
	at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
	at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
	at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1309)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
	at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:159)
	... 9 more

Nothing added in the ErrorLog though.

Yet, using Microsoft Sql Server Studio, I can connect just fine.

How could I try to find more logs about the request itself? As it’s working fine with Microsoft Studio (and I re-created the connection 5 times to make sure no typos), I’d like to understand what happens for 10 seconds while trying to connect, as it should be working just fine.

Let me know what I can do to help resolve this issue.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jankatinscommented, Apr 4, 2017

In my dbeaver are two different jdbc drivers: I could get it to work with the MS SQL Server / jTDS driver (Under driver properties I could insert a name after “INSTANCE”) but not the other driver, even though there is a instance name setting under driver properties as well.

0reactions
serge-ridercommented, Jul 29, 2017

Answered

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Connect to Server - A network-related or instance ...
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.
Read more >
Resolving could not open a connection to SQL Server errors
In SSMS, right click on the instance name and select Properties. Go to the Connections tab and make sure Allow remote connections to...
Read more >
How to Fix the Error 'A Network-related or Instance-specific ...
Step 1. Check if an instance of SQL Server is installed and is working or not.
Read more >
Error Cannot Connect to Server - A network-related or ...
Check SQL Server is running · Make sure that Allow Remote Connections is enabled on sql server properties · Check if TCP/IP is...
Read more >
Connect to MS SQL server | DataGrip Documentation - JetBrains
In Host, Instance, and Port fields, specify your connection details. If the server name (in our case, DESKTOP ) does not work, replace...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found