I have a Workspace running in FME Desktop 2017.1.1.1 on a server. The Workspace has a SQL Server Spatial Reader in it. The SQL Server database is on a different server which is in the same domain. The Reader is using a named SQL Server connection which is publicly visible. The connection uses SQL Server credentials to connect to the database (not Windows authentication). The connection is not encrypted.
The Workspace runs fine when I'm logged in. It works as a scheduled task when running as me. But when I try to run it as a scheduled task using a different user (we have a Domain service account for running scheduled tasks), it fails. I've tried the registry fix suggested here:
https://knowledge.safe.com/articles/32356/scheduling-software-doesnt-recognize-fme-connectio.html
However I still get "Invalid authorization specification" in the log file. Interestingly, since applying the above fix, I also get errors about encryption (see below). I don't know if this is progress or not!
One thing I've noticed from the log info below is that there is no "User ID" in the connection string. There's definitely one in the named connection in FME Options.
Any ideas?
2018-01-25 08:00:14| 0.6| 0.0|INFORM|FME Configuration: Using FME Reprojection Engine
2018-01-25 08:00:16| 2.8| 2.2|INFORM|Error: COM.safe.fmewebservices.FMEWebServiceException: COM.safe.fmewebservices.FMEWebServiceException: COM.safe.fmeserver.api.FMEServerException: User encryption is specified but can't find key to decrypt.
at COM.safe.fmewebservices.FMENamedConnection.getKeyValues(FMENamedConnection.java:231)
Caused by: COM.safe.fmewebservices.FMEWebServiceException: COM.safe.fmeserver.api.FMEServerException: User encryption is specified but can't find key to decrypt.
at COM.safe.fmewebservices.FMENamedConnectionUtils.AESdecryptData(FMENamedConnectionUtils.java:109)
at COM.safe.fmewebservices.FMENamedConnection.getKeyValues(FMENamedConnection.java:224)
Caused by: COM.safe.fmeserver.api.FMEServerException: COM.safe.fmeserver.api.FMEServerException: User encryption is specified but can't find key to decrypt.
at COM.safe.fmeserver.encryption.FMEEncryptionUtils.AESdecryptData(FMEEncryptionUtils.java:192)
at COM.safe.fmeserver.encryption.FMEEncryptionUtils.AESdecryptData(FMEEncryptionUtils.java:63)
at COM.safe.fmewebservices.FMENamedConnectionUtils.AESdecryptData(FMENamedConnectionUtils.java:105)
... 1 more
Caused by: COM.safe.fmeserver.api.FMEServerException: User encryption is specified but can't find key to decrypt.
at COM.safe.fmeserver.encryption.FMEEncryptionUtils.AESdecryptData(FMEEncryptionUtils.java:179)
... 3 more
2018-01-25 08:00:16| 2.8| 0.0|ERROR |Error: COM.safe.fmeserver.api.FMEServerException: User encryption is specified but can't find key to decrypt.
2018-01-25 08:00:16| 2.8| 0.0|INFORM|Creating reader for format: Microsoft SQL Server Spatial
2018-01-25 08:00:16| 2.8| 0.1|INFORM|Trying to find a DYNAMIC plugin for reader named `MSSQL_SPATIAL'
2018-01-25 08:00:16| 2.8| 0.0|INFORM|Loaded module 'MSSQL_SPATIAL' from file 'D:\\GIS\\FME\\FME_2017_1_1_1_64bit\\plugins/FME_ADO.dll'
2018-01-25 08:00:16| 2.8| 0.0|INFORM|FME API version of module 'MSSQL_SPATIAL' matches current internal version (3.8 20170315)
2018-01-25 08:00:16| 2.8| 0.0|INFORM|Microsoft SQL Server Spatial Reader: Read 1 DEF line(s). Found 5 attribute(s)
2018-01-25 08:00:16| 2.8| 0.0|INFORM|Microsoft SQL Server Spatial Reader: Opening `pdb connection name]' for read operation
2018-01-25 08:00:16| 2.9| 0.0|INFORM|Microsoft SQL Server Spatial Reader: Trying to connect using SQL Server 2012 Native Client...
2018-01-25 08:00:16| 3.1| 0.3|ERROR |Microsoft SQL Server Spatial Reader: Failed to connect using SQL Server 2012 Native Client. Provider error '(-2147217843) Invalid authorization specification'. Connection string 'Provider=SQLNCLI11;DataTypeCompatibility=80;Data Source=;Initial Catalog=ldb connection name];User ID=;Password=********'
2018-01-25 08:00:16| 3.1| 0.0|INFORM|Microsoft SQL Server Spatial Reader: Trying to connect using SQL Server 2008 Native Client...
2018-01-25 08:00:16| 3.1| 0.0|ERROR |Microsoft SQL Server Spatial Reader: Failed to connect using SQL Server 2008 Native Client. Provider error '(-2146824582) Provider cannot be found. It may not be properly installed.'. Connection string 'Provider=SQLNCLI10;DataTypeCompatibility=80;Data Source=;Initial Catalog=idb connection name];User ID=;Password=********'
2018-01-25 08:00:16| 3.1| 0.0|ERROR |Failed to open reader