Print error: failed to create layer from service at https://xxx

02-03-2017 04:21 PM
by MVP Regular Contributor
MVP Regular Contributor

Hello Everyone,

A little background: I am trying to print a web map made in the ArcGIS portal, but it always fails. when check the log in the ArcGIS Server, I get the above error message.

Further investigation shows that only one particular layer is causing the problem------ if I turn this particular layer off, the printing function works .

About this layer, it is

a point feature service

not secured, and shared with everyone in my organization, authentication method is IWA

published from a federated server

I tried to print from the map viewer in Portal for ArcGIS and also in web appbuilder, both has the same issue. Please see the attached screenshot for the error message in the ArcGIS server log.

Any suggestions for the cause are highly appreciated.


It has something to do with token --- although my service is shared with everyone in our organization.

I execute the print service in the ArcGIS Rest Service Directory, and changed the Web Map as JSON string to attache a token to the layer, it works.

"id": "AssetIQ_XXX836",
"title": "AssetIQ_XXX836",
"opacity": 1,
"minScale": 0,
"maxScale": 0,
"layerDefinition": {
"drawingInfo": {
"renderer": {
"type": "simple",
"label": "",
"description": "",
"symbol": {
"color": [133,
"size": 4,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSCircle",
"outline": {
"color": [0,
"width": 1,
"type": "esriSLS",
"style": "esriSLSSolid"
"token": "nPdB4nuw5kJv3hznsxVberjUjbZb-4ewrwqtJB42JCZu-71XpzKNalpuJvz-UpnIto5hPgNpzAuooh6gZe2-clSgvW9l6y1SUqhQIfbauok1ud4uOsNyqv3Wb3gdm_-caAQrY3X8utQkUIwLHbG2Bg..",
"url": "https://xxxxxxxx.gxx.xxu/arcgis/rest/services/AssetIQ_Redesign/AssetIQ_2017_Labels/FeatureServer/0"

It looks like the account running the print geoprocessing service can't be authenticated using the IWA to access this shared layer, but this is I am guessing.


Tags (2)
4 Replies
by Anonymous User
Not applicable

Is the Map/Feature Service internal only? What's its URL?

In Portal, have you specified the print service URL for your organization? If it is still using the default URL it won't be able to hit your internal only services.

Easiest test: if you open your web map in Portal in Google Chrome and open the developer tools and click on the 'network' tab within Dev tools, and then try to execute the print task, you'll see a REST call to the print service. Can you share what URL is being invoked by the print service, as well as the message's request body?

by MVP Regular Contributor
MVP Regular Contributor

The Feature Service is "internal", I mean it's only visible inside of the corporate network, but the Print Service is also hosted in the intranet and on the same Federated ArcGIS Servers.

And I specified the print service in the print widget in Web Appbuilder, so what's set in the utility service in the portal does not matter.

I ended up creating a print service using my own windows credential, that kind of worked but not without annoying side effects.

0 Kudos
Esri Notable Contributor

Certainly related to IWA. You need to use a custom print task configured with an account that has access to the service you want to print. Have you tried the workflow outlined in this post?

0 Kudos
by MVP Regular Contributor
MVP Regular Contributor

Yes, that was exactly what I did following the instruction. I used my own windows credential to create the print service and it worked. but the problem is I have to change my passwords periodically, as a result, I have to recreate the service every time when I change my password. Not a perfect solution.

The question remains to today, what's wrong with the default "arcgisserver" account? what permission is it missing or what permission does it need to make the print service working? we asked the ICT to create the arcgisserver account when we were about to install the arcgis servers and portal, all permissions were set according to ESRI document. the arcgisserver account were supposed to be used by services....

0 Kudos