Tag: Troubleshooting

Why don't some of the links work in my ArcGIS Services Directory?

“I’ve exposed my ArcGIS Server to the world and it works well for the most part. However, certain links in the Services Directory still point to internal URLs.”

We have seen many users face this issue and this blog post is an attempt to address it. There are a couple of updates you need to make to configure the Services Directory for external use:

  1. Update the REST configuration files with an external SOAP URL and REST API reference
  2. Update your server directories to use external URLs for their virtual directories

Update the REST configuration files with an external SOAP URL and REST API reference

In order to set up the Services Directory for access to external users, you need to modify the SOAP URL specified in REST configuration file to be an external URL. The SOAP URL is used to generate various links in the Services Directory, most notably “View in ArcMap”, “View in ArcGIS Explorer”, and some of the Supported Interfaces links.

Additionally, the URLs for the Services Directory Help and REST API reference need to be updated to be accessible by external users.

Platform-specific instructions are included below to help you.

Updating the REST configuration file (.NET)

If you’re using ArcGIS Server for the Microsoft .NET Framework, do this:

  1. Open the rest.config file in a text editor. This file is commonly located at c:inetpubwwwrootArcGISRestrest.config, but the location will vary depending on your ArcGIS Server instance name and the root directory for your Web server.
  2. Find the <SoapUrl> element and change the enclosed URL to use an externally accessible address. Example: <SoapUrl>http://externalServer.myDomain.com/ArcGIS/services</SoapUrl>
  3. Find the <SoapSslUrl> element and change the enclosed URL to use an externally accessible address. Example: <SoapSslUrl>https://externalServer.myDomain.com/ArcGIS/services</SoapSslUrl>
  4. Find the ApiHelp tag and change the baseUrl property to reference an externally accessible address. Example: <ApiHelp baseUrl=”http://externalServer.mydomain.com/ArcGIS/SDK/REST/index.html?”>
  5. Find the <ServicesDirectoryHelp> element and change the enclosed URL to use an externally accessible address: <ServicesDirectoryHelpUrl>http://externalServer.mydomain.com/ArcGIS/SDK/REST/servicesdirectory.html</ServicesDirectoryHelpUrl>
  6. Save and close the file.
  7. Restart IIS.

Note: Prior to 10.0, for ArcGIS Server for the Microsoft .NET Framework, running the Web Applications post install would overwrite the user edited settings in rest.config for SOAP and REST API reference URLs. At 10.0, the user settings are persisted when the post installs are re-run.

Updating the REST configuration files (Java)

If you’re using ArcGIS Server for the Java Platform, we recommend exporting the REST handler using ArcGIS Server Manager. One of the required inputs when exporting the REST handler is the SOAP URL. Specify an externally accessible SOAP URL for this input, and deploy the WAR file generated to a servlet engine of your choice.

Alternately if you prefer to edit the configuration files of an already deployed REST service, do this:

  1. In a text editor, open the server.properties file, which is stored in the REST war file in the path WEB-INFclassesserver.properties
  2. Update the com.esri.rest.SOAP_URL property with an externally accessible address. Example: com.esri.rest.SOAP_URL=http://externalserver.mydomain.com/arcgis/services
  3. Update the com.esri.rest.SOAP_HTTPS_URL property with an externally accessible address. Example: com.esri.rest.SOAP_HTTPS_URL=https://externalserver.mydomain.com/arcgis/services
  4. Save and close the file.
  5. In a text editor, open the rest-config.properties file, which is stored in the REST war file in the path WEB-INFclassesresources rest-config.properties.
  6. Update the base.url property with an externally accessible address. Example: base.url=http://externalserver.mydomain.com:port/arcgis/sdk/rest
  7. Save and close the file.
  8. Restart the application server.

Update your server directories to use external URLs for their virtual directories

The virtual directories associated with the ArcGIS Server output, jobs, and cache directories must use a URL that is accessible externally. You can either edit the virtual directory of an existing server directory or create new server directories with an external URL for the virtual directory. Once the virtual directories are set up, ensure that all your services are configured to use them.

About server directories

Contributed by Ravi Narayanan of the ArcGIS Server development team

Posted in Services | Tagged , , , | 3 Comments

Dealing with underscore characters in your Web server name

Today, many individuals and organizations have conventions in place that restrict how a machine or web server can be named. Commonly, underscore characters ( _ ) are used to separate strings and numeric labels, such as SERVER_1234, or to assure that special domain names are not confused with host names. Although the use of underscore characters is effective, they may cause unexpected behavior when you attempt to log in to ArcGIS Server Manager, create services, or manage Web applications using Microsoft Internet Explorer.

Interestingly enough, the origin of this behavior is related to the development of the Domain Name System or “DNS” by Paul Mockapetris in 1983. His spec mandated that the hostname’s labels only contain the letters A – Z, the digits 0 – 9, and the hyphen. No other symbols, punctuation, or blank spaces were permitted. Despite a few modifications to the DNS hierarchy in the past 25 years, underscore characters are still not supported.

You may now be asking yourself, “How does the DNS hierarchy relate to my immediate problem of not being able to open Manager?” Essentially, the DNS acts a phone book for the internet by translating human-friendly machine names into unique numerical identifiers. So, “MyServer” could translate into “123.45.678.910”. When a character, such as an underscore, is introduced into the Web server name, the DNS gets confused since the character does not conform to the DNS hierarchy. Often, this results in failure of the Web server.

In light of this information, we developed the help topic Retaining underscore characters in the Web server name. It provides a workaround that will allow you to preserve your current naming conventions in ArcGIS Server 9.3.1.

Additionally, external topics by IBM and the IETF highlight best-practices when considering host name values and machine naming conventions.

Contributed by Michael Frates, Greg Reeve, and Nikhil Shampur of the ArcGIS Server development team.

Posted in Services | Tagged , , , | Leave a comment

Using detailed logging with ArcGIS Server 9.3

During the initial releases of ArcGIS Server, many users asked for fine-grained logging down to the layer draw level. This functionality was added to ArcGIS Server 9.3 as a new logging level Info:Detailed. The detailed logging is especially helpful when troubleshooting performance. In this post, we’ll consider the scenario that you have a map service that’s not drawing as fast as you’d like.

Here it’s worth noting that before you go to the logs, it may be easier to catch the problem using the popular mxdperfstat tool from ArcScripts or the “Analyze” button on the 9.3.1 Map Service Publishing Toolbar. As ArcGIS Server 9.3.1 becomes available in the next few weeks, we’ll be posting more information about the Map Service Publishing toolbar and how it can quickly point out areas for improvement in your map document. Version 9.3.1 also includes a faster drawing engine for map services that will help improve performance.

When you need more detail about what’s happening during a map draw, you can go to the log files and enable the new detailed logging. This is the workflow you’d follow:

  1. Set the log level to Info:Detailed. If you need help with this step, see Specifying the log file location (skip steps 3 and 4). While you’re looking at the log properties page, note the path to the log file and browse to the log directory in Windows Explorer so you don’t have to hunt around for the file later.
  2. Make a simple request to your map service by zooming or panning. Note the current time so you can find the request in the log.
  3. Examine the log that was created during your request and note the feature count and elapsed draw time of each layer. For this step sometimes it’s helpful to print the log and use a highlighter to note the draw times. You’ll immediately see which layers are taking the longest to draw. Also, keep an eye on the feature count to spot inefficient layers. A layer may take only 0.2 seconds to draw at a particular extent, but if the extent only included 2 features you may have a potential inefficiency.
  4. Repeat this process at several different locations and scales in your map. You want to make sure you analyze a good sample of the symbology and layers in your map.
  5. When you finish, set the log level back to Normal.

The Help topic Map service log codes contains a table of the codes you’ll see when analyzing the detailed logging. If you scroll down the topic you’ll also find an example of the codes returned from a simple ExportMapImage request like the one that happens when you zoom or pan the map.

To learn more about detailed logging and the different log levels, see How log files work.

Contributed by Sterling Quinn of the ArcGIS Server development team

Posted in Services | Tagged , , , | 1 Comment

Code Assist for the ArcGIS JavaScript API: Aptana Studio plug-in

The ArcGIS JavaScript API provides classes to deliver rich mapping functionality to your applications. The Resource Center has a wealth of information about these classes, their properties and methods. When building your applications, you want this information easily accessible from within your IDE. If you’ve spent a lot of time creating web mapping applications with the ArcGIS JavaScript API, you’ve probably been missing this for a while now. Yesterday we uploaded to the Code Gallery a plug-in that provides code assistance for the ArcGIS JavaScript API in the Aptana Studio IDE. The plug-in provides the following context-sensitive information:

  • Auto-completion of source code
  • Summary of classes, constructors, properties, methods and globals
  • Parameter hints for constructors and methods

Example of assistance from plug-in 

 Example of assistance from plug-in

We believe the plug-in will greatly enhance your development experience with the ArcGIS JavaScript API. Moving forward, we intend to provide updates to this plug-in whenever a new version of the API is released. We are also working towards providing IntelliSense bits for Visual Studio. As always, we welcome your feedback.

Contributed by Praveen Ponnusamy of the ArcGIS JavaScript API development team

Posted in Services | Tagged , , , | 12 Comments

"Operation aborted" error in Internet Explorer

A few users have reported encountering an “Operation aborted” error in Internet Explorer when attempting to access a web application built using the .NET Web ADF.

Operation Aborted error 

The issue can be traced to a race condition that occurs due to an Internet Explorer/ASP.Net AJAX bug. The probability of encountering this issue increases when the application has a significant number of ADF web controls and/or other ASP.Net AJAX enabled server controls on the web page.

Joel Rumerman has a blog post which describes the issue. Fortunately, he also has a workaround for the problem. He also posted the solution here on the MSDN code gallery. (Note on Oct 16, 2008: Received a note from Joel that he has updated his code.)

To apply the workaround, put the following code block into the markup of the web page before the actual call to Sys.Application.initialize(), or simply place the code after the </form> tag if a ScriptManager control doesn’t exist on the web page.

The exact location of the Sys.Application.initialize() call on a web page containing the ScriptManager web control can be located by viewing source on the web page (Right click + View Source) inside a browser. Typically this call will be towards the bottom of the page, close to the </form> tag. It is important that this code block is declared before the actual method call because it overrides the Sys.Application.initialize() function.

If this is a Web Mapping application built using Manager or the Web Mapping Application template, the code block can be inserted above the sever control tag for the identify control, which looks like this:

<uc1:MapIdentify ID="MapIdentify1" runat="server" MapBuddyId="Map1" />

Here’s the block of code you need to insert:

<script type="text/javascript">
Sys.Application.initialize = function Sys$_Application$initialize() {
if(!this._initialized && !this._initializing) {
this._initializing = true;
var loadMethodSet = false;
var initializeDelegate = Function.createDelegate(this, this._doInitialize);
if (document.addEventListener) {
loadMethodSet = true;
document.addEventListener("DOMContentLoaded", initializeDelegate, false);
}
if (/WebKit/i.test(navigator.userAgent))
{
loadMethodSet = true;
this._load_timer = setInterval(function()
{
if (/loaded|complete/.test(document.readyState))
{
initializeDelegate();
}
}, 10);
}
else
{
/*@cc_on @*/
/*@if (@_win32)
loadMethodSet = true;
document.write("<script id=__ie_onload defer src=javascript:void(0)></scr" + "ipt>");
var deferScript = document.getElementById("__ie_onload");
if (deferScript) {
deferScript.onreadystatechange = function() {
if (this.readyState == "complete") {
initializeDelegate();
}
};
}
/*@end @*/
}

// only if no other method will execute initializeDelegate is
// it wired to the window's load method.
if (!loadMethodSet)
{
$addHandler(window, "load", initializeDelegate);
}
}
}

Sys.Application._doInitialize = function Sys$_Application$_doInitialize() {
if (this._load_timer !== null)
{
clearInterval(this._load_timer);
this._load_timer = null;
}

Sys._Application.callBaseMethod(this, 'initialize');

var handler = this.get_events().getHandler("init");
if (handler) {
this.beginCreateComponents();
handler(this, Sys.EventArgs.Empty);
this.endCreateComponents();
}
this.raiseLoad();
this._initializing = false;
}

Sys.Application._loadHandler = function Sys$_Application$_loadHandler() {
if(this._loadHandlerDelegate) {
Sys.UI.DomEvent.removeHandler(window, "load",
this._loadHandlerDelegate);
this._loadHandlerDelegate = null;
}
this._initializing = true;
this._doInitialize();
}
</script>

Disclaimer: This workaround has been identified to resolve the above stated issue affecting Internet Explorer for ASP.Net AJAX version 1.0 and version 3.5 SP1. Because of the nature of this workaround, subsequent updates to ASP.Net AJAX by Microsoft might make the workaround irrelevant and/or cause other issues. We are actively working with Microsoft to resolve this issue as soon as possible.

Contributed by Nikhil Shampur of the ArcGIS Server .NET software development team

Posted in Services | Tagged , , , | Leave a comment

Eclipse plug-in for debugging ArcObjects code

Divesh Goyal, a Product Engineer on the ArcGIS Server Java team, contributed this post:

As we approach another Developer Summit, I am glad to announce the availability of an Eclipse plug-in for ArcGIS Server and ArcGIS Engine Java developers that will greatly simplify debugging ArcObjects code.

About the plug-in

One of the most valuable tools that developers have at their disposal is a debugger through which they can step through code one statement at a time and inspect objects in the application. As many of you may already know, Java classes in the ArcObjects API are really only proxies to underlying COM ArcObjects. As a result, examining these proxies in the debugger only reveals their internal details and not the state of the ArcObjects. This makes it difficult to find out information such as the coordinates of a geometry, or the layers in a map service. Consequently, developers have to sprinkle their code with System.out.printlns and analyze traces on the console to get this information. This approach can be inconvenient and time consuming.

With this new Eclipse plug-in, Java developers can examine the state of the underlying ArcObjects right in Eclipse IDE’s Debug Perspective by enabling the “Show Logical Structure” option on the Expression and Variables window. Here’s an example of a Point object without the “Show Logical Structure” option enabled.

Without "Show Logical Structure"

This information provides little insight into the underlying ArcObject and is not helpful in reasoning through a workflow while debugging. Now here’s the logical representation of the same object with the “Show Logical Structure” option enabled.

With "Show Logical Structure"

The logical representation presents more comprehensible information about the underlying ArcObject’s state. This state is defined by the no-argument getter methods on it. You might sometimes see exception messages like “Exception Occurred: com.sun.jdi.InvocationException occurred invoking method” in the logical representation. This is normal and happens when some property of the ArcObject is not valid in the current context of the application.

The underlying ArcObjects could be running remotely in a separate process as in the case of ArcGIS Server web applications, or in the same process like in ArcGIS Engine applications. Thus, both Engine and Server developers can take advantage of this plug-in to debug their applications. I am very excited to share this plug-in with you, and look forward to your feedback. Code on!

How to get the plug-in

Follow these steps to download and install the plug-in from the EDN Website:

  1. In the Eclipse workbench, go to Help > Software Updates > Find and Install
  2. Select Search for new features to install, and click Next
  3. Create a New Remote Site for the URL “http://downloads.esri.com/EDN/java/plugins/eclipse”
  4. Enable this remote site and click Finish.
  5. Expand the EDN tree in Search Results, and select the ArcGIS Debug feature.
  6. Proceed to install the plug-in, and restart the workbench when prompted.
Posted in Services | Tagged , , | 1 Comment

Tips from tech support (Part II)

In this post, Hanna Schneeweiss shares some of the most common ESRI Knowledge Base articles used by her group of support analysts.

The Knowledge Base articles below address some of the most frequent inquiries that ESRI Support receives about ArcGIS Server. These articles, along with the related information on these topics in the Server Help at http://webhelp.esri.com, offer answers to commonly asked questions about the ArcGIS Server installation and configuration.

The Knowledge Base articles are grouped into the categories Problems, How To’s, FAQs, Errors, and Bugs.

Problems

How To’s

FAQs

Errors

Bugs

Posted in Services | Tagged , , | Leave a comment

Tips from tech support (Part I)

Hanna Schneeweiss leads a group of ESRI Support analysts who specialize in ArcGIS Server. In this post she shares some of the questions that her team uses to quickly diagnose ArcGIS Server issues.

Here are some general questions that might help you to diagnose a problem before contacting ESRI Support. ESRI Support analysts will be happy to provide any further insight and help as needed. The answers to these questions will help them troubleshoot the issue if a support incident gets created.

  1. Did you get any errors during the initial installation or Post Installation? Are there errors in the Event Viewer logs?
  2. Can you log in to ArcGIS Server Manager? If not, what error are you getting?
  3. Can you connect to your ArcGIS Server with ArcCatalog? If not, what error are you getting? Is this the same if using the connection to administer your services, versus the connection to use/consume services?
  4. If you’re having trouble connecting, can you connect with a different user account?
  5. Have you verified that the user account you’re using is part of the required user group agsadmin or agsusers?
  6. Can you connect to the services using both a local connection and an Internet connection? Just one? Neither?
  7. Are the latest Service Packs installed for ArcGIS Server and/or ArcGIS Desktop?

The ArcGIS Server Development and Support teams share information about the software release and the feedback you send in through Support. If you submit a software bug, software enhancement, or request for documentation, Support works closely with Development to ensure that information is logged into our software defect tracking system and is accounted for during the planning of future releases.

Posted in Services | Tagged , , | 5 Comments