ArcGIS Pro - Failed to publish web layer to Portal For ArcGIS

10094
10
03-06-2018 09:17 AM
AlessandroValra
Occasional Contributor III

Hello,

I am trying to share a shapefile as a vector tile layer from ArcGIS Pro (2.1) to Portal for ArcGIS (10.6).

I am receiving the generic error "Failed to publish web layer".

I attach the log of the failed job. To sum up, the errors I read are:

  • Unable to write to user defined location for the local tile cache creation ()
  • Publishing web layer failed (AGO)
  • Publishing tool execution failed
  • Failed to publish web layer    ErrorMessage: Failed to publish web layer

This is what I 'm doing.

I launch ArcGIS Pro using an ArcGIS Online organizational credentials to authorize it.

I switch to Portal for ArcGIS with admin credentials, setting it as my active portal.

I do this because I cannot directly authorize Pro with Portal credential.

I then go to Share -> Web Layer -> Publish Web Layer.

I check "Copy all data" and then Vector Tile.

No messages at all when analyzing.

I press Publish and receive the error.

I already checked the permission on many folders, but I am not sure where to find the "user defined location for the local tile cache" mentioned in the log.

Also, if this could matter, the certificate of the Portal is self signed, and I am using Pro from within the LAN of the server.

Finally, I have NO problem at all publishing map image layers using the same exact procedure.

Any guess?

Thanks in advance.

10 Replies
JonathanQuinn
Esri Frequent Contributor

Can you take a look at the hosting server logs and the portal logs? They may have more information about the problem.

0 Kudos
AlessandroValra
Occasional Contributor III

Jonathan Quinn‌ I restarted the server machine (where both portal and server (the unique and hosting) are installed).

I had a look in the portal and serevr logs.

Something interesting but not helpful in the portal log is:

<Msg time="2018-03-07T10:03:07,972" type="SEVERE" code="219999" source="Sharing" process="996" thread="16" methodName="" machine="GIS.SINA.CO.IT" user="admin" elapsed=""> Impossibile pubblicare lelemento {0}. {1}</Msg>
<Msg time="2018-03-07T10:09:02,634" type="SEVERE" code="219999" source="Sharing" process="996" thread="16" methodName="" machine="GIS.SINA.CO.IT" user="admin" elapsed=""> Impossibile pubblicare lelemento {0}. {1}</Msg>

It basically means: "Impossible to publish the element {0}.{1}", which I suppos refers to the {Map} element and {layer} element (I just have a map with only one layer in Pro, it's for testing purpose).

From the server log side, nothing really related to this issue.

Something interesting: looking into the Portal Content, I see that a Vector Tile Package is created. So I tried to publish it from the Portal itself, and I get this error:

Moreover, looking in the web dev console, I can see something more useful, which is Publish exception '↵Exception: hostname in certificate didn't match: <gis.sina.co.it> != <fe8sina.sina.int>.

This is the thing I guess I need to work on!

AlessandroValra
Occasional Contributor III

So I think I might have found the possible cause of my issue.

Google the error received when publishing the vector tile from portal I saw the thread https://community.esri.com/thread/192416-error-in-portal-when-adding-item-analyze-service-error-exce... .

It seems that the problem is related to the certificate

0 Kudos
AlessandroValra
Occasional Contributor III

So I think I might have found the possible cause of my issue.

Google the error received when publishing the vector tile from portal I saw the thread Error in Portal when adding item: Analyze Service Error: Exception: hostname in certificate didn't m... .

It seems that the problem is related to the SSL certificate and the way I've federated the Server with Portal.

Basically, when federating my server from Portal (in Organization -> Servers -> Add server) I put as "Administration URL" the domain reachable from the web (which is also the one of the webadaptor).

According to the post mentioned above, as I have a self signed certificate, it might be that Portal is looking for it with a hostname different than the one I specified in the "Administration URL" parameter.

If I am not able to change this via IIS, is there a way to change that parameter (e.g. from server/admin or portal/portaladmin)?

0 Kudos
AlessandroValra
Occasional Contributor III

Wow, so...

I think I'm left with two options:

1) get a cetrificate (which is not viable right now...)

2) unfederate the server to specify the right URLs (using the FQDN).

Is this right, or can I change the server URLs of the federated server shown in the portal another way?

I'm asking because unfederating is a real PITA and also the official documentation is encouraging:

Caution:

Unfederating a server site has several significant consequences and should not be done as part of routine troubleshooting. It is not easily undone and may have irreversible consequences. Removing a hosting server from the ArcGIS Enterprise portal renders existing hosted web layers unusable. Adding the hosting server back does not return the hosted services to a usable state. Only unfederate a site if you have a clear understanding of the impact.

So, befoer trying, is there another option???

Thanks in advance!

JonathanQuinn
Esri Frequent Contributor

You can update the admin URL of the federated/hosting server through the Sharing API:

https://portal.domain.com/portal/sharing/rest/portals/0123456789ABCDEF/servers/<serverID>/update 

Set the admin URL to a URL that portal can reach and the CN set for the certificate matches the URL hostname, (either gis.sina.co.it or fe8sina.sina.int, I'm not sure which would be the correct hostname).

AlessandroValra
Occasional Contributor III

Jonathan Quinn‌ Thank you so much for taking the time to help me.

Not sure which one I am supposed to modify though.

The parallel with the Portal interface is like URL=Services URL and Server Admin URL=Administration URL?

If this is the case, I suppose I need to leave URL as it is and specify only the Server Admin URL parameter (which I am surprised to find blank, as I specified the same value as in Services URL in Portal when I federated).

And what about name?

Again, thanks a lot!

JonathanQuinn
Esri Frequent Contributor

Yes, not sure why it displays as blank, but you'll need to update the Server Admin URL. It'll be in the format https://server.domain.com:6443/arcgis, for example. Make sure that the CN for the certificate matches the URL hostname, (in the example above, the CN would be server.domain.com). Everything else can be left the same. You can check the certificate CN through your Dev Tools within the browser.

AlessandroValra
Occasional Contributor III

I did changed the Admin URL as suggested to https://fe8sina.sina.int:6443/arcgis, cleared the cache and refreshed the portal's page.

Strangely, now the error is similar but slightly changed to Publish exception '↵Exception: hostname in certificate didn't match: <fe8sina.sina.int> != <gis.sina.co.it> OR <gis.sina.co.it>.

Also, it seems I have a problem with the CN, although I created the self signed certtificate from IIS as explained in Enable HTTPS on your web server—ArcGIS Web Adaptor (IIS) Installation Guide (10.6) | ArcGIS Enterpri....

The problem I see from the dev console of the browser is net::ERR_CERT_COMMON_NAME_INVALID.

Will come back to this tomorrow. I guess it all depends on the self signed certificate now... maybe...

Thanks for your support, if you don't have other ideas, I will try to test something else and hopefully post a solution.