IMD SolutionComputing LibraryShop main store

Troubleshooting

Ignition redundant gateway: one database connection faulted

Edge computing and IIoT Published 7 min read By IMD Solution engineering team

Short answer

When the primary gateway's database connection shows FAULTED while the warm-standby backup stays connected, the SQL Server instance is up and the fault belongs to the primary's own path. Compare both gateways against the same endpoint in a fixed order — connectivity, authentication, connection allocation, query execution — and repair the stage that fails. The shared database user proves nothing: each gateway opens its own sockets, pool and workload.

On this page
  1. What FAULTED shows and what the connected backup proves
  2. One database user does not make the connections equal
  3. Compare the two gateways in this order
  4. Capture the exception before you change a setting
  5. Worked example: a pool only the active node can exhaust
  6. The fix that matches the failing stage
  7. Prove the repair on the faulted path
  8. Questions asked

When the active gateway in an Ignition 8.1 redundant pair reports a database connection as FAULTED while the standby backup still reports connected, the SQL Server instance is up and accepting logins. The fault belongs to the active node's own path: its network route, its name resolution, its login attempt, or its connection pool. Compare the two gateways against the same database endpoint in one fixed order — connectivity, authentication, connection allocation, query execution — and repair the first stage that fails. Sharing one database user proves nothing: each gateway opens its own sockets, runs its own pool and carries its own workload. The steps below fit a pair of virtualized gateways writing to one SQL Server host.

What FAULTED shows and what the connected backup proves #

The gateway status page lists every database connection and its state, and for a faulted connection the Details button at the right of the row shows the full error text instead of a status label. That text is the most useful artifact in this fault, because it names the stage the connection failed at. Save it before you restart anything.

The backup's connected status proves three things: the SQL Server service is listening, at least one valid login exists for the database, and the backup's network path works end to end. It does not test the active gateway's path, the active gateway's copy of the connection configuration, or its pool. Treat the backup as a reference point, never as a pass for the pair.

One database user does not make the connections equal #

Each gateway is a separate host opening separate TCP connections from its own address. The shared username does not share the IP path, the open sockets, the connection pool or the query workload between the nodes, and two consequences follow from that.

First, a primary-only fault fits a primary-only cause: a virtual adapter down on one VM, a firewall rule scoped to one subnet, a hosts-file override on one machine, or a pool saturated by the active node's heavier work. Second, a long-established backup session can keep working through a problem that blocks every new connection, so a connected status is weaker evidence than a fresh connection test. When you compare, open a new session from the backup host too — a read-only query against a known table is enough — instead of trusting the status page.

If both nodes write to one historian schema, attribute each session to its host before you judge connection counts; the method for identifying the source gateway in a shared historian database tells the writers apart.

Compare the two gateways in this order #

Run the four stages in sequence and stop at the first failure; each stage's result names the fault as transport, authentication, allocation or execution.

  1. Connectivity. Resolve the configured SQL Server host name on both gateway VMs and compare the addresses; a split DNS zone or a stale hosts entry can send the primary to a dead address while the backup reaches the live one. Then test the configured database port from each host and record which node is refused. A port refused on the primary alone is a transport fault: fix the route, the firewall rule or the virtual switch before touching anything in Ignition.
  2. Authentication. If the TCP handshake succeeds but the connection still fails, match the gateway's exception timestamp to the failed-login record in the SQL Server error log. SQL Server reports failed logins as error 18456, and the state recorded with that error separates causes such as invalid credentials, password expiration and a login sent to an instance in the wrong authentication mode. A rejected login on the primary means the fault sits in that node's stored connection settings or in the login's server-side state, not in the network.
  3. Connection allocation. If logins succeed but requests stall, compare the primary's active connection count with the pool maximum configured on its database connection. The pool exposes a maximum active limit and an idle limit, and the documented idle limit accepts a negative value to leave idle connections uncapped. Acquisition failure is enough to flip the status to FAULTED while the server stays completely healthy.
  4. Query execution. If connections are granted but queries hang, inspect running requests, blocking sessions and wait types on the server during a fault window. Long reports and blocking transactions hold connections and starve the pool; unbounded historian growth slows the historian's own queries, and cutting Ignition Tag Historian growth before compressing the table is the fix for exactly that.

Capture the exception before you change a setting #

Open the faulted connection's details and copy the full error, including the nested database-driver exception. That nested text separates the four stages more cleanly than the FAULTED label does: connection refused names transport, a failed login names authentication, an acquisition wait that expires names the pool, and a cancelled query names execution. Raising a timeout first hides the distinction — once every wait is long, an unreachable listener and a slow query fail in the same way.

Record the fault time to the second and confirm clock sync across both gateway VMs, the SQL Server host and the hypervisor, because correlating the fault with hypervisor network events is what separates a VM-level network drop from a database-side problem. Note whether requests fail immediately or wait before failing: an immediate refusal points at transport or login, a wait that ends in a timeout points at allocation.

Worked example: a pool only the active node can exhaust #

Every number below is an example value; read the real ones from your connection's settings page and your pool occupancy history.

Suppose the primary's pool maximum is 8 connections, and under normal load the node holds 3: two for historian writes and one for the alarm journal. A shift report then opens 6 parallel requests, each holding a connection for 90 seconds. Demand is 3 + 6 = 9 connections against a cap of 8, so one request waits. If the acquisition wait is set to 30 seconds, that request fails at second 30 while the report still holds its connections until second 90, and the connection's status flips to FAULTED with the server healthy throughout.

The backup node runs its own pool of 8 against its own lighter standby load, so it never approaches its cap — which is precisely why one node faults while the other does not. The measured peak demand here is 9 connections, so a corrected maximum of 12 leaves 3 spare: sized from the graph, not guessed.

This failure mode and its timing are the subject of the page on Ignition connection pool timeout after redundancy failover, and the guide on resolving Datasource is FAULTED connection pool errors walks the same acquisition path on a standalone gateway.

The fix that matches the failing stage #

Repair the stage the tests named: one stage, one change, then retest.

  • Transport refused on the primary only. Correct the difference between the two VMs' paths — the adapter state and its virtual switch attachment, the route, name resolution, or the firewall rule covering the primary's subnet. No Ignition setting repairs a dropped VLAN.
  • Login rejected. Correct that node's copy of the connection configuration, or the login's server-side state such as password expiration. The working backup proves its own copy is right, so diff the two nodes' connection settings field by field; a redundant pair keeps a configuration copy per node, and the copies drift.
  • Pool exhausted. Identify what holds the connections during the failure window, fix the query or transaction that will not release, and raise the maximum to the measured peak demand plus headroom, the way the worked example above does. Raising the cap past demand you have not measured just moves the stall to the SQL Server side.
  • Queries stalled. Stop or tune the blocking request, and check historian table growth on a pair where both nodes write history.

One safety note: before restarting either node, confirm from the redundancy pages which one is active, and restart only the node whose load you can afford to move, so the pair is never left with neither side proven connected.

Prove the repair on the faulted path #

Re-test from the primary host, not from the backup: resolve the database name, open a fresh connection with the credentials the connection uses, and run a read-only query against a known table. Then return the node to service and watch pool occupancy through the workload that caused the first fault. A diagnostic read proves only the path and operation tested at that moment, so keep historian collection and production writes in view until the status has held through one full cycle of the heaviest scheduled work.

Questions asked

Where do I confirm which redundant node is active before restarting anything?

In the gateway configuration, under the Configure tab, Systems > Redundancy, which is the documented home of all redundancy settings. The page names the active and standby nodes and their current state. Check it before any restart so you take down the faulted node and never the one carrying the load, and confirm the standby is synchronized first.

Does SQL Server error 18456 always mean the password is wrong?

No. It is the generic failed-login message, and the state value recorded beside it in the SQL Server error log separates the causes: invalid credentials, an expired password, or a login sent to an instance running in the wrong authentication mode. Read the recorded state, then check the faulted node's own copy of the connection settings against it.

Should I restart the gateway or the connection to clear a FAULTED status?

Capture the connection's full error text and the relevant gateway log lines first, because a restart discards the exception that names the failing stage. If a restart does restore the connection, treat that as a result: it points to a transient network drop or a pool that recovered once its holders finished, so compare the fault time with hypervisor and network logs instead of waiting for a repeat.

How large should the connection pool be on a redundant pair?

Size each node's maximum from that node's measured peak occupancy rather than from a default. Remember that the server sees both pools: during a reporting burst or a failover, the SQL Server host can face the sum of both nodes' maxima at once, so check that total against what the instance can grant before raising either cap.

Keep reading

  • Troubleshooting

    Fix Ignition SQL Server connection faults after an upgrade

    After an Ignition 8.1.x upgrade, a faulted SQL Server connection is almost never a credentials problem: the new Java runtime disables TLS 1.0 and 1.1 (builds from 8u291), and a Microsoft JDBC driver as old as 4.0 cannot run on it. Read the Gateway exception, then patch SQL Server to TLS 1.2 per KB3135244 or replace the driver; the reported working pair was 9.4 in place of 4.0.

    Edge computing and IIoT

  • Troubleshooting

    Cannot create PoolableConnectionFactory: SSL protocol error fix

    The SSL protocol error behind Cannot create PoolableConnectionFactory comes from the legacy sqljdbc4.jar: it proposes no TLS protocol a current Java 8 update still allows, so the JVM aborts the handshake before any packet leaves the host. Replace it with Microsoft's 7.4 jre8 driver on the gateway's Drivers page, keep the class name, and skip the java.security and Schannel registry edits — they act on hops the handshake never reaches.

    Edge computing and IIoT

  • Troubleshooting

    Fix Ignition custom historian aggregates that return zeros

    A zero-filled result from an Ignition custom historian aggregate means the callback failed, not that every stored value was zero. The Gateway log names the cause: NameError: global name 'shared' is not defined, raised in pyaggimpl. Select the project that contains your aggregate's script library as the Gateway Scripting Project, publish it, and rerun the query.

    Edge computing and IIoT

Why redundant historians recover from Sender disk buffering