We are using ArcGISServer 10.0 on a windows server. Because of database management we need to stop several ArcGISServer Services. For this purpose I use the AGSSOM program, which is called from the following Python program:

import os, subprocess

def manageMapServices(command, svc, svcType):
    PathToAGSSOM = r"c:\Program Files\ArcGIS\Server10.0\AGSSOM_GESTAO\AGSSOM"
    server = "AGSSOM"
    p = subprocess.Popen(PathToAGSSOM + " " + server + " " + command + " " + svc + " " + svcType)

# Calling AGSSOM - stop servico
manageMapServices("-x", "GeoPlaneamento/AMAE2001", "MapServer")

When calling this program I receive the following error:

*Could not find an available ArcGIS Engine or Desktop product to initialize. Could not connect to server. Make sure this user is a member of the AGSADMIN group. Details: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) AGSSOM [usage]: {server} [-s|start, -x|stop, -r|restart -list|list_services -listtypes|list_server_types, -describe|describe],-publish|publish from MX D path as second parameter [servicename (or all)] {servicetype|default:MapServer, GeocodeServer, GPServer, GlobeServer}*

This message points to problems with permissions, however the user has all the correct permissions. And when trying to call the AGSSOM program directly from the command prompt I do not receive any error.

Does this anyone know what might be the problem causing this error?

  • Is it possible that you run your Python script as another user that is not in agsadmin? Try testing running a cmd as another user to test (Shift+right-click > Run as different user). – Alex Tereshenkov Jul 14 '14 at 14:17
  • No it's the same user when using AGSSOM command on the command prompt. I used "print getpass.getuser()" in the script to check the user – user34506 Jul 14 '14 at 15:14

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.