Select to view content in your preferred language

Cannot print. Very frustrating problem.

19823
87
03-26-2019 09:19 AM
CarlTownsend1
New Contributor III

Hi, I'm trying to use the print widget but it fails with the error message failed to create layer from service at http....../..../.../....etc. doesn;'t matter the page size or format, it always fails.

I'm using webAppBuilder 2.11 on our dev server and using locallayer to bring in layers from ArcGIS Server 10.6 via a published mxd.

I had the same problem when I was trying to develop a mapping service using the javascript api. printing would not work there either (It fails silently)

Assuming the print service is an out of the box solution, what else can I look at? I've looked at the setting on ArcGIS server,  I've also tried logging onto our server loading up the map and printing directly from there with no luck. I've really hit a brick wall here and everything I've tried does not work.

Does anyone have any ideas on where I could try looking next? Thanks.

87 Replies
CraigRussell
Esri Contributor

Thanks Igor, I'm seeing this on Windows Server 2016, and not seeing it on my local Windows 10 machine.

0 Kudos
IgorStreltsov1
New Contributor II

Hi David Coley,

I have the same problem. It looks like print services published from ArcGIS Pro don't work in 10.8.1. Default and custom print services published from ArcGIS Pro don't work in 10.8.1.

I created Esri case #02613636 more than one week ago. Esri Support can't reproduce this issue. Print services work correctly in their environment.

My colleagues create test script:

import os

import sys

import arcpy

aprx = arcpy.mp.ArcGISProject(r"C:\Temp\layout.aprx")

mapview = aprx.listMaps()[0].defaultView

mapview.exportToPDF(r"C:\Temp\m1.pdf", 1024, 1024, 96)

layout = aprx.listLayouts()[0]

layout.exportToPDF(r"C:\Temp\l1.pdf")

layout.aprx link or you may use any other test aprx.

If you run this script from current user from Python 3 this script will work correctly.

But this script will return the error if you will run it from service account (i.e. "arcgis" in my case).

The error message

>>> layout.exportToPDF(r"C:\Temp\l1.pdf")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\utils.py", line 191, in fn_
return fn(*args, **kw)
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\_mp.py", line 1161, in exportToPDF
return convertArcObjectToPythonObject(self._arc_object.exportToPDF(*gp_fixargs((out_pdf, resolution, image_quality, compress_vector_graphics, image_compression, embed_fonts, layers_attributes, georef_info, jpeg_compression_quality, clip_to_elements, output_as_image, embed_color_profile), True)))
OSError: C:\Temp\l1.pdf

I added this service account to the "Administrators" local user group.

0 Kudos
DavidColey
Frequent Contributor

Yeah Igor I don't know.  I know that a custom print service using Pro 2.6 going to Enterprise 10.8 did not have an issue. Clearly this is a server 10.8.1 issue in some way. I mean they had to release simultaneous (or nearly so) patches for the Network tools and the Parcel fabric tools for server at 10.8.1 so I'm not entirely surprised other server gp services might have an issue

0 Kudos
IgorStreltsov1
New Contributor II

I found "solution": change ArcGIS Server service account to local Administrator account. After this changing default print service and custom print services published from ArcGIS Pro start to work. But it is huge security hole. 

I thought that the root of the problem depends on installation account. The first time I installed AG Server from local Administrator account and if I changed ArcGIS Server use this account to start service system works correctly. OK!

Lets try Linux type installation on Windows: installer account = service account.

The second time I installed ArcGIS Server from "arcgis" account. I included "arcgis" account to the Administrators local user group. ArcGIS Server service start using "arcgis" account. The system doesn't work correctly! I changed service starting to Administrator account: system works!

So ordinary (non-admin) service account doesn't have some permissions in OS.

I'm waiting for the Esri Support reply.

TanuHoque
Esri Regular Contributor

Hi Igor Streltsov‌,
That is awesome!!! That definitely sheds some lights on this issue. Really appreciate your help.

I will keep you all posted as we make progress.

Thanks for all your patience and valuable inputs.

Tanu

IgorStreltsov1
New Contributor II

Hi Tanu,

Thanks a lot! I will waiting for the updates.

0 Kudos
DavidColey
Frequent Contributor

Our domain ArcGIS server service account is already part of an admin group (e.g. Domain\gis_admins) that has full admin privileges across the deployment because the admin group is part of the local Administrators group on each machine.  So for us, we're already doing that basically.

0 Kudos
IgorStreltsov1
New Contributor II

I included ArcGIS server service account in local admin group. I did not see any changes. The system started to work correctly after I changed ArcGIS server service account to "Administrator" (initial default local admin account).

0 Kudos
DavidColey
Frequent Contributor

That's great Igor but we can't do that in a fully distributed deployment.  I can't use a local server account, it has to be a domain account.  I tried adding the domained arcgisserver account directly to the local Administrators group just to try but to no avail . . . plus I've never ever had to do this before and we've been in a fully distributed environment since 9.x, and fully federated with enterprise since 10.6

0 Kudos
ChristoforosKatsaounis
Esri Contributor

Hi David & Igor Streltsov,


The Support Analysts might have passed this info already, but here's the bug that we logged about this behavior:

BUG-000133317: The default print service in ArcGIS Server 10.8.1 on certain Operating Systems fails to print maps with an error, “Error executing tool. Export Web Map Task : error raised" when the account running ArcGIS Server is not an administrator.


Thank yoy for sharing all your findings and helping us understand this issue better, was much appreciated!

Thank you,

Christof

0 Kudos