Solved

FME Desktop & Task scheduler - user account issue

  • 4 February 2020
  • 5 replies
  • 13 views

Badge

Hello,

I have an issue when trying to set up a scheduled task to run a workspace with FME Desktop 2018.1.

SettingsConnections

FME is installed on a windows server.

I created a folder with the following files :

  • fme_connections.data
  • fme_publicKey.jceks

This folder is setted up in the FME Options (default paths), with the full path "\\servername\path\to\folder" for the fme_connections.data and "\\servername\path\to\folder\fme_publicKey.jceks" for the public key.

The connection is public (checkbox checked) as in https://knowledge.safe.com/articles/34678/making-database-and-web-connections-public.html

I did this setting with my personnal user account.

I opened FME with my colleague's admin user account and setted up the default paths too.

Scheduled Task

The task was created by my colleague with her admin user account.

General tab
  • "Run whether user is logged on or not" is selected.
  • "Run with highest priviledges" is checked.
  • "When running the task, use the following user account:" is set to my colleague admin user account.
Trigger tab

Set to daily at a fixed hour.

Action tab

1 action only : "Start a program"

Program/Script =

"C:\Program Files (x86)\FME\fme.exe"

Add arguments (optional) =

"\\servername\path\to\workspace\workspacename.fmw"--SourceDataset_ORACLE_NONSPATIAL "ORACLE<space>SIGD" --Excel_file "\\servername\paht\to\another\folder\FileToUpdate.xlsx"
Issue
  • When running the task manually in the Task scheduler, everything is fine. The workspace is run and does what it should do.
  • When the task scheduler run the task at the hour planned, FME can't find the Oracle connection.

     

    In the logs, I noticed that the "|INFORM|FME Configuration: Connection Storage:" refers to another user than mine or my colleague's.
LogsNote : I changed the paths to put my logs online and changed the 'wrong username' userfolder name to WRONG_USER.
2020-02-04 11:26:12|   0.3|  0.3|INFORM|FME 2018.1.1.2 (20190121 - Build 18586 - WIN32)
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME_HOME is 'C:\Program Files (x86)\FME\'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Database Edition (node locked-crc)
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Serial Number: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Permanent License.
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Machine host name is: xxxxxxxxxx
2020-02-04 11:26:12|   0.3|  0.0|INFORM|START - ProcessID: 16932, peak process memory usage: 29832 kB, current process memory usage: 29732 kB
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Command line arguments are `C:\Program Files (x86)\FME\fme.exe' `\\servername\path\to\workspace\workspaceName.fmw' `--SourceDataset_ORACLE_NONSPATIAL' `ORACLE<space>SIGD' `--ExcelFile' `\\servername\path\to\another\folder\FileToUpdate.xlsx'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Connection Storage: 'C:\Users\WRONG_USER\AppData\Roaming\Safe Software\FME\'
2020-02-04 11:26:12|   0.3|  0.1|INFORM|Shared folders for formats are : C:\Program Files (x86)\FME\datasources;C:\Users\WRONG_USER\Documents\FME\Formats
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Shared folders for transformers are : C:\Users\WRONG_USER\AppData\Roaming\Safe Software\FME\Packages\18586-win32\transformers;C:\Program Files (x86)\FME\transformers;C:\Users\WRONG_USER\Documents\FME\Transformers
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Shared folders for coordinate systems are : C:\Users\WRONG_USER\Documents\FME\CoordinateSystems
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Shared folders for coordinate system exceptions are : C:\Users\WRONG_USER\Documents\FME\CoordinateSystemExceptions
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Shared folders for coordinate system grid overrides are : C:\Users\WRONG_USER\Documents\FME\CoordinateSystemGridOverrides
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Shared folders for CS-MAP transformation exceptions are : C:\Users\WRONG_USER\Documents\FME\CsmapTransformationExceptions
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Shared folders for transformer categories are : C:\Users\WRONG_USER\Documents\FME\TransformerCategories
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Reader Keyword is `MULTI_READER'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Writer Keyword is `MULTI_WRITER'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Writer Group Definition Keyword is `MULTI_WRITER_DEF'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Reader type is `MULTI_READER'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Writer type is `MULTI_WRITER'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: No destination coordinate system set
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Current working folder is `C:\Windows\System32'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Temporary folder is `C:\Users\TEMPSD~1.000\AppData\Local\Temp', set from environment variable `TEMP'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: FME_HOME is `C:\Program Files (x86)\FME\'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: FME_BASE is 'no'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: FME_MF_DIR is '\\servername\path\to\workspace\/'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: FME_MF_NAME is 'workspaceName.fmw'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: FME_PRODUCT_NAME is 'FME(R) 2018.1.1.2'
2020-02-04 11:26:12|   0.3|  0.0|INFORM|System Status: 14.58 GB of disk space available in the FME temporary folder (C:\Users\TEMPSD~1.000\AppData\Local\Temp)
2020-02-04 11:26:12|   0.3|  0.0|INFORM|System Status: 4.00 GB of virtual memory available
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Operating System: Microsoft Windows Server 10 Server 4.0 64-bit  (Build 14393)
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Platform: WIN32
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Locale: fr_FR
2020-02-04 11:26:12|   0.3|  0.0|INFORM|Code Page: 1252  (ANSI - latin I)
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Process limits are 7.95 GB of physical memory and 4.00 GB of address space
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Start freeing memory when process usage exceeds 2.83 GB of memory or 3.41 GB of address space
2020-02-04 11:26:12|   0.3|  0.0|INFORM|FME Configuration: Stop freeing memory when process usage is below 2.12 GB of memory and 2.56 GB of address space
2020-02-04 11:26:12|   0.4|  0.0|INFORM|Creating writer for format: 
2020-02-04 11:26:12|   0.4|  0.0|INFORM|Creating reader for format: 
2020-02-04 11:26:12|   0.4|  0.0|INFORM|MULTI_READER(MULTI_READER): Will fail with first member reader failure
2020-02-04 11:26:12|   0.4|  0.0|INFORM|MULTI_READER(MULTI_READER): Adding ORACLE_NONSPATIAL Reader with keyword ORACLE_NONSPATIAL_1
2020-02-04 11:26:12|   0.4|  0.0|INFORM|Using Multi Reader with keyword `MULTI_READER' to read multiple datasets
2020-02-04 11:26:19|   8.9|  8.6|INFORM|Creating reader for format: Oracle Non-Spatial
2020-02-04 11:26:19|   9.0|  0.1|INFORM|ORACLE Reader: Using Oracle Reader to read tables from database `', server type `ORACLE8i', server name `ORACLE<space>SIGD', user name `', password `***'
2020-02-04 11:26:19|   9.0|  0.0|INFORM|ORACLE Reader: Using Rich geometry.
2020-02-04 11:26:19|   9.1|  0.0|INFORM|Loaded module 'OCI' from file 'OCI.dll'
2020-02-04 11:26:21|  11.3|  2.3|INFORM|Environment variable ORACLE_HOME is not set.
2020-02-04 11:26:21|  11.3|  0.0|INFORM|Connecting to ORACLE database `ORACLE<space>SIGD' with user name of `' and password of `***'
2020-02-04 11:26:21|  11.3|  0.0|WARN  |FME_HOME folder contains the following characters: "(", ")". This may cause a connection error with older Oracle clients. FME_HOME is 'C:\Program Files (x86)\FME\'
2020-02-04 11:26:21|  11.3|  0.0|ERROR |Error connecting to Oracle database: message was `ORA-12154: TNS : l'identificateur de connexion indiqué n'a pas pu être résolu'. (serverType=`ORACLE8i', serverName=`ORACLE<space>SIGD', userName=`', password=`***', dbname=`')
2020-02-04 11:26:21|  11.3|  0.0|INFORM|Translation FAILED with 1 error(s) and 1 warning(s) (0 feature(s) output)
2020-02-04 11:26:21|  11.3|  0.0|INFORM|FME Session Duration: 9.8 seconds. (CPU: 10.6s user, 0.5s system)
2020-02-04 11:26:21|  11.3|  0.0|INFORM|END - ProcessID: 16932, peak process memory usage: 180472 kB, current process memory usage: 180468 kB
Solutions

What can I do to ensure that the connection file will be found when runing the task, so that the connection to oracle will be ok ?

icon

Best answer by p.jeremie 24 February 2020, 09:13

View original

5 replies

Badge

Hi. Nobody has an idea to help me ?

Userlevel 1
Badge +10

Hi @p.jeremie... just throwing out some suggestions that I've found in case you haven't tried these:

  1. https://knowledge.safe.com/articles/495/ora-12154-error.html
  2. https://knowledge.safe.com/questions/67342/error-message-ora-12154-when-trying-to-connect-to.html (see steveatsafe's second post).
  3. https://knowledge.safe.com/questions/25603/fme2016-run-from-task-scheduler-problem-tns-ora-12.html - this user ended up embedding the 'named database connections' in the workbench.

I hope one of these helps!

 

 

Badge

Hi. Nobody has an idea to help me ?

Hi @p.jeremie,

Did you try running the scheduled task under a service account as suggested in the following links?

https://knowledge.safe.com/questions/106164/task-scheduler-cant-run-workspace-connecting-to-ar.html

https://knowledge.safe.com/questions/27772/run-fme-workspace-as-scheduled-task-problem.html

Badge
Thank you for the links. It contains all the things I already read about running the workspace through a planned task.

I will continue doing tests with my IT collleagues. Apparently the problem is more on a user profile handling situation on the server than in the setting of the task.

 

Temporary profile used when Windows is not able to use the defined profile...

 

Badge

Hi,

 

Apparently the problem is on the server side.

The WRONG_USER folder in Users folders is in reality a temp profile which is used by Windows due to the fact that it can't open a session with the desired profile.

 

I don't know exactly why for the moment, I let my IT colleagues investigate.

I found several links to investigate, that I share here with you :

And there is a fix about this regarding Windows Server 2012 : https://support.microsoft.com/en-us/help/2896328/fix-you-are-logged-on-with-a-temporary-profile-to-a-remote-desktop-ses

Wait and see...

Reply