The server does not respond / a service request fails

Troubleshooting

Summary

yFiles Flex applications usually require a server component. This article describes troubleshooting when the client-server communication fails.

Description

No response from the server

When neither a result nor an error message appear after calling the server, the server is not responding. The reasons may be:
  • The server is not running
  • The server is stuck in a loop
  • The server is still processing the request (Note that processing a large graph can take quite a while. Also note that the first call after deployment is considerably slower a subsequent calls, see also the article Server is slow after (re)deployment of a servlet)

Service Request Failed [...] Error #2032 / Error #2038

When a server request results in an error, an Alert showing the error message pops up. Unfortunately, usually the message tells us that something went wrong but not what. The following article shows what to do in order to locate the error.

1. Is the URL correct?

The error message usually displays the URL which was contacted. The first step in troubleshooting is to verify if it is the correct URL:
  • Check for misspellings, like confusing O and 0 or I, l, 1, etc.
  • Check for missing port numbers
  • Check for missing/wrong extensions. Especially .NET server expect the extension .ashx
  • Compare the service name with the definition in the server configuration (usually WEB_INF/web.xml for apache tomcat, Web.Config for .NET)
If the URL is not correct, please see the knowledge base article How to set the URL for ServerActions (RoundtripHandler / DownloadHandler) for details on setting the URL. Some common errors are:
  • Adressing the server when the config is not loaded: make sure that the server is not called before the config is read (i.e. after Event.COMPLETE is fired).
  • Missing or double / (slash) between context root and service name: the / is not automatically inserted between context root and service name. Either put a / at the end of the context root or at the beginning of (each) service name
  • Missing / incorrect extension: set the default extension as described here or add the extension to (each) service name. Note that the . (dot) is not automatically inserted, so it has to be added to the default service extension.

2. Is the servlet / handler available at the given URL?

If the URL seems to be correct, you can verify the availability of the servlet / handler by simply entering the URL (copying it from the error message avoids typing errors) into your browser's URL field. If a HTTP error 404 occurs, the servlet / handler is not found.

In that case, you will have to verify in the server configuration files if the servlet / handler mappings are correct. Compare the mappings with mappings of successfully called servlet / handlers. Don't forget to restart the server after making changes.

If your server runs in a developing environment you also have the possibility to set break points at the entry methods of your servlet (doPost() / doGet()) or handler (ProcessRequest()) and verify that it is called upon a request from the client.

3. The servlet / handler is called but it still responds with an error

The reason is most likely that the servlet / handler threw an exception. In this case you will have to debug your server code.

Since yFiles FLEX 1.4 you can use the demo.DemoConfigTool as demonstrated in most of the demos. It tries several configurations to connect to the server and if not successful opens a dialog box explaining (possible) reasons why the connection failed.

Categories this article belongs to:
yFiles FLEX > Using yFiles FLEX with a yFiles Server > Communicating with yFiles.NET on the Server
yFiles FLEX > Communicating with the Server > Remote Communication in yFiles FLEX
yFiles FLEX > Using yFiles FLEX with a yFiles Server > Communicating with yFiles Java on the Server
Applies to:
yFiles FLEX: 1.4, 1.5, 1.6, 1.7, 1.8
Keywords:
server error - request error - error #2032 - error #2038