Arcgis online sign in box prevents from publishing service using ArcPy

2872
4
05-28-2014 10:36 PM
SergeyBurmisov
New Contributor
I am publishing a local ArcGIS Server Map service using ArcPy script (script follows below) (running on that very server).
Every time I call arcpy.UploadServiceDefinition_server() arcgis online sign in dialog box pops up and execution is paused until I reject to sign in.
While acceptable in interactive mode, this totally prohibits running the script in unattended mode.
How can I disable the dialog and why does it pop up at all?

Server version 10.2.2, layers in the mxd have a registered connection to SQL geodatabase. Publishing from ArcMap works OK with no errors or warnings.

arcpy.mapping.CreateGISServerConnectionFile("PUBLISH_GIS_SERVICES",
                                            outDir,
                                            outName,
                                            serverUrl,
                                            "ARCGIS_SERVER",
                                            False,
                                            outDir,
                                            usr,
                                            pwd,
                                            "SAVE_USERNAME")

arcpy.mapping.CreateMapSDDraft(mapDoc, sddraft, service, 'ARCGIS_SERVER', outName, False, None, 'summary', 'tags')
arcpy.StageService_server(sddraft, sd)
arcpy.UploadServiceDefinition_server(sd, outName)


[ATTACH=CONFIG]34171[/ATTACH]
Tags (2)
0 Kudos
4 Replies
JasonScheirer
Occasional Contributor III

The sign-in dialog should never appear when running as a Python script. This is a bug. Please contact support.

0 Kudos
AdamMarinelli
Occasional Contributor

Hello @Surgey Burmisov, did you every find a resolution to the sign-in box appearing while running a python script that calls arcpy.UploadServiceDefinition_server()?

0 Kudos
SergeyBurmisov
New Contributor

We never actually found a _solution_ to the problem, but we did perform multiple reinstalls of different ArcGIS Server versions, and it seemed like a floating bug less likely to appear on new installations.
So we reached some point when all production servers were running OK (no dialog box pops up), and settled on that infirm ground, hoping never to see the problem again

AdamMarinelli
Occasional Contributor

Okay well I appreciate the information.  I did come across this bug which was addressed at 10.2 and might explain the behaviour

NIM-088658

When background processing is enabled, the Upload Service Definition tool makes HTTP requests to 'http://www.arcgis.com/arcgisuris.xml' when it is run.

0 Kudos