Finding Your Jetty Version When Running Geoserver

Checking the Web Interface

To find the Jetty version GeoServer is running on via the web interface, first log in to the GeoServer web admin page using your admin credentials. Once logged in, navigate to the “About & Status” page under the “Server” section. On this page, look for the “Jetty” section which contains information about the Jetty servlet container. The version number of Jetty will be listed there.

Log In to the GeoServer Web Admin Interface

Point your web browser to the GeoServer admin URL, for example http://example.com/geoserver/web. Enter your designated admin username and password when prompted to log in. This grants you access to view and configure GeoServer settings through the web interface.

Navigate to the “About & Status” Page

Once logged in, click on “About & Status” under the “Server” section in the left vertical menu. This page displays useful information about your GeoServer instance, including version numbers for dependent software components.

Check the “Jetty” Section

Scroll down to the “Jetty” section on “About & Status”. This section shows the specific Jetty version number GeoServer is paired with, usually in the format “Jetty x.x.x”. Make a note of the full Jetty version string for your records when troubleshooting or upgrading GeoServer.

Checking the Log Files

The Jetty version can also be found by checking the GeoServer log files on disk. This method requires command line access to the server hosting GeoServer via SSH.

SSH into the GeoServer Host Machine

Use SSH to log in to the Linux or Windows server that is running the GeoServer instance with a user account that has permission to access the GeoServer application files. Connect to the host machine from your local terminal using the server’s IP address and your SSH login credentials.

Navigate to the GeoServer Logs Directory

Once connected via SSH, change directory to the location where GeoServer stores its log files. The default path is generally /opt/geoserver/data_dir/logs. This directory contains useful logging information from both GeoServer and Jetty.

Grep for “jetty” and Version Number Strings

Run the grep command to search within the .log files for the string “jetty” and version number patterns like “x.x.x”. This will output any log entries containing Jetty versioning info to the terminal. For example:

grep -i "jetty" * | grep -E "[0-9.]+"

Finding the Jetty JAR File

The Jetty version can also be obtained by inspecting the underlying Jetty JAR file used by the GeoServer installation:

Navigate to the GeoServer Lib Directory

From the SSH terminal session connected to your GeoServer host, change directory to /opt/geoserver/webapps/geoserver/WEB-INF/lib. This contains the Java library files for GeoServer web components.

List Files and Locate the Jetty JAR

Run the “ls” command to list out all files in the lib folder. Identify the file name starting with “jetty-“. For example, jetty-runner-9.4.20.v20190813.jar. This is the Jetty JAR library used by GeoServer.

Extract Version Number from JAR File Name

Parse the Jetty JAR file name to extract the version number. Locate the nomenclature “x.x.x” format. In our example, the Jetty version is 9.4.20 from the jetty-runner-9.4.20.v20190813.jar filename.

Using the GeoServer Command Line

If you have access to the GeoServer command line interface, you can also check the Jetty version that way without inspecting log files or underlying libraries.

SSH into the GeoServer Host Machine

Connect to the GeoServer host server via SSH using the credentials for a user with permissions to run GeoServer administration commands.

Run “geoserver status” Command

Once connected, go to the directory where GeoServer is installed, usually /opt/geoserver. Run the command:

./bin/status.sh

Or on Windows:

status.bat

This will output the status across all GeoServer runtime components.

Check Output for “Jetty” Section

In the verbose output from the status command, there will be a section labeled “Jetty”. This contains data on the Jetty version, uptime, and request metrics. Look for the “Version” field which lists the specific Jetty version paired to GeoServer.

Locating Jetty Configuration Files

As an alternative method, the Jetty version can be found by inspecting Jetty configuration files stored on disk:

Find Jetty Base Directory

From the GeoServer host terminal session, locate the Jetty base directory location at /opt/geoserver/data_dir/jetty. This stores the standalone Jetty configs and webapps.

List XML Config Files

List the contents of this base jetty folder using “ls”. There will be multiple XML formatted configuration files related to Jetty, its webapps, logging, and other settings.

Extract Jetty Version References

Manually inspect or grep through these XML files to find elements that reference the jetty.version, the full dotted version string. This provides definitive proof of the paired Jetty version number.

Leave a Reply

Your email address will not be published. Required fields are marked *