ArcGIS Server Custom Print (GP) Service Fails to Produce PDF output

1270
3
Jump to solution
04-30-2021 02:18 PM
Arne_Gelfert
Regular Contributor

Struggling with migration of an existing ArcGIS Server custom print service (GP Service). Basically this used the steps here to publish some custom layouts via the ExportWebMap/GetLayouttemplates server tools, as explained here.

This is working in 10.6 but not in my new 10.8 environment. I thought the issue was on the publishing end. But even after upgrading Pro to match AGE 10.8, creating new Layout files (PAGX) and republishing, the problem persists.

Here is what I'm seeing when sending webmap JSON to service from a custom Print widget in WAB ('custom' does not imply Wild West - I made some tweaks to the Print widget and this has worked just fine in 10.6).

The REST endpoint URL for the custom print service is hardcoded into the Print widget's in the WAB app's folder:

apps\my_app\configs\Print\config_widgets_Print_Widget_NaN.json

Even before submitting print job, Dev Tools informs me when opening Print widget:

 

Get Layout Templates Info Error Error: Invalid URL
    at Object.B.f.load (init.js:957)
    at init.js:88
    at c (init.js:104)
    at e (init.js:104)
    at b.Deferred.resolve.callback (init.js:105)
    at c (init.js:105)
    at e (init.js:104)
    at b.Deferred.resolve.callback (init.js:105)
    at init.js:93
    at m (init.js:108)

 

After submitting, job fails:

 

Error: esriJobFailed
    at Object._handler (PrintTask.js:7)
    at init.js:64
    at b (PrintTask.js:13)
    at Object._successHandler (init.js:2371)
    at Object._jobUpdateHandler (Geoprocessor.js:11)
    at init.js:64
    at Object.load (Geoprocessor.js:11)
    at init.js:973
    at c (init.js:104)
    at e (init.js:104)

 

The 'Geoprocessor' line goes back to '_getJobStatus' when trying to go a jobs folder.

Similary, in my AGS log file, I see an issue with getting to a PDF file ...

 

<?xml version="1.0" encoding="utf-8" ?>
<Msg time='2021-04-30T15:35:38,218' type='SEVERE' code='20010' target='customPrinting/my_failing.GPServer' methodName='GPServerSync.CheckMessages' machine='<my_server>' process='8608' thread='12016' user='null'  requestId='7dd6ba0a-ea9a-4ce1-aba8-c657f4ef8999'>Error executing tool.
Export Web Map Job ID: j715e45d677d6477ab46a9f72a68c15b5 : error raised...

E:\arcgisserver\directories\arcgisjobs\customprinting\my_failing_gpserver\j715e45d677d6477ab46a9f72a68c15b5\scratch\9e42231a-a9f3-11eb-9e8f-005056a6efee.pdf

E:\arcgisserver\directories\arcgisjobs\customprinting\my_failing_gpserver\j715e45d677d6477ab46a9f72a68c15b5\scratch\9e42231a-a9f3-11eb-9e8f-005056a6efee.pdf

Failed to execute (Export Web Map).
Failed to execute (Export Web Map).
</Msg>

 

My suspicion was that service is trying to write a PDF and lacks permissions (for whatever reason). But even granting AGS account full control over the 'directories' folder , it fails. 

Any suggestions what else I can check? I'm not sure if it's an issue with getting to the templates - I see the template files in the service directory on the AGS machine after publishing - or with creating a PDF output file, or both. 

This is published as 'Asynchronous'.

0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor

@Arne_Gelfert 

Please make sure the print service Execution Mode is Synchronous. I think WAB print widget does not like async print services.

 

About writing out pdf issue, that was a bug that fix in a 10.8.1 patch. I'd recommend you to upgrade to 10.8.1 and install the following patches.

https://support.esri.com/en/download/7834

https://support.esri.com/en/download/7868

View solution in original post

0 Kudos
3 Replies
TanuHoque
Esri Regular Contributor

@Arne_Gelfert 

Please make sure the print service Execution Mode is Synchronous. I think WAB print widget does not like async print services.

 

About writing out pdf issue, that was a bug that fix in a 10.8.1 patch. I'd recommend you to upgrade to 10.8.1 and install the following patches.

https://support.esri.com/en/download/7834

https://support.esri.com/en/download/7868

0 Kudos
Arne_Gelfert
Regular Contributor

Thanks, Tanu. I was about to reach out to you directly, based on some helpful feedback you provided last year. I said I was on 10.8 but I had actually applied SP1, so running on 10.8.1. But it looks like the bug is in 10.8.1 so I'll try out those patches. Thanks so much on a Friday afternoon!

 

0 Kudos
Arne_Gelfert
Regular Contributor

Tanu, thank you - Problem Solved!

Many hours of retracing my steps, testing, repeating, reading online posts, comparing old vs. new before I thought to post here. Man, thanks for helping me save the week. Next time, I'll have more confidence in my own process.

I do have to ask though: How do you guys manage to break existing functionality with each new release? Who is in charge of regressions testing?:face_with_rolling_eyes:


Have a good weekend and thanks again!

0 Kudos