-
Notifications
You must be signed in to change notification settings - Fork 154
attribute not implemented manageags.AGSAdministration #290
Comments
Those attributes are returned when there is an error connecting to the server. Are the user name and password correct? |
I am able to connect using the same user name and password directly to the URL… |
Do you use a web adapter on prod? Maybe a firewall is blocking 6080? Can you try port 80? |
No, it’s configured to use port 6080. The username and password are identical if I use script or on the web…. I am having the same issue on our test server. I can access with siteadmin username and password via URlLbut not through the script using arcrest. I am working with our server guys to see if there is something configured differently between our dev and prod boxes. |
It's unclear to me why I am able to run the script from http://server.arcgis.com/en/server/10.3/administer/linux/example-stop-or-start-all-services-in-a-folder.htm |
@ckel490: Try removing the slash from the end of your admin_url = r"http://[servername]:6080/arcgis/admin" Your if url.lower().endswith('/admin') == False:
url = "%s/admin" % url Which means your URL that ends with an extra slash will become This is a bug in In the perfect world, it shouldn't matter whether your URL ends with a slash. Technically, having the slash is the correct format according to the standards documents, but without the slash should work as well, as they do in most web browsers. Those work because they use standardized URL handling code. |
@sloanlance I understand the idea of using requests vs urllib, but some people do not want to use anything but the standard library. Also, I think urlnorm is very interesting, but the github repo does not have a license posted, so that could cause some trouble. |
@achapkowski, the PyPI entry for urlnorm says it uses an MIT license. Its WRT urllib vs. requests, does this project intend to not force other dependencies on its users? It only requires six (bundled) and numpy (external; BSD license) now. I think requests offers so many improvements over requests, it would improve the robustness of this project. It may be a bit of a leap to switch to the other module, for sure. An alternative is to use requests if it's installed, but work with urllib if that's all that's available. Making ArcREST work with either could make the code a little more complex, though. |
I figured out the problem. I was using your example in the Wiki for administering ArcGIS Server, which uses the admin_url for the AGSTokenSecurityHandler. This worked on our Dev server. When I checked the sh.token_url, it was http://server:6080/arcgis/tokens/ In order to create a token for our test and prod servers, I need to use the token_url parameter = http://server:6080/arcgis/admin/generateToken as http://server:6080/arcgis/tokens/ It might be helpful to modify the examples to explicitly use the token_url for the security handler. |
ArcRest or ArcRestHelper
ArcRest
Version or date of download
8/20/2016
Bug or Enhancement
More question than either
Repo Steps or Enhancement details
I am succesfully accessing the services on our Dev ArcGIS Server through manageags, but when I try to access our Production server, I get the following when I type ags.resources:
status - attribute not implemented manageags.AGSAdministration.
code - attribute not implemented manageags.AGSAdministration.
messages - attribute not implemented manageags.AGSAdministration.
Is there a setting on the Server that I need to change?
Here's the code below:
Ask for admin/publisher user name and password
env = raw_input("Enter Envrionemnt, dev or prod: ")
##username = raw_input("Enter user name: ")
username = "siteadmin"
password = getpass.getpass("Enter password: ")
if env == 'dev':
admin_url = r"http://[servername]:6080/arcgis/admin"
elif env == 'prod':
admin_url = r"http://[servername]:6080/arcgis/admin/"
Create Security Handler
sh= arcrest.AGSTokenSecurityHandler(username = username,password = password,org_url = admin_url)
#Create ArcGIS Server REST API Wrapper
ags = arcrest.manageags.AGSAdministration(admin_url,sh)
The text was updated successfully, but these errors were encountered: