I have some ArcPy code that ingests some data, puts it into a file geodatabase, makes feature classes of it, creates layers for the feature classes, sets symbology on them, saves the layers to an mxd, then publishes the mxd to server, so it can be seen in Portal.

All that seems to go well, insofar as the feature classes and layers seem to be correctly populated. And there are no errors with the publishing, either. At least, it doesn't fail, or even give warnings.

When we look in Server, or Portal, the published layer (is that the right term?) seems to be there. That is, there's an entry for each published service, and the thumbnail for the data seems reasonable. However, trying to open it from portal via either MapViewer or ArcGIS Desktop fails. In MapViewer, it complains that the layer (service name) cannot be added to the map. In Desktop, the title of the window remains 'Untitled', and nothing shows up in the map view or in the layer view.

Making this more confusing, though, is that if we use the connection file to Server, and select the Service out of what appears there, it will show up on the map with no problems.

I'm a long ways from an expert on this, but that leads me to believe that it's a problem with Portal (configuration, or whatever). However, a) this is happening on two different instances of Portal, each connected to a different instance of Server, and b) publishing was working fine on Friday, and we don't know of any changes to the configuration since then.

Possibly related, one of those Portal instances refuses to allow configuration changes to be saved, even when logged in as arcgis. (Not sure about the other; waiting to hear back from someone who can check that. Update: no problem with that one.)

One Portal/Server instance is running (10.3) on Linux, while the other is (10.6) on Windows.

Any suggestions on what can be tried to debug this?

Update 2: Here are the arguments to

arcpy.mapping.CreateMapSDDraft (myMxd, sddFilename, serviceName, 
                                'ARCGIS_SERVER', connectFilename, 
                                True, 'TestData', 
                                summary = 'My summary', 
                                tags = { 'tag1', 'tag2' })

And I only pass the required arguments to arcpy.server.UploadServiceDefinition()

Update 3: I just noticed that the last request to the server, for the MapServer REST endpoint, does not fail, but does not return any data. Though, weirdly, it is an http request, not an https one. I thought we'd required everything to be done in secure fashion. Certainly, every other request is secure. Is that something easy to fix?

Update 4: I mis-read the Web Developer->Network output from Firefox. That last request to the MapServer endpoint showed up as insecure in the listing on the left of the page. But high-lighting that request showed that the request URL was https (so, I guess, the fact that there was no response made Firefox flag it as insecure). Not sure where that leaves things.

Also, as further clarification on the requests to arcgisonline.com, those are only for images, so (I think) are unlikely to be terribly meaningful.

Update 5: Somehow misread that URL a number of times. Whatever the deal with it is, it's going to Portal, not Server. And trying to connect directly to that endpoint gets an 'Unable to connect' error from Firefox.

  • It may be helpful to post the http/https Get requests when you are trying to add the portal layer to the Map viewer in the browser to investigate network traffic. Depending on how authentication is set up, you may be having trouble reaching the REST endpoints of the service. – Alex P Jun 22 '18 at 5:47
  • I don't see any requests failing, other than there being four requests to either server.- or services.arcgisonline.com. This stuff being run on a network without a connection to the internet, we know this will fail. Of course, that begs the question of why it worked last week. – DaveWork Jun 22 '18 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.