Database connection to MS-SQL running under Linux requires port number

My test system is:

OS: Ubuntu 20.04 (hostname ignitionVM)
HMI: 8.1.0
SQL: MS-SQL 2019 Development edition, Linux version

In trying to create a database connection I initially went with the recommended connection url of:

jdbc:sqlserver://localhost\ignitionVM

This is based on the port number being optional because I did a default installation of MS-SQL Server. However Ignition failed to connect to the database.

After some experimentation I discovered that by adding the default port number of 1433 I was able to connect to the database:

jdbc:sqlserver://localhost\ignitionVM:1433

This is not the expected behavior. Is there any explanation for this? And/Or is it due to running under Linux?

Edit 1

This might be my fault. The error message is:

Cannot create PoolableConnectionFactory (The connection to the host localhost, named instance ignitionVM failed. Error: “java.net.SocketTimeoutException: Receive timed out”. Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.)

I know I opened up 1433, but didn’t open up 1434

Edit 2

I opened up port 1434 and still not getting a connection. I suspect that the browser service is not running, but I can’t find any linux specific instructions about it

Answering my on question here. I finally got an answer to a question I posted on the Server Fault stack overflow site: How do you check/start SQL browser service under linux?

The answer is simplicity in itself. You don’t - because the SQL browser service isn’t supported under Linux!

This can be seen in the documentation from MS for MS-SQL 2019 Unsupported features & services

Protip: Read all of the documentation for a product in order to avoid asking stuuuupid questions!

1 Like