Data Factory keeps getting "untrusted connection" error when logging into on prem SQL Server via IR on VM We have:

A local SQL Server database
A VM with the Integration Runtime installed on it
A Data Factory sharing this IR, working (according to the ADF interface)
Logins stored in Key Vault for SQL Server auth from data factory to log into the SQL Server via the IR

The connection string properties of the connection appear to be what I want, note encryption is set to off and trustservercertificate=true:

The IR reports as connected and working fine:

I have tested the SQL Server auth on the VM with the IR installed via the IR's Diagnostics tab. Works OK:

From Data Factory, I test using the same login parameters on the linked service connected to the IR, which works:

Note we use a lot of parameters to define the connections, these work fine as well.
I set up a dataset, using the same properties, test connection works:

Now I set up an easy copy activity using the same parameters, using the same Dataset and the same linked service:

I also preview the data I want, which works, bringing data back from the server as expected.
This makes no sense to me, I have tested using exactly the same parameters in each step, but a simple copy activity fails when all the other connection tests have succeeded. Anyone have any idea?
NOTE: I have tried setting the Linked Service connection parameters: Encryption = True which sometimes means the connection goes through OK. Again, this makes little sense.
OK, I fixed this by completely uninstalling then re-installing the Integration Runtime on the VM we are using as a gateway box.  This indicates that it can become corrupt, but the corruption is not visible to the user. We could still use the gateway for testing connections, but not for data transfer.  A careful look through of the logs didn't give any clue to the error that had caused the corruption.
The version I reinstalled was exactly the same as what was there previously, so it didn't appear to be an issue with the version (5.2.7695.1).