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
- The PCMAPIMgr Class Instance
-
Issue: In Contenta version 3.1 and above, a single instance of the PCMAPIMgr class can only support one connection.
Explanation/resolution: If a tool needs to connect more than once, the tool writer can create a second instance of the PCMAPIMgr class. In Java a PCMAPIMgr class can be created as follows:
String [] args = null; com.xyenterprise.PCMUtils.PCMAPIMgr apiMgr = new com.xyenterprise.PCMUtils.PCMAPIMgr(args); - Portal Error: Database not found
-
Issue: When running the portal in debug mode, the following is displayed:
Running as exe Process # Portal Started Process # Successful network Connection Database not foundExplanation/Resolution: Check to determine if the environment variable XYV_PDM_DBASE is set to a database that does not exist. If the variable is set, the portal tries to attach to the database indicated by the variable.
You can set the XYV_PDM_DBASE environment variable to the database name but if you have more than one database, delete the variable; the XYV_PDM_DBASE environment variable is not required.