IMD SolutionComputing LibraryShop main store

Troubleshooting

PI Historian connector service will not start: fix 0xe0434352

Edge computing and IIoT Published 6 min read

Short answer

When the PI Connector for Wonderware Historian service stops during startup with exception code 0xe0434352, the host process crashed on a ReflectionTypeLoadException while scanning its assemblies. Run the connector host from a console to read the LoaderExceptions, and you will normally find the Historian client library aahClientManaged.dll missing; install the matching Historian client release instead of repairing Windows.

On this page
  1. What does the failed start look like in the Windows event log?
  2. How do I get the real missing-assembly name from a console run?
  3. Why is aahClientManaged.dll missing and which file must supply it?
  4. Does the service account change the result?
  5. What is the fix, in order?
  6. When is the connector host itself at fault?
  7. Questions asked

The PI Connector for Wonderware Historian service flips from Starting to Stopped and the Connector Admin page never answers because the host process, WonderwareHistorian.ConnectorHost.exe, crashed during service startup on an unhandled ReflectionTypeLoadException. Exception code 0xe0434352 in the Windows Application log is the generic .NET unhandled-exception code; the real cause is a dependency assembly the loader cannot resolve. Run the connector host from an elevated console, read the loader error it prints, and you will almost always find one named file missing — on the recorded installation it was the Historian client library aahClientManaged.dll, which the connector expects the Historian client software to supply. Installing the matching Historian client release fixes it; do not repair Windows or the .NET Framework for this.

What does the failed start look like in the Windows event log? #

Read four fields of the Application-log crash record and you have the whole diagnosis direction: the faulting application is the connector host, the exception code proves a managed crash, the exception type proves an assembly-scan failure, and the entry point proves it happened before any configuration was read. A second record under Applications and Services Logs, in the PI Connectors log, may add connector-level messages written before the crash.

The recorded failure carries these exact values:

  • Faulting application: WonderwareHistorian.ConnectorHost.exe, version 1.3.14.0 — the crash is in the connector, not in a Windows component.
  • Faulting module: KERNELBASE.dll, version 10.0.17763.652 — only the native point where the runtime rethrew the exception. It is not the defective component, so patching or repairing Windows cannot help.
  • Exception code: 0xe0434352 — the code Windows uses for an unhandled managed (.NET CLR) exception.
  • Exception type: System.Reflection.ReflectionTypeLoadException, thrown at System.Reflection.Assembly.GetTypes() from System.ComponentModel.Composition.Hosting.AssemblyCatalog, reached from OSIsoft.Tau.Composition.CompositionHost.Create inside ConnectorHostService.OnStart.

That last chain is the decision: at startup the host builds a composition catalog over every assembly in the connector folder, calls Assembly.GetTypes() on each, and any type that references an unresolvable dependency makes the whole call throw. Nothing catches it in OnStart, so the service process terminates. The Windows log does not name the missing dependency — that name sits in the exception's LoaderExceptions collection, which the crash record omits. Get it from a console run.

How do I get the real missing-assembly name from a console run? #

Stop the service, open an elevated command prompt, change into the connector folder and start the host directly, so the exception text prints to the console instead of dying inside a service wrapper:

cd "C:\Program Files\PIPC\Connectors\WonderwareHistorian"
WonderwareHistorian.ConnectorHost.exe

Two kinds of output appear, and only one matters. Lines reading "Invalid Authenticode Signature Verification for Assembly" for Amqp.Net.dll, MessagePack.dll, Microsoft.IO.RecyclableMemoryStream.dll, Newtonsoft.Json.dll and similar third-party libraries, repeated twice per file, are logged signature checks — noise, not the terminating exception. The terminating line is the one that names a file the loader cannot find. On this installation it was:

System.IO.FileNotFoundException: Could not load file or assembly
'aahClientManaged, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=33bb9b233ad963e6' or one of its dependencies.

Branch on what you see:

  • A named FileNotFoundException like the one above — the host cannot resolve a dependency assembly. Go to the next check.
  • Silent exit, nothing printed — suspect the service account instead of a missing file; run the account check further down.

Why is aahClientManaged.dll missing and which file must supply it? #

The connector folder contains the connector's own signed libraries but not aahClientManaged, because the connector expects the Wonderware Historian client software to have installed it on the host already. The OPC UA connector does not reference this library, which is exactly why that connector installed and started cleanly on the same machine while the Historian connector crashed. Search the strong-name cache and the Program Files trees for any copy, with its file version:

Get-ChildItem 'C:\Windows\Microsoft.NET\assembly','C:\Windows\assembly' `
  -Recurse -Filter aahClientManaged.dll -ErrorAction SilentlyContinue |
  Select-Object FullName, @{n='FileVersion';e={$_.VersionInfo.FileVersion}}
Get-ChildItem 'C:\Program Files','C:\Program Files (x86)' `
  -Recurse -Filter aahClientManaged.dll -ErrorAction SilentlyContinue |
  Select-Object FullName, @{n='FileVersion';e={$_.VersionInfo.FileVersion}}

Worked example of the binding decision. The connector was built against the strong-name reference shown in the console error: assembly name aahClientManaged, version 2.0.0.0, public key token 33bb9b233ad963e6. Suppose your search finds a copy reporting file version 2.1.0.0 from a different token. The .NET loader binds to the exact reference recorded in the connector, so that copy does not satisfy it and the same FileNotFoundException returns at the next start. The fix is the release of the Historian client that supplies assembly version 2.0.0.0 with that token, as named in the connector's documented prerequisites for host version 1.3.14.0 — not a hand-copied DLL from another machine.

If a correct-identity copy exists and the error still says "or one of its dependencies", a native or runtime dependency of that library is missing, or its bitness differs from the host process. The crash record's 64-bit fault offset and the path under Program Files mark the host as a 64-bit process; confirm with the Platform column on Task Manager's Details tab while your console instance runs, and capture the failing load with a process monitor filtered on the host process name and the result NAME NOT FOUND. Once the file question is settled, keep the same host healthy by checking the client-side connections it feeds — the historian trend client connection failure checks cover the next layer.

Does the service account change the result? #

Run the console test as your own elevated user, then start the service under its configured logon identity, and the comparison alone tells you whether this is a dependency problem or an access problem:

  • Console fails, service fails — missing dependency; the account is irrelevant. Fix the file per the previous check.
  • Console runs to a listening state, service fails — the service identity cannot read the connector folder or the Historian client library folder. Grant that account read and execute on those folders.
  • Console runs, service runs — resolved.

Adding the service account to the local Administrators group is a valid one-time diagnostic: if the service then starts, you have proven an access problem. Reverse the membership immediately and grant read and execute on the specific folders instead, because the connector runs with least privilege there. The same console-versus-service split decides many service-mode faults; the Citect OPC DA runtime manager service-mode failure is another case where the identity context, not the configuration, breaks the start.

What is the fix, in order? #

  1. Stop the connector service so it does not respawn while you work.
  2. Read the connector's documented prerequisites for your installed host version and identify the Wonderware Historian client release that supplies aahClientManaged with assembly version 2.0.0.0, public key token 33bb9b233ad963e6.
  3. Install that Historian client release on the connector host from the vendor's distribution. This is the actual fix for the recorded failure.
  4. Start the host from the console once more; it should get past composition and reach a listening state, with only the Authenticode noise lines printed.
  5. Start the service. If it alone still fails, grant the service account read and execute on the connector folder and the Historian client library folder.
  6. Open the Connector Admin interface and confirm both connectors are listed and running.

Once the service holds, verify data end to end before declaring the job done: confirm the connector writes a known tag and a fresh timestamp into the historian, then check retrieval. If values stop appearing later, the missing-data checks for a Node-RED InfluxDB Grafana stack give an analogous isolation path — trigger, write, buffering, retention — that applies to any store-and-forward chain.

When is the connector host itself at fault? #

Only when the console run with the correct client release installed still throws inside the composition scan with a different named dependency each time, or when the connector log shows the failure recurring after a clean reinstall of both connector and client. At that point collect the console output, the two event-log records and the connector log, and take them to the vendor's support channel — the executable, its version 1.3.14.0 and the prerequisite mismatch are all documented facts a support engineer can act on. Everything before this point is a dependency or permissions problem on the host, not a defect in the connector.

Questions asked

Why does the PI Connector for OPC UA start fine while the Historian connector crashes on the same host?

The two connectors carry different dependencies. The OPC UA connector does not reference aahClientManaged.dll, so it starts even when the Wonderware Historian client components are absent. The Historian connector scans every assembly in its folder at startup and stops as soon as one type cannot resolve that library.

Can I just add the connector's service account to the local Administrators group?

Only as a one-time diagnostic. If the console run works and the service fails, an access problem is proven, but leaving the account as administrator grants far more than the connector needs. Reverse the change and give the account read and execute on the connector folder and the folder holding the Historian client library.

What does exception code 0xe0434352 actually mean?

It is the code Windows logs when a .NET process terminates on an unhandled managed exception. It names no cause by itself. KERNELBASE.dll appears as the faulting module only because that is where the runtime rethrows the exception; the real cause sits in the managed stack and LoaderExceptions text.

Where do I get aahClientManaged.dll from?

From the Wonderware Historian client software, installed from the vendor's own distribution. The connector does not ship the library; its prerequisites document which Historian client release supplies assembly version 2.0.0.0 with public key token 33bb9b233ad963e6 for your connector build. Do not copy the file from another machine.

The console run shows Invalid Authenticode Signature messages. Are those the problem?

No. Those lines are logged checks of third-party libraries such as Amqp.Net.dll, MessagePack.dll and Newtonsoft.Json.dll, repeated twice per file, and they do not terminate the process. The terminating line is the one that says the process cannot load a specific assembly; fix that one first and revisit the signature messages only if the service still fails.

Keep reading

  • Troubleshooting

    Historian replication sends raw values to PI Server: fix it

    Historian 2023 R2 replication carries raw values to PI Server and scaled values to another Historian, so PI-bound tags need their value selection checked before any scaling change. Confirm the mismatch by comparing one stored sample at both servers against the source tag at the same timestamp. Then convert in exactly one place: scaled-value selection in the PI-bound interface if documented, otherwise one downstream conversion.

    Edge computing and IIoT

  • Comparison

    Move DeltaV Continuous Historian data into a PI system

    When PI points exist, collect DeltaV live values with OPC DA and recover history with OPC HDA; when points and AF structure are missing, let the DeltaV Smart Connector create them from EntHist.xml. Add PI-to-PI only for a second office-LAN server. Prove buffering, service identity and archive coverage by test before the bulk load.

    Edge computing and IIoT

  • Troubleshooting

    PI-to-PI interface service will not start from FactoryTalk Historian

    When the PI-to-PI interface service will not start, the fault sits in the local launch, access to the two historians, or the FactoryTalk Historian license, which must permit native OSIsoft clients. Capture the exact startup error, work the three gates in fixed order, then prove the destination with values, timestamps and quality.

    Edge computing and IIoT

Export CSV when a Canary historian event closes a batch