Hop Server

Hop Server is a lightweight server to run workflows and pipelines in the Remote Native run configuration. Additonally, Hop Server can also be accessed directly through a number of REST services and in combination with the Web Service metadata type.

Starting and Stopping Hop Server

General Use

Hop Server is available as a script in your Hop installation directory.

Run Hop Server without any parameters to display its usage options. On Windows, this is hop-server.bat, on Mac and Linux, run hop-server.sh.

  1. Usage: hop-server <Interface address> <Port> [-h] [-p <arg>] [-s] [-u <arg>]
  2. or
  3. Usage: Hop Server <Configuration File>
  4. Starts or stops the hopServer server.
  5. -h,--help This help text
  6. -p,--password <arg> The administrator password. Required only if
  7. stopping the Hop Server server.
  8. -s,--stop Stop the running hopServer server. This is only
  9. allowed when using the hostname/port form of the
  10. command.
  11. -u,--userName <arg> The administrator user name. Required only if
  12. stopping the Hop Server server.
  13. Example: hop-server.sh 127.0.0.1 8080
  14. Example: hop-server.sh 192.168.1.221 8081
  15. Example: hop-server.sh /foo/bar/hop-server-config.xml
  16. Example: hop-server.sh http://www.example.com/hop-server-config.xml
  17. Example: hop-server.sh 127.0.0.1 8080 -s -u cluster -p cluster

The available Hop Server options are:

ShortExtendedDescription

h

help

This help text

p

password

The administrator password. Required only if stopping the Hop Server server.

s

stop

Stop the running hopServer server. This is only allowed when using the hostname/port form of the command.

u

username

The administrator user name. Required only if stopping the Hop Server server.

Start Hop Server with command line parameters

Hop Server can be started with hostname or ip address and port number as unnamed arguments:

  1. hop-server <Interface address> <Port> [-h] [-p <arg>] [-s] [-u <arg>]

Example startup commands are:

  1. hop-server.sh 127.0.0.1 8080
  1. hop-server.sh 192.168.1.221 8081

Start Hop Server with a configuration file

Specify the xml configuration file as the only argument:

  1. hop-server <Configuration File>

The syntax of this configuration file is fairly simple:

  1. <hop-server-config>
  2. <hop-server>
  3. <name>server-8181</name>
  4. <hostname>localhost</hostname>
  5. <port>8181</port>
  6. </hop-server>
  7. <!-- Join the web server thread and wait until it's finished.
  8. The default is true
  9. -->
  10. <joining>true</joining>
  11. <!-- The maximum number of log lines kept in memory by the server.
  12. The default is 0 which means: keep all lines
  13. -->
  14. <max_log_lines>0</max_log_lines>
  15. <!-- The time (in minutes) it takes for a log line to be cleaned up in memory.
  16. The default is 0 which means: never clean up log lines
  17. -->
  18. <max_log_timeout_minutes>1440</max_log_timeout_minutes>
  19. <!-- The time (in minutes) it takes for a pipeline or workflow execution to be removed from the server status.
  20. The default is 0 which means: never clean executions
  21. -->
  22. <object_timeout_minutes>1440</object_timeout_minutes>
  23. <!-- The folder to read metadata objects from so that web services and database connections for sequences can be found.
  24. The default is that no metadata is configured: remotely executed pipelines and workflows will have their own metadata.
  25. -->
  26. <metadata_folder></metadata_folder>
  27. </hop-server-config>

Example startup commands with a configuration file are:

  1. hop-server.sh /foo/bar/hop-server-config.xml

Or with a remote configuration file:

  1. hop-server.sh http://www.example.com/hop-server-config.xml

Stopping Hop Server

In a testing setup where Hop Server was started from a terminal, the process can be terminated through CTRL-C.

In headless environments, the same hop-server command used to start the server can be used to stop it:

  1. hop-server.sh 127.0.0.1 8080 -s -u cluster -p cluster

Verify startup

Starting a Hop Server on the local machine e.g. on port 8081 will only take 1 or 2 seconds.

The console output will look similar to what is listed below:

  1. 2020/06/20 18:35:12 - HopServer - Installing timer to purge stale objects after 1440 minutes.
  2. 2020/06/20 18:35:12 - HopServer - Created listener for webserver @ address : localhost:8081

Connect to the Hop Server UI

To connect to the previously started server, point your browser to [http://localhost:8081](http://localhost:8081).

You’ll be prompted for your username and password. The default is cluster for both the username and password. The defaults obviously should be changed in any environment that goes beyond a simple local developer setup.

on startup, the pipeline and workflow lists shown below will be empty. Run a workflow or pipeline through the Hop Remote pipeline engine run configuration or through the REST api. When pipelines or workflows are executed on the server, you’ll be able to follow the logging output either from the terminal or a log file (e.g. piped from the startup command).

Hop Server Status

For each of the options in the pipeline and workflow dialogs described below, select a pipeline and workflow from the list and select the desired option.

The header bar for workflows and pipelines is almost identical (from left to right).

Run

Stop the running pipeline/workflow

Cleanup pipeline

Cleanup a pipeline: close remote sockets etc

View pipeline/workflow details

Remove pipeline/workflow from list