Skip to main content
Question

FME Server Python Error Logs


clemensb
Contributor
Forum|alt.badge.img+5

Hi,

i have a Workspace which fails in FME Server. The "statusMessage= FME_END_PYTHON failure", but when I look into the log there is no Error and the last entrys are:

2017-03-14 15:36:53| 22.7| 0.0|INFORM|Translation was SUCCESSFUL with 0 warning(s) (56983 feature(s) output)

2017-03-14 15:36:53| 22.7| 0.0|INFORM|FME Session Duration: 26.5 seconds. (CPU: 19.8s user, 2.9s system)

Is there a log where the python error is logged?

I am pretty sure its because I am using Arcpy in my shutdown python script. When I use the Workspace in Desktop all is fine, but I am pointing to the right interpreter.

I found this article from Mark https://knowledge.safe.com/articles/814/choosing-a-different-python-interpreter-installati.html#heading_toc_j_9

with a link to the FME Server Administrators Guide to setup a Python Interpreter http://docs.safe.com/fme/html/FME_Server_Documentation/Content/AdminGuide/Configuring_Custom_Python_Interpreter.htm

but I get a Error 404 :(

Thanks for your help!

5 replies

Forum|alt.badge.img
  • March 14, 2017

You can see some errors in the <ServerNamer>_fmeprocessmonitorengine.log file in the resources\logs\engine\current folder (look at lines 14+):

Fri-10-Mar-2017 03:25:12 PM   INFORM   FME2016-2_Engine2   393558 : Commencing startup of process "FME2016-2_Engine2". This is attempt 5.
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                   FME 2017.0.0.0 (20170228 - Build 17259 - WIN64)
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                             FME Engine (node locked-crc)
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                           Machine host name is: FME2016-2
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2   Operating System: Microsoft Windows Server 2012 Server 4.0 64-bit  (Build 9200)
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                    Copyright (c) 1994 - 2017, Safe Software Inc.
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                                  Safe Software Inc.
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2   
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-24   FME2016-2_Engine1   FME_SHARED_RESOURCE_DIR is unset
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-24   FME2016-2_Engine1   FME_SHARED_RESOURCE_DIR has been changed and is now 'C:/FMEServerShare///resources/engine'
Fri-10-Mar-2017 03:25:13 PM   INFORM   Thread-26   FME2016-2_Engine2   FME_SHARED_RESOURCE_DIR is unset
Fri-10-Mar-2017 03:25:13 PM   INFORM   Thread-26   FME2016-2_Engine2   FME_SHARED_RESOURCE_DIR has been changed and is now 'C:/FMEServerShare///resources/engine'
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1   Translation was SUCCESSFUL
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1   Traceback (most recent call last):
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1     File "<string>", line 5in MF_Include_1489177542141
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1     File "<string>", line 3in ParamFunc
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1     File "C:\FMEServerShare\resources\engine\Transformers\Tools.py", line 10in <module>
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1       import cx_Oracle
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1   ImportError: No module named cx_Oracle
Fri-10-Mar-2017 03:25:42 PM   INFORM   FME2016-2_Engine1   393656 : Process "FME2016-2_Engine1" being restarted.
Fri-10-Mar-2017 03:25:42 PM   INFORM   FME2016-2_Engine1   393566 : Process "FME2016-2_Engine1" waiting for process output listener threads to terminate...



clemensb
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • March 14, 2017
larry wrote:

You can see some errors in the <ServerNamer>_fmeprocessmonitorengine.log file in the resources\logs\engine\current folder (look at lines 14+):

Fri-10-Mar-2017 03:25:12 PM   INFORM   FME2016-2_Engine2   393558 : Commencing startup of process "FME2016-2_Engine2". This is attempt 5.
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                   FME 2017.0.0.0 (20170228 - Build 17259 - WIN64)
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                             FME Engine (node locked-crc)
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                           Machine host name is: FME2016-2
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2   Operating System: Microsoft Windows Server 2012 Server 4.0 64-bit  (Build 9200)
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                    Copyright (c) 1994 - 2017, Safe Software Inc.
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2                                  Safe Software Inc.
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-25   FME2016-2_Engine2   
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-24   FME2016-2_Engine1   FME_SHARED_RESOURCE_DIR is unset
Fri-10-Mar-2017 03:25:12 PM   INFORM   Thread-24   FME2016-2_Engine1   FME_SHARED_RESOURCE_DIR has been changed and is now 'C:/FMEServerShare///resources/engine'
Fri-10-Mar-2017 03:25:13 PM   INFORM   Thread-26   FME2016-2_Engine2   FME_SHARED_RESOURCE_DIR is unset
Fri-10-Mar-2017 03:25:13 PM   INFORM   Thread-26   FME2016-2_Engine2   FME_SHARED_RESOURCE_DIR has been changed and is now 'C:/FMEServerShare///resources/engine'
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1   Translation was SUCCESSFUL
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1   Traceback (most recent call last):
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1     File "<string>", line 5in MF_Include_1489177542141
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1     File "<string>", line 3in ParamFunc
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1     File "C:\FMEServerShare\resources\engine\Transformers\Tools.py", line 10in <module>
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1       import cx_Oracle
Fri-10-Mar-2017 03:25:42 PM   INFORM   Thread-24   FME2016-2_Engine1   ImportError: No module named cx_Oracle
Fri-10-Mar-2017 03:25:42 PM   INFORM   FME2016-2_Engine1   393656 : Process "FME2016-2_Engine1" being restarted.
Fri-10-Mar-2017 03:25:42 PM   INFORM   FME2016-2_Engine1   393566 : Process "FME2016-2_Engine1" waiting for process output listener threads to terminate...


Thank you i found it! 

 

And its like i supposed: ImportError: No module named arcgisscripting

 

Do you know how to change the interpreter?

 

 


Forum|alt.badge.img
  • March 14, 2017
clemensb wrote:
Thank you i found it!

 

And its like i supposed: ImportError: No module named arcgisscripting

 

Do you know how to change the interpreter?

 

 

Try this link: Using python with FME Server

 

 


david_r
Evangelist
  • March 14, 2017

@larry is right about the log file, you will find it in the admin interface under Resources / Logs / engine / current.

You can use the excellent traceback module to include a detailed error message in the actual job log. 

Here's an example shutdown script:

import traceback
import fme
try:
    # Your code here
    test = 1 / 0
except:
    with open(fme.logFileName, 'a'as fmelog:
        # Re-open FME log file in append mode
        fmelog.write("An error occurred in the shutdown script:\n")
        fmelog.write("-" * 75 + '\n')
        fmelog.write('\n'.join(traceback.format_exc().splitlines()) + '\n')
        fmelog.write("-" * 75 + '\n')
    raise # Re-raise the original exception

Result from the end of the job log:

0684Q00000ArLUPQA3.png


clemensb
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • March 15, 2017
david_r wrote:

@larry is right about the log file, you will find it in the admin interface under Resources / Logs / engine / current.

You can use the excellent traceback module to include a detailed error message in the actual job log. 

Here's an example shutdown script:

import traceback
import fme
try:
    # Your code here
    test = 1 / 0
except:
    with open(fme.logFileName, 'a'as fmelog:
        # Re-open FME log file in append mode
        fmelog.write("An error occurred in the shutdown script:\n")
        fmelog.write("-" * 75 + '\n')
        fmelog.write('\n'.join(traceback.format_exc().splitlines()) + '\n')
        fmelog.write("-" * 75 + '\n')
    raise # Re-raise the original exception

Result from the end of the job log:

0684Q00000ArLUPQA3.png

Very nice solution!

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings