|
POST
|
This is good and bad news. Good something works. Bad that I'm still puzzled by the time of the crash. You said you can get into the Service Editor. If there was going to be a crash, I'd suspect it to happen when going into the Service Editor. That is when most things happen. Once you click the publish button 2 things happen: the service is staged (that means data is consolidated put into a single file). Then upload happens which pushes that file up to the server and asks the server to start the service. I wonder if you run the Package Result tool if that crashes as well? Package Result makes a GPK, which is kind of like what happens when you publish. When you're in the Service Editor, before you publish, you can modify the parameters of a tool. With your buffer tool, what is the Input Mode for the Input Features set to? Constant, Choice list or user defined? Can you try a different one? What about your custom model/script tool, what are you inputs set to? Any change if you change the input type?
... View more
10-29-2013
12:28 PM
|
0
|
0
|
1603
|
|
POST
|
Yeah, that's the same as I referenced in the link. Check the little code snippet at the bottom of the link, it's the same as you've posted pretty much. Your bat file calls server admin scripts which are only installed by Server. C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py"
... View more
10-29-2013
11:51 AM
|
0
|
0
|
1497
|
|
POST
|
edit: Didn't see your post, khibma, before I posted. To answer your question, the model is being called by the script. Because we do not have access to the server yet, and because ArcGIS for Server is still very foreign to me, I'm unclear how I would be able to copy/paste a model without ArcGIS for Desktop. Are you saying that I can simply place the toolbox that contains it within the production server directory? Think of it this way: If I asked you to move your model to another directory on your Desktop machine, would it continue to work? If you have relative paths and move the data appropriately, it should work. If the paths aren't relative, then you'll need to make sure the model can continue to access the data. (again it probably should continue to work). If it STOPS working, you probably have relative paths and the data is no longer relative to where the model thinks it should be. This is the same scenario I'm proposing, except moving your model to a different machine. You don't need Desktop over there as long as the paths to the data all line up. "Server" is just a headless Desktop (as a way to explain this scenario). It does everything Desktop does in terms of models, tools, data, there just isn't the nice user interface to interact with. So something like a model which you build in Desktop will work on the Server, you just can't modify it. You can use it just as is by making sure the data paths are correct when you move it.
... View more
10-29-2013
11:44 AM
|
0
|
0
|
1497
|
|
POST
|
Do you mean these scripts? http://resources.arcgis.com/en/help/main/10.2/#/ArcGIS_Server_command_line_utilities/015400000626000000/ I'm pretty sure that those files only get installed with Server. As for everything else in arcpy; tools, functions, etc.... they're available in both Desktop and Server. Python and the extra packages (matplotlib, numpy and a couple others) are exactly the same from DT to AGS, except AGS being 64bit. Without seeing your script and knowing the error it would be hard to say exactly what Server had that Desktop didnt.
... View more
10-29-2013
11:36 AM
|
0
|
0
|
1497
|
|
POST
|
Almost everything thats available in Desktop is available in Server. (there are a few limitations on data types and certain tools that aren't supported, but for the most part, Server + arcpy does what Desktop + arcpy does). I'd be willing to say, copy/paste everything you have on your Desktop, setup the scheduled task to call the Python script and it'll just work. (windows task scheduler calls Python that gets installed with Server) You've said you have a model and a script that does some work (checks for a file). How is the model being called in the first place? By the script? If you're following that workflow, stick with it. No need to convert the model into Python.
... View more
10-29-2013
11:14 AM
|
0
|
0
|
1497
|
|
POST
|
No error report? thats a bad crash. You can publish maps no problem? Any other problems with desktop? New install or an upgrade from 10.1?
... View more
10-29-2013
11:09 AM
|
0
|
0
|
1603
|
|
POST
|
I can't say I've heard of this situation before, so I can't tell you the one answer to fix it. Maybe try deleting everything inside the staging folder. Typically its at: C:\Users\{user}\AppData\Local\Esri\Desktop10.2\Staging What happens if you run a system tool and try to publish that (like Buffer, or Get Count) instead of a Model or script. I assume you can publish maps with no problem? Does it make any error reports? Could you attach one to the forum here, it may provide a clue. They get saved to: C:\Users\{user}\AppData\Local\ESRI\ErrorReports
... View more
10-29-2013
05:48 AM
|
0
|
0
|
1603
|
|
POST
|
A general list of unsupported tools in 64bit Background can be found here: http://resources.arcgis.com/en/help/main/10.2/index.html#/Background_Geoprocessing_64_bit/002100000040000000/ Most of these tools don't run in regular 32bit Background either, with the exception being the graph tools. Theres probably a few other tools not in this list which don't run in background. You can check if a given tool will run in the background by checking its General Properties page from ArcMap/Catalog. If "Always run in Foreground" is checked, it will not run in the background.
... View more
10-25-2013
07:55 AM
|
0
|
0
|
422
|
|
POST
|
Yes, that GUI is gone. There is some information on this subject here: http://gis.stackexchange.com/questions/73863/any-tool-to-monitor-arcgis-server-usage
... View more
10-22-2013
05:57 AM
|
0
|
0
|
2630
|
|
POST
|
You'll want to read this help topic here: http://resources.arcgis.com/en/help/main/10.2/#/A_quick_tour_of_creating_tools_with_ModelBuilder/00150000001t000000/ Note: Add to Display is a Model only setting that has no impact on the Model when it's being run as a Model tool outside the Modelbuilder Window.
... View more
10-21-2013
06:47 AM
|
0
|
0
|
1149
|
|
POST
|
Using Flex (or any other WebAPI) probably isn't the best method for testing/debugging a GP Service. You can do it sure, but I usually find it quicker just to consume the service in ArcMap. This way you don't need to worry about writing to console or popping up boxes or what not to read GP Service messages. Just turn them to INFO on the service, consume in ArcMap and see the Result messages. For your error at hand, based on it - yeah if you're seeing undefined, it's like it hasn't gone into that cursor and set the variable. However, your cursor, bBoxCur = arcpy.SearchCursor(g_ESRI_variable_4)" is using that variable_4. variable_4 is used in GP tools all through your script before the cursor, so my best guess would say that variable is not empty, otherwise it would have failed before that. I'd put some AddMessage's in to see where its getting to and whats happening. bBoxCur = arcpy.SearchCursor(g_ESRI_variable_4)
for row3 in bBoxCur:
geom = row3.shape
ext = geom.extent
arcpy.AddMessage(ext)
boxXMin = ext.XMin
boxXMax = ext.XMax
boxYMin = ext.YMin
boxYMax = ext.YMax
... View more
10-21-2013
06:42 AM
|
0
|
0
|
715
|
|
POST
|
Pretty sure this will enable attachments, it works for me. Update variables at the bottom. You can switch TRUE to FALSE to disable attachments. import json, urllib, urllib2
def gentoken(username, password, referer, expiration=60):
#Re-usable function to get a token required for Admin changes
referer = "http://www.arcgis.com/"
query_dict = {'username': username,
'password': password,
'expiration': str(expiration),
'client': 'referer',
'referer': referer,
'f': 'json'}
query_string = urllib.urlencode(query_dict)
tokenUrl = "https://www.arcgis.com/sharing/rest/generateToken"
tokenResponse = urllib.urlopen(tokenUrl, urllib.urlencode(query_dict))
token = json.loads(tokenResponse.read())
if "token" not in token:
print token['messages']
import sys
sys.exit()
else:
# Return the token to the function which called for it
return token['token']
def enableAttachment(token, fsURL):
query_dict = {'updateDefinition': "{'hasAttachments':true}", #false
'f': 'json',
'token': token}
query_string = urllib.urlencode(query_dict)
attachResponse = urllib.urlopen(fsURL, urllib.urlencode(query_dict))
msg = json.loads(attachResponse.read())
print msg
return
USERNAME = " ______ "
PASSWORD = " ______ "
REFFER = "http://www.arcgis.com"
fsURL = "http://services1.arcgis.com/<ORGANIZATION IDENTFIER/arcgis/admin/services/<SERVICE NAME>.FeatureServer/0/updateDefinition"
# for example, a link may look like:
#http://services1.arcgis.com/4safsf2dgg32daf3/arcgis/admin/services/MyService.FeatureServer/0/updateDefinition
token = gentoken(USERNAME, PASSWORD, REFFER)
enableAttachment(token, fsURL)
... View more
10-16-2013
05:16 AM
|
0
|
0
|
2632
|
|
POST
|
If you're using 10.1 or 10.2, use scratchFolder or scratchGDB. Don't use scratchWorkspace unless you've used it in the past. These 2 variables are simply easier to use and will always work. The error you posted is because you're trying to write a shapefile (.shp) into a file geodatabase. You can't do that. Your ArcMap's scratchWorkspace environment variable is pointing to your default GDB, thats why that happened. If you want a shapefile, just use the %scratchFolder% variable. Have a quick read of this : http://blogs.esri.com/esri/arcgis/2012/10/19/the-new-scratchgdb-and-scratchfolder-environments/ EDIT: I just re-read this part: I've gone through the tutorial: http://help.arcgis.com/en/arcgisdesk...0000000m000000 but it's not clear how to use it with SDE feature classes stored in a enterprise geodatabase.......I've cleared the Current workspace and set the Scratch Workspace to the Database Connection, where the feature class is stored, which I'm using for the input. I assume you mean exactly what you said, use an SDE featureclass as input. Not write the output of your buffer operation back to SDE (as your second point implies). If this is what you want to do, whats the reason for writing to SDE? 99% of the time there isn't a real need to write back to SDE, just use the scratch environments as you are but modify that environment setting to a folder in your working directory of your project.
... View more
10-14-2013
04:46 AM
|
0
|
0
|
1909
|
|
POST
|
Make sure the box on the left side "show desktop content" has been checked
... View more
10-11-2013
05:18 AM
|
0
|
0
|
702
|
|
POST
|
It looks like the guys from Boston did recompile agssom for 10.1 and presumably 10.2. I'm not 100% sure if agssom needs to compile against a particular version with the changes from 10.1/10.2 compared to 10.0. Anyways, agssom and the ArcGIS Administration Toolkit can be found here: http://www.arcgis.com/home/search.html?q=agssom&t=content In short, both these samples build off the command line tools idea that Steve posted, but leveraging the API via .NET or Python.
... View more
10-11-2013
05:08 AM
|
1
|
0
|
702
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2023 06:37 AM | |
| 1 | 09-18-2025 07:07 AM | |
| 3 | 09-18-2025 06:52 AM | |
| 1 | 03-23-2023 12:07 PM | |
| 1 | 10-21-2024 12:40 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-30-2025
06:25 AM
|