Troubleshooting¶
This new (as of v.4.6) section of the Admin guide is for tips on how to diagnose and fix system problems.
Glassfish¶
server.log
is the main place to look when you encounter problems. Hopefully an error message has been logged. If there’s a stack trace, it may be of interest to developers, especially they can trace line numbers back to a tagged version.
For debugging purposes, you may find it helpful to increase logging levels as mentioned in the Debugging section of the Developer Guide.
Our guides focus on using the command line to manage Glassfish but you might be interested in an admin GUI at http://localhost:4848
Deployment fails, “EJB Timer Service not available”¶
Sometimes the Dataverse application fails to deploy, or Glassfish fails to restart once the application is deployed, with the following error message: “remote failure: Error occurred during deployment: Exception while loading the app : EJB Timer Service is not available. Please see server.log for more details.”
We don’t know what’s causing this issue, but here’s a known workaround:
Stop Glassfish;
Remove the
generated
andosgi-cache
directories;Delete all the rows from the
EJB__TIMER__TBL
table in the database;Start Glassfish
Or execute the following shell script.
Note that it may or may not work on your system, so it is provided as an example only, downloadable here
. Aside from the configuration values that need to be changed to reflect your environment (the Glassfish directory, name of the database, etc.) the script relies on the database being configured in a certain way for access. (See the comments in the script for more information)
#!/bin/sh
# EBJ timers sometimes cause problems; utility to clear generated directories and database rows
# assumes this script is being run as root, and that the postgres user had passwordless
# access to the database (local sockets, or appropriate environmental variables).
# will restart glassfish if it's stopped; comment out the `start-domain` command at the end
# if you'd like to avoid that.
# directory where glassfish is installed
GLASSFISH_DIR=/usr/local/glassfish4
# directory within glassfish (defaults)
DV_DIR=${GLASSFISH_DIR}/glassfish/domains/domain1
# stop the glassfish domain (generates a warning if glassfish is stopped)
${GLASSFISH_DIR}/bin/asadmin stop-domain
rm -rf ${GLASSFISH_DIR}/${DV_DIR}/generated/
rm -rf ${GLASSFISH_DIR}/${DV_DIR}/osgi-cache/felix
# restart the domain (also generates a warning if glassfish is stopped)
${GLASSFISH_DIR}/bin/asadmin start-domain
Timer not working¶
Dataverse relies on EJB timers to perform scheduled tasks: harvesting from remote servers, updating the local OAI sets and running metadata exports. (See Dataverse Application Timers for details.) If these scheduled jobs are not running on your server, this may be the result of the incompatibility between the version of PostgreSQL database you are using, and PostgreSQL JDBC driver in use by your instance of Glassfish. The symptoms:
If you are seeing the following in your server.log…
Handling timeout on …
followed by an Exception stack trace with these lines in it:
Internal Exception: java.io.StreamCorruptedException: invalid stream header …
Exception Description: Could not deserialize object from byte array …
… it most likely means that it is the JDBC driver incompatibility that’s preventing the timer from working correctly. Make sure you install the correct version of the driver. For example, if you are running the version 9.3 of PostgreSQL, make sure you have the driver postgresql-9.3-1104.jdbc4.jar in your <GLASSFISH FOLDER>/glassfish/lib directory. Go here to download the correct version of the driver. If you have an older driver in glassfish/lib, make sure to remove it, replace it with the new version and restart Glassfish. (You may need to remove the entire contents of <GLASSFISH FOLDER>/glassfish/domains/domain1/generated before you start Glassfish).