Hi guys,
I have a problem that occurs when you try to publish a hosted feature (copy data) to Portal from ArcGIS Pro.
The service definition-file uploads to Portal just fine, and for a short period of time, a hosted feature with the same name is created in the Portal but then Pro goes "Failed to publish web layer" and the hosted feature is removed from Portal.

The Pro-log reads:
| | | ...more successful operations above here, cut out... |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Compressing package into SD file |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Staging successful |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Uploading service definition |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Publishing tool initialized |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Publishing web layer (AGO) |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Failed. Failed to execute (Publish Portal Service). Failed. |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Publishing web layer failed (AGO) |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Server Response: {"hasVersionedData":false,"supportsDisconnectedEditing":false,"supportedQueryFormats":"JSON","currentVersion":10.81,"serviceDescription":"","maxRecordCount":2000,"capabilities":"Query","description":"","copyrightText":"","spatialReference":{"wkid":3006,"latestWkid":3006},"fullExtent":{"xmin":438713.39250000007,"ymin":6393012.90599999949,"xmax":527327.68699999992,"ymax":6533343.0839000009,"spatialReference":{"wkid":3006,"latestWkid":3006}},"initialExtent":{"xmin":364851.86917459668,"ymin":6354372.8373888936,"xmax":596411.18957539252,"ymax":6583317.30975505,"spatialReference":{"wkid":3006,"latestWkid":3006}},"units":"esriMeters","allowGeometryUpdates":true,"enableZDefaults":true,"zDefault":0,"syncEnabled":false,"supportsApplyEditsWithGlobalIds":false,"maxViewsCount":20,"allowUpdateWithoutMValues":true,"editorTrackingInfo":{"enableEditorTracking":false,"enableOwnershipAccessControl":false,"allowOthersToUpdate":true,"allowOthersToDelete":false,"allowOthersToQuery":true},"supportsReturnDeleteResults":true,"isLocationTrackingService":false,"hasSyncEnabledViews":false,"hasViews":false,"supportsAppend":true,"supportedAppendFormats":"shapefile,featureCollection","layers":[{"id":0,"name":"test_m2"}],"tables":[],"serviceItemId":"c283eb374db942a49595a6341d997741"} |
| 2021-01-28 21:24 | Status: InProgress | StatusMessage: Publishing tool execution failed |
| 2021-01-28 21:24 | Status: Failed | ErrorMessage: Failed to publish web layer |
The log from Server Manager reads:
| SEVERE | 28 jan. 2021 21:24:42 | Error executing tool. Publish Portal Service Job ID: j7f2ec07d2c654eeb81499fbc6ce749f3 : Failed. Failed to execute (Publish Portal Service). | System/PublishingTools.GPServer |
| SEVERE | 28 jan. 2021 21:24:42 | Delegate job failed. | System/PublishingTools.GPServer |
| SEVERE | 28 jan. 2021 21:24:42 | The containing process for 'System/PublishingToolsEx' job 'j51c7db29ac9d4661bc425aa5d5d3b925' has crashed. | Server |
| SEVERE | 28 jan. 2021 21:24:36 | Instance of the service 'System/PublishingToolsEx.GPServer' crashed. Please see if an error report was generated in 'C:\arcgisserver\logs\<domain>\errorreports'. To send an error report to Esri, compose an e-mail to ArcGISErrorReport@esri.com and attach the error report file. | Server |
Local server logs:
"Source: .NET Runtime"
Application: ArcSOC.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 00007FFDA8088947
"Source: Application Error"
Faulting application name: ArcSOC.exe, version: 12.6.0.24234, time stamp: 0x5ee81bca
Faulting module name: sdepgsrvr.dll, version: 12.6.0.24234, time stamp: 0x5ee80ef4
Exception code: 0xc0000005
Fault offset: 0x0000000000068947
Faulting process id: 0x858
Faulting application start time: 0x01d6f58f52f28ee3
Faulting application path: C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\ArcSOC.exe
Faulting module path: C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\sdepgsrvr.dll
Report Id: d5af886f-61a6-11eb-8161-0050568c55d9
Faulting package full name:
Faulting package-relative application ID:
The setup is a two machine Enterprise site with one server running ArcGIS Server and DataStore and the other is running Portal. Windows Server 2012 r2 on both.
What works:
- To publish a hosted feature service from ArcMap 10.4 works just fine.
- To publish a Map Image works just fine.
- To upload a *.zip-shapefile through the web interface of Portal and publish it as a hosted service works just fine, albeit an error shows but the service itself works fine.
- To publish a hosted feature service through the Portal web interface (from the *.sd-file previously uploaded from Pro!) works, though the same error is shown in the browser

After reviewing logs it seems as this error has occured from December 5, 2020 (the ArcSOC-crash that is) but not at this scale at all and from January 18th 2021 we have not been able to publish like this at all through Pro.
What we've done:
- Feels like "everything" by now... But I'll recap what I can remember right now (late at night in Sweden)
- Restarted everything (processes, servers etc) a couple of times
- Removed/reinstalled Windows Updates from the server machines.
- Installed the IIS stability patch
- Removed and reinstalled the "Printing patch"
- Reviewed and opened ports if needed according to installation documents
- Checked traffic using Fiddler with no significant results
- Checked traffic on reverse proxys with no significant results
- Physically went to the office to check if that would make a difference, beeing on that network. (We use Direct Access from home)
- Checked that we have enough disk space everywhere
- Recreated PublishingTools and .EX
... and a bunch of other stuff.
I've probably left out lots of important stuff but my brain is aching, and also, sorry for the formatting os some stuff.
Anyone have ANY idea of what can cause this behaviour? ESRI Sweden "gave up" and suggested we order a new machine with Windows Server 2019 on and reinstall. But I would like to solve this 🙂
ANY help or suggestions at all is very welcome at this stage! Thanks!
/ Marcus