Troubleshooting
The following may help you troubleshoot problems.
- Contenta Java and Perl API socket timeouts
-
Issue: Contenta Java and Perl API calls hang when waiting for response from the Contenta Server
Explanation/resolution: The Contenta Java and Perl API communicate with Contenta Server over the socket. In some cases, such as a server crash, Contenta Server may not respond to requests from the Contenta Java or Perl API. The APIs do not detect that Contenta Server is unavailable and wait for its response. To minimize the wait time, the APIs use a socket read timeout. The length of the timeout is controlled by the settings under the following registry keys.
- Java API key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XyEnterprise\Contenta API\JavaAPI
- Perl API key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XyEnterprise\Contenta API\PerlAPI
The following settings under these keys control socket timeout behavior.
SOCKET_TIMEOUT_MILLISECONDS
This setting determines how long the socket will wait for a response. The value is specified in milliseconds, with a default 60000. With this option set to a non-zero timeout, a read() call on the Socket will block for only this amount of time. If the timeout expires, an exception is raised, though the Socket may still be valid (see TRIES_BEFORE_EXIT_ON_SOCKET_TIMEOUT). This option must be enabled before using the Contenta Java or Perl API. The timeout specified must be greater than 0. You can set SOCKET_TIMEOUT_OFF to 1 to turn off the socket timeout; in this case users may experience infinite timeout on a socket read.
TRIES_BEFORE_EXIT_ON_SOCKET_TIMEOUT
The socket may still be valid when a timeout exception is raised. Contenta Java and Perl API will loop (or wait) for the number of tries specified for this setting. This way, if the exception is false, the communication between Contenta Server and the API will continue. After the specified number of tries, if communication between the API and Contenta Server has not resumed, the API raises the exception and closes the socket communication
SOCKET_TIMEOUT_OFF
Set this to 1 to turn off the socket timeouts. If this value is set to 1, users may experience an infinite timeout on socket read. The default value is 0.
- Java API key
- Checking out a topic in XMetaL may raise a 404 exception (file not found)
-
If checking out a topic in XMetaL gives a "404 File Not Found" exception, try changing the registry to match the temp path with the docBase path. This problem may be caused by the fact that your temp path and your docBase path are not the same.
You can try to correct the discrepancy in the registry by doing the following:
- From the Tomcat home directory, navigate to the conf\Catalina\localhost\ subdirectory and open cw_tmp.xml for editing.
- In this file, search for the string "docBase" and note its value as well as the value of the accompanying
pathattribute. - Open your registry editor and navigate to the key
HKEY_LOCAL_MACHINE > Software > XyEnterprise > Content@ > Web > URLS > cw_TmpPath. - Ensure that the path in this key value is identical to the one in cw_tmp.xml.
- Navigate to the key
HKEY_LOCAL_MACHINE > Software > XyEnterprise > Content@ > Settings > Directories > temp. - Ensure that the path in this key value is identical to the one in cw_tmp.xml.