Version 8 (modified by pbaumann, 22 months ago) (diff)


Embedded petascope with Jetty

How to Use

Purpose: Run petascope "out of the box", without any further installation and configuration of a servlet container like tomcat. Jetty is a Web server and javax.servlet container which can be bundled with an application. To this end, petascope can be deployed with the jetty container bundled, alternatively to utilizing a standard servlet container like tomcat.

Start: Following successful installation of rasdaman with jetty enabled, the petascope Web service gets automatically started by the general rasdaman launch script

Service URLs: After successful start, petascope accepts requests according to OGC W*S standards at http://localhost:8080/rasdaman/ows. Further, the SECORE Coordinate Reference System Resolver (CRS) service is available at http://localhost:8080/def.

Stop: The petascope/jetty service gets stopped by if it has been started through When started independently, petascope will have to be stopped independently.

How to Change the Port

By default, jetty uses port 8080. This can be changed by editing the petascope configuration file, $RMANHOME/etc/ Open the file in a text editor and find the line


Change this to the desired port, save the file, and restart jetty.

How to Change the Extraction Folder?

By default, jetty extracts files from rasdaman.war and def.war (~100 MB) into $RMANHOME/share/rasdaman/war/jetty_tmp. This directory can be changed as follows. Edit the petascope configuration file, $RMANHOME/etc/ Open the file in a text editor and find the line


By default, this setting is empty making jetty use the default folder $RMANHOME/share/rasdaman/war/jetty_tmp. Add an absolute path, such as:


and restart petascope.


Q: Cannot start petascope/jetty to listen for Web requests.

  • A: Most likely, the petascope port is in use by another web service application program. See above for changing the petascope port. Also, make sure that petascope is not running simultaneously in tomcat.

Q: My port number and/or extraction directory settings are not recognized, petascope still uses the defaults.

  • A: Assignments in the petascope configuration file,, must not contain any white space before or after the '='; for example, jetty_port =8080 and jetty_port = 8080 are both invalid. Further, no comment after the end of the assignment is allowed.

Q: How can I check whether jetty is up and running?

  • A: You can check the process table, and contact the service endpoint to see whether it gives a response:
    ps -ef | grep asdaman/war/jetty.jar
    wget http://localhost:8080/rasdaman/ows 

For developers

In the download directory, jetty is located in rasdaman folder $RMANHOME/applications/petascope/jetty. This folder contains:

  • README.txt # help file for building petascope manually (NB: you need to copy file rasdaman.war (see below) to this directory to run it).
  • def.war # CRS (Coordinate Reference System) service
  • jetty.jar # jetty servlet container
  • start_petascope.class # compiled Java code for starting jetty with petascope
  • # corresponding Java source code

The ./configure and make install process produces $RMANHOME/share/rasdaman/war/rasdaman.war.

Rebuilding petascope manually can be done as follows (after having run './configure' in $RMANHOME):

cd $RMANHOME/applications/petascope/
make         # creates $RMANHOME/applications/petascope/build/dist/rasdaman.war
make install # copies jetty files to $RMANHOME/applications/petascope/jetty