Troubleshooting
Why Ignition Gateway cannot connect to SQL Server LocalDB
Short answer
The Ignition Gateway's JDBC driver connects only over TCP/IP, and SQL Server LocalDB never opens a TCP listener, so the connection fails even with port 1433 open and ping working in both directions. Replace LocalDB with a standard SQL Server Express instance, enable TCP/IP, set a fixed port of 1433 in IPAll, restart the service, and connect the Gateway with a SQL login.
On this page
- Why can't an Ignition Gateway connect to SQL Server LocalDB?
- Why don't an open port 1433 firewall rule and a passing ping fix it?
- What is LocalDB, and what does it listen on?
- Which database target works for a development connection?
- How do I configure SQL Server Express for the Gateway connection?
- Why does a local SQL client succeed while the Gateway fails?
- How do I verify the listener before blaming the Gateway?
- What is the decision for each case?
- Questions asked
Your Ignition Gateway cannot connect to a SQL Server LocalDB instance, and no firewall change will fix it: LocalDB never opens a TCP listener, and the Gateway's database driver connects only over TCP/IP. Ping and an open port rule prove the network path is healthy; they say nothing about whether any process accepts the connection. The fix is to install a standard SQL Server Express instance, enable its TCP/IP protocol, give it a fixed port, and point the Gateway at it with a SQL login. This article explains why LocalDB fails, which target works instead, how to configure Express step by step, and how to verify each hop before blaming the Gateway.
Why can't an Ignition Gateway connect to SQL Server LocalDB? #
Because LocalDB provides no TCP/IP listener at all, and the Gateway's JDBC driver speaks only TCP/IP. Even when the Gateway and LocalDB share one machine, the driver opens a TCP socket to the database port, and a protocol that never binds a port cannot answer it.
The maintainers of Microsoft's JDBC driver state this plainly in their own issue tracker: a JDBC connection to a SQL Server instance works only over TCP/IP, so a LocalDB target is out of scope for any TCP-only client. The Gateway's MS SQL Server driver is such a client, which is why your MySQL and full SQL Server connections work with identical Gateway settings while LocalDB does not. Those hosts run real TCP listeners; LocalDB runs none.
Why don't an open port 1433 firewall rule and a passing ping fix it? #
Firewall rules and ping test the transport path, not the endpoint. Ping proves IP reachability between the server and the workstation, and the port rule proves the packet is delivered, but on the LocalDB machine nothing is bound to that port, so the handshake ends in a reset or a timeout.
Trace it hop by hop. Say the Gateway sits on a server at 10.0.25.122 and the development workstation is at 192.168.1.50, both example addresses. The Gateway opens a TCP socket to the workstation on the database port and the firewall passes the SYN. At the workstation, no process holds a listening socket on that port, so the operating system refuses the connection before any database protocol starts. A port test passing on the way in therefore tells you nothing; a TCP-port check alone cannot prove a JDBC listener is healthy, which is exactly the distinction the page on troubleshooting SQL Server JDBC listener connections works through.
What is LocalDB, and what does it listen on? #
LocalDB is a lightweight, per-user SQL Server edition that starts on demand inside the user's session and serves local applications through shared memory or a named pipe, with no Windows service and no network binding.
That design explains every symptom you are seeing. LocalDB starts when a local application requests it and can stop when idle, so there is no service entry to configure and no listener to point a remote client at. A SQL client on the same machine connects through that local channel and works; a client that must arrive over TCP has nothing to arrive at. The lightweight footprint is the feature, and the missing listener is its direct consequence.
Which database target works for a development connection? #
A standard SQL Server Express instance is the only target of the three that works, because it is the only one with a TCP listener the Gateway's driver can reach, and it keeps your development data on the workstation, separate from production.
| Target on the workstation | TCP listener | Reachable by the Gateway | Verdict |
|---|---|---|---|
| SQL Server LocalDB | none | no, not even from the same machine | not usable with the Gateway |
| Gateway moved onto the workstation, still on LocalDB | none | not applicable | fails the same way; the driver still needs TCP |
| Standard SQL Server Express, TCP/IP enabled, fixed port | yes, once enabled | yes, with a firewall rule and a SQL login | use this |
The only cost of the recommended path is a one-time protocol configuration, which the next section covers.
How do I configure SQL Server Express for the Gateway connection? #
Six steps take a fresh Express install to a validated Gateway connection:
- Install standard SQL Server Express and choose mixed-mode authentication during setup, so the Gateway can log in with a SQL login instead of a Windows account.
- Open SQL Server Configuration Manager, expand SQL Server Network Configuration, open the protocols entry for your Express instance, and set TCP/IP to Enabled.
- Open the TCP/IP properties, go to the IP Addresses tab, scroll to the IPAll section, clear TCP Dynamic Ports, and set TCP Port to 1433. A fixed port removes any dependency on the SQL Server Browser service.
- Restart the SQL Server service for that instance. Protocol changes apply only after the restart, and a skipped restart produces the same no-listener symptom as LocalDB.
- Create a SQL login and grant it access to the development database only.
- On the Gateway webpage, confirm under Config that Databases Drivers lists the MS SQL Server driver, then create the connection with a connect URL in the documented jdbc:sqlserver scheme, for example
jdbc:sqlserver://192.168.1.50:1433;databaseName=DevDB, substituting your own host and database names, and enter the SQL login credentials.
If you instead keep a named instance on a dynamic port, the client must resolve the current port through SQL Server Browser on UDP 1434, which adds a second firewall hop. The fixed port avoids it.
Why does a local SQL client succeed while the Gateway fails? #
Because a client on the same machine can reach the database through shared memory or named pipes, which bypass TCP entirely, so a successful local test tells you nothing about whether a TCP listener exists.
That is the most common trap, and it has siblings. Check your case against these:
| Symptom | Mechanism | Check |
|---|---|---|
| Connection fails though the port is open and ping works | target is LocalDB, or Express has TCP/IP disabled | no LISTENING entry on the database port on the workstation |
| Works locally in SQL tooling, fails from the server | local client used shared memory or named pipes | connect explicitly over TCP from the Gateway server |
| Worked before, fails after a reboot or reinstall | dynamic port changed while the Gateway URL pins the fixed port | set the fixed TCP Port in IPAll and restart |
| Login rejected once TCP works | instance in Windows-only authentication mode | enable mixed mode and restart the service |
| Workstation sleeps or its address changes | listener disappears or the address moves | reserve the address or use a DNS name, and keep the PC awake |
Once TCP itself works, two other fault classes appear, and neither is LocalDB. If the host is an edge PC that drops its SQL session after a power or network outage, the recovery steps are in reconnecting an edge PC to SQL Server after connection loss. If the handshake reaches the server but dies on encryption negotiation, the article on fixing an ODBC SSL security error 08001 on an edge PC covers that case.
How do I verify the listener before blaming the Gateway? #
Verify from the workstation outward, and run every network test from the Gateway server, because a test run on the database machine can succeed through a local mechanism the Gateway cannot use.
Worked example, using the example addresses above with the Gateway on 10.0.25.122 and the workstation on 192.168.1.50:
- On the workstation, run
netstat -ano | findstr :1433. You must see a line with LISTENING on that port. No line means the protocol is disabled, the instance was not restarted, or the target is still LocalDB. Match the process ID shown to the SQL Server service in Task Manager. - From the Gateway server, run
Test-NetConnection -ComputerName 192.168.1.50 -Port 1433and requireTcpTestSucceeded : True. Ping does not cover this, because ping tests ICMP only. - From the Gateway server, log in over TCP with
sqlcmd -S tcp:192.168.1.50,1433 -U dev_login, using your SQL login. A successful login isolates the credential and authentication mode from the Gateway configuration. - Save the Gateway database connection and read its status on the Gateway's database status page. It must report a valid connection.
When all four checks pass, the workstation, the path, the port and the login are proven, and the Gateway connection will validate with the same host, port and credentials.
What is the decision for each case? #
If the target is LocalDB, replace it: install standard SQL Server Express, enable TCP/IP, fix the port, restart the service, and connect the Gateway with a SQL login. If the target is already Express, decide by symptom: no LISTENING entry means the protocol or the restart; a login rejection means the authentication mode.
Either way the original goal survives. Express keeps the development database on the workstation, isolated from production, and adds only the one-time listener configuration that LocalDB cannot provide.
Questions asked
Can I keep the LocalDB database file when I move to SQL Server Express?
Yes. Stop the LocalDB instance cleanly, copy its .mdf and .ldf files, and attach them to the standard Express instance with CREATE DATABASE using the FOR ATTACH option. The Gateway then reaches the same development data through the Express TCP listener, and the dataset moves in one operation.
Does the Gateway need the SQL Server Browser service running?
Not when the port is fixed. With the TCP Port set in the IPAll section, the connection URL addresses the instance directly, so the Browser service on UDP 1434 can stay stopped. Browser is only needed when a named instance keeps dynamic ports and the client must ask for the current port number.
Does co-locating the Gateway on the same computer as LocalDB change anything?
No. The JDBC driver still opens a TCP socket, LocalDB still binds none, and the connection fails exactly as it does from a remote server. Moving the Gateway onto the workstation only removes the network hops that were already succeeding.
Where do I manage the SQL Server JDBC driver inside Ignition?
On the Gateway webpage, under the Config section, the Databases Drivers page lists the installed JDBC drivers and is where you add or update them. Confirm the MS SQL Server driver entry there before creating the connection, because a connection cannot validate without its driver present.