Product Licensing in Scheduled Batch

3651
16
01-04-2013 07:00 AM
AprilNunn
New Contributor
I have an application that selects records from a SQL Server table and geocodes the address, returning the XYs and populating fields in the row. This app was originally written for ArcGIS 9.3, later modified for 10. It was called from either a scheduled task (Server 2008) or xp_cmdshell in SQL Server (2008r2) and worked perfectly.

But after moving to 10.1 the application no longer works from batch. It runs fine in a command window logged into the server as any user, including the account used for tasks/jobs. It stops when attempting to bind the license with the following error in the Event Log. Any ideas?


[INDENT]Faulting application name: geocode.exe, version: 0.0.0.0, time stamp: 0x50e6f6bf
Faulting module name: AfCore_libFNP.dll_unloaded, version: 0.0.0.0, time stamp: 0x4f920360
Exception code: 0xc0000005
Fault offset: 0x5963e9b0
Faulting process id: 0x9230
Faulting application start time: 0x01cdea912fe817ed
Faulting application path: C:\tasks\geocode.exe
Faulting module path: AfCore_libFNP.dll
Report Id: 6e229a8d-5684-11e2-9618-78e7d1ec71be[/INDENT]


Thanks,
April
0 Kudos
16 Replies
AprilNunn
New Contributor
Not exactly, but something to do with logon. I was told very little by the security team. Maybe there are more details in the link on the other post???

Sorry,

April
0 Kudos
AnaAlvarez2
New Contributor
Not exactly, but something to do with logon. I was told very little by the security team. Maybe there are more details in the link on the other post???

Sorry,

April


Hello,

I have the same problem. Does anyone know the permissions required to run Python from a scheduled task?

Thanks,
Ana
0 Kudos
JulieKub
New Contributor
The Esri development team gave me a fix.

The issue here is that the FLEXnet Licensing Service (which Esri now uses at 10.1, but was not used in 10.0) doesn�??t have the proper execution permissions set to it such that the �??Network Service�?� account can start it.

Esri working on a patch, but in the meantime, there is a manual workaround:

1. Ensure that you are logged in as a user with administration privileges on the machine.

2. From the windows Start menu, select run and enter �??cmd�??. Right-click on �??cmd.exe�?� and select �??Run as Administrator.�?�

3. In the command prompt, run the following command:
sc sdshow "FLEXnet Licensing Service"

This will print out the DACL permissions that are registered with that service:
D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCLCSWRPLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

We need to insert �??(A;;CCLCSWRPWPDTLOCRRC;;;WD)�?� into the permission string, such that it becomes:
D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NU)(A;;CCLCSWRPWPDTLOCRRC;;;WD)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCLCSWRPLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
NOTE:  The user�??s DACL string may vary, and edits to the string should be done carefully.

4. To register the DACL with the service run the command:
sc sdset "FLEXnet Licensing Service" ${your original DACL string with the new permission string inserted}

For the example above you would enter:
sc sdset "FLEXnet Licensing Service" D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;NU)(A;;CCLCSWRPWPDTLOCRRC;;;WD)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCLCSWRPLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

5. You should see a [SC] SetServiceObjectSecurity SUCCESS. That's it. Network Service should now run without error.
0 Kudos
JulieKub
New Contributor
I don't know why my last post added strange unhappy face characters.

Please look at my other post at:
http://stackoverflow.com/questions/15051467/arcgis-10-1-net-windows-service

This is the same information without the unhappy face symbols.
0 Kudos
KenBuja
MVP Esteemed Contributor
You can avoid those symbols by putting the text in one of the wrappers such as CODE or QUOTE. The text interpreter transforms groups of characters such as : followed by ( as 😞
0 Kudos
emelinerenz1
New Contributor II
Just to chime in here...

I was running a BAT script from Task Scheduler that called a python script. I could run it from Windows Explorer or the command line, but it was failing with the same error when running from Task Scheduler, "Faulting module name: AfCore_libFNP.dll_unloaded".

In the BAT file, I was referencing:
<Drive>:\Python27\ArcGIS10.1\python.exe

When I changed the path to:
<Drive>:\Python27\ArcGISx6410.1\python.exe

the Task ran successfully.

If you are running the app on a 64-bit server, try using the x64 directory path to python.exe instead. Worked for me.
0 Kudos
MichaelBlom
New Contributor III
Hi

I am not using the LM service... my arcmap install on this box is stand-alone.

Everything runs when the user has admin permissions, but I cannot determine where permissions need to be set so that I can run the sched task without admin permissions.

Does anyone know which folders are read to get the licensing for a stand-alone install?

I'm using process monitor, but it's not raising any alarm bells.

I did notice in my reg keys that FlexNetService was set to true.. i tried making this false and re-running but no luck.

Thanks,
Mike
0 Kudos