<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connection file only works for UploadServiceDefinition not exportToSDDraft/StageService in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664910#M74889</link>
    <description>&lt;P&gt;Next update (still not working #2)&lt;/P&gt;&lt;P&gt;Changed the upload command to use server-url (&lt;A href="https://yyy.xyz.com/server/manager/index.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://yyy.xyz.com/server/&lt;/A&gt;), now I can connect and publish my service however, only if it doesn't exit.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My takeaway from this is that "overrideExistingService" does not work with offline definition?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;And the issue still persist - I don't know what I need to do to be able to create "online" sd &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Nov 2025 14:32:32 GMT</pubDate>
    <dc:creator>AnnaBru</dc:creator>
    <dc:date>2025-11-11T14:32:32Z</dc:date>
    <item>
      <title>Connection file only works for UploadServiceDefinition not exportToSDDraft/StageService</title>
      <link>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664849#M74887</link>
      <description>&lt;P&gt;TLDR:&amp;nbsp;&lt;BR /&gt;How do I create a publisher connections?&amp;nbsp;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;Using arcgis 3.1, I'm trying to automate publishing of MapServcies using arpy.sharing.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Inspo from&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/sharing/mapservicedraft-class.htm#GUID-F39810A0-180C-4E92-8030-16B760BB3178" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/3.1/arcpy/sharing/mapservicedraft-class.htm#GUID-F39810A0-180C-4E92-8030-16B760BB3178&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Starting backwards I saved an SD-file from ARCGIS Pro GUI, and then I could successfully publish this using (got the python command from geoprocessing tool)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;arcpy.server.UploadServiceDefinition(
    in_sd_file=r"C:\Users\...\out\TEST.sd",
    in_server=r"C:\Users\...\server on ***.ags",
    in_service_name="",
    in_cluster="",
    in_folder_type="FROM_SERVICE_DEFINITION",
    in_folder="",
    in_startupType="STARTED",
    in_override="USE_DEFINITION",
    in_my_contents="NO_SHARE_ONLINE",
    in_public="PRIVATE",
    in_organization="NO_SHARE_ORGANIZATION",
    in_groups=None
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This made me think that the server connection was alright?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But, then I started trying to create the SD-files from code, and the issue I'm getting is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ValueError: Target server is not a standalone server or is inaccessible.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on this step&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sddraft.exportToSDDraft(sddraft_output_filename)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So, something wrong with my sddraft.targetServer?&lt;BR /&gt;&lt;BR /&gt;Started pointing at the same .ags file as I had used in&amp;nbsp;UploadServiceDefinition, and then I played around with numerous different urls, using info from &lt;A href="https://enterprise.arcgis.com/en/portal/11.1/administer/windows/components-of-arcgis-urls.htm" target="_self"&gt;components-of-arcgis-urls&lt;/A&gt;&amp;nbsp;and &lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/projects/connect-to-a-gis-server.htm" target="_self"&gt;connect-to-a-gis-server&lt;/A&gt;. Could not get it to work, and I'm not sure where to go to find the URL's.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Moving on I wanted to try if I could generate the SD draft in offline mode, hoping that since&amp;nbsp;UploadServiceDefinition with the SD file generated from ArcGis Pro it would also succeed with uploading my offline-sd, but no can do. Exact same call as above, just another SD, I got&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ERROR 002901: Sharing related error during geo-processing (Unable to check if service exists.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So back to "it's probably the connection, I just delayed the problem" I started investigating the publisher connection a little bit more.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can find my Server manager page here&lt;BR /&gt;&lt;A href="https://yyy.xyz.com/server/manager/index.html" target="_blank"&gt;https://yyy.xyz.com/server/manager/index.html&lt;/A&gt;&lt;BR /&gt;If I go to manager/webadaptor I find this url&amp;nbsp;&lt;BR /&gt;&lt;A href="https://ec2amaz-8v72vpv.ad.trimbleforestry.eu/server" target="_blank"&gt;https://[machineName].ad.[zzz].eu/server&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think I've tried all combinations possible with these two urls and the info from links above and I just don't get it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;And then I found this &lt;A href="https://www.youtube.com/watch?v=nIRlZN9ECwY" target="_self"&gt;video&lt;/A&gt;, and what I realized was that I'm not able to pass on username and password when I create a new connection, don't know why.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Last clue that I have is that I went to server manager and used the ui to upload my sd file generated from code (using offline-mode), which worked&amp;nbsp;&lt;EM&gt;if&lt;/EM&gt; I removed existing service first (event though I set override to true).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does anyone have any idea what I'm doing wrong?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 07:42:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664849#M74887</guid>
      <dc:creator>AnnaBru</dc:creator>
      <dc:date>2025-11-11T07:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: Connection file only works for UploadServiceDefinition not exportToSDDraft/StageService</title>
      <link>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664909#M74888</link>
      <description>&lt;P&gt;Update (still not working)&lt;/P&gt;&lt;P&gt;Created an offline draft from arcgis pro UI, and I can't publish this, exact same behavior as with code-generated one (win!).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However, in geoprocessing tool I played around with properties value and if I set "override service definition sharing properties to true" I see&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Warning 001404  You are not signed in to ArcGIS Online.&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But I am signed in to our portal in arcgis pro?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 14:28:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664909#M74888</guid>
      <dc:creator>AnnaBru</dc:creator>
      <dc:date>2025-11-11T14:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Connection file only works for UploadServiceDefinition not exportToSDDraft/StageService</title>
      <link>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664910#M74889</link>
      <description>&lt;P&gt;Next update (still not working #2)&lt;/P&gt;&lt;P&gt;Changed the upload command to use server-url (&lt;A href="https://yyy.xyz.com/server/manager/index.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://yyy.xyz.com/server/&lt;/A&gt;), now I can connect and publish my service however, only if it doesn't exit.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My takeaway from this is that "overrideExistingService" does not work with offline definition?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;And the issue still persist - I don't know what I need to do to be able to create "online" sd &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Nov 2025 14:32:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/connection-file-only-works-for/m-p/1664910#M74889</guid>
      <dc:creator>AnnaBru</dc:creator>
      <dc:date>2025-11-11T14:32:32Z</dc:date>
    </item>
  </channel>
</rss>

