Default installation paths
The directories below are set during the installation process. You can find these Repose directories by following the appropriate paths:
Configuration management helps save time, simplify deployments, and increase reliability. Check out our Configuration Management repositories:
To start Repose via the service command (recommended):
sudo service repose-valve start
To stop Repose via the service command (recommended):
sudo service repose-valve stop
To start Repose via the startup script:
sudo /etc/init.d/repose-valve start
To stop Repose via the script:
sudo /etc/init.d/repose-valve stop
To start Repose with executable Repose valve jar, use action "start."
java -jar /usr/share/repose/repose-valve.jar
To stop Repose using command line:
Send a request to verify that Repose is running:
The default installation returns:
About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/188.8.131.52 libidn/1.23 librtmp/2.3
> Host: localhost:8080
> Accept: */*
< HTTP/1.1 301 Moved Permanently
< Content-Type: text/html;charset=UTF-8
< Via: 1.1 Repose (Repose/2.13.1)
< x-pingback: http://www.openrepose.org/xmlrpc.php
< x-powered-by: PHP/5.3.24
< x-powered-by: ASP.NET
< Location: http://www.openrepose.org/
< Content-Length: 149
< Date: Thu, 19 Dec 2013 00:50:32 GMT
< Server: Jetty(8.0.y.z-SNAPSHOT)
* Connection #0 to host localhost left intact
* Closing connection #0
<body><h1>Object Moved</h1>This document may be found <a HREF="http://www.openrepose.org/">here</a></body>
Validate configurations with XSDs
You can validate your XML configurations using either an online validator or a command line validator. If you are interested in using an online validator, you may want to look at FreeFormatter or the W3C XML Schema (XSD) Validator. If you prefer to use a command line validator and use Linux or Mac, you can use the xmllint program that is included in libxml2.
Use xmllint to check the validity of your XML configurations against the XSD by typing the following command in your terminal:
xmllint --noout --schema test.xsd test.xml
For test.xsd use the schema file, and for test.xml use your XML file.
The --noout flag prints only the validation results while preventing the XML file from printing to standard.
Deployment required configurations
Below are files of the default configuration settings that come with this installation. These default files are required to run Repose.
|XML Schema definition||Example Config|
- The system model configuration outlines the entire deployment layout for the service cluster. Repose must be aware of this in order to configure itself and correctly coordinate routing if necessary.
- The system model also lets Repose know where the other Repose nodes reside. Using this information, Repose can coordinate its own clustering to help load balance or share data among nodes that share common filters.
- Tells the system where to look for component artifacts and where to deploy them.
Repose configuration files are evaluated:
- When Repose is started
- If there are any invalid configuration files, then Repose logs the error and returns 503 response codes for all requests until all the configuration files are fixed.
- Every 15 seconds. This check interval is not configurable.
- If valid configuration files are updated, making them invalid, Repose logs the error and continues running with the previous good configuration.
Each Repose component specifies a unique configuration name. For information and examples, see Filters and services.
Repose can load Java Servlet Filters and process the requests and responses traveling between the client and server.
A Filter is an HTTP message interceptor that provides a specific piece of business functionality. A filter contains a Repose specific named reference.
A Filter Chain is a sequence of filters that will intercept the request from the first filter of the sequence to the last enumerated filter in the sequence.
How to add filters
You can add filters to Repose using the System Model configuration file. See the
system-model.cfg.xml example below. The filter name's to use in the system-model.cfg.xml are defined in the each filter bundle's web-fragment.xml.
More about directories
|All consumable artifacts meant for deployment through Repose must conform to the Java Platform, Enterprise Edition (JEE 6) specification for Enterprise ARchive (EAR) files. |
Upon completion of the Repose installation the following default directories are made accessible. These directories are described below:
Default directory model
- Artifact directory: Store all the artifacts that Repose has been configured to use in the artifact directory. Default location is
- Configuration directory:
- Default location is
- Store all of Repose's XML configurations in the configuration directory.
- The Root war deploy assumes this directory is located in /etc/repose.
- Repose only supports file system configuration locations.
- Deployment directory:
- Default directory is
- Repose uses the deployment directory to copy deployed versions of the artifacts it has been configured to use.
- Define a deployment directory as a writable location.
Listen ports and system model interrogator
When Repose starts, it needs to know on which ports (http and/or https) it is listening for requests. It uses this information for a few things
- If using the distributed datastore, Repose uses this port when communicating to other nodes in the cluster.
- Repose uses the port information in addition to the local network address information to determine to which cluster it belongs.
If Repose cannot determine to which cluster it belongs, it will fail to start.
In the container.cfg.xml below, we see that this instance of Repose should listen on HTTP port 8774 and HTTPS port 8775.
<deployment-config via="Repose (Cloud Integration)" content-body-read-limit="1024">
Via & X-Forwarded-For
The 'via' attribute in the container.cfg.xml file will configure what Repose will set in the Via Header of the request and response. If this attribute is not configured or left blank Repose will default to passing the version of Repose which is deployed.
When deploying under GlassFish please set a jvm option 'sun.net.http.allowRestrictedHeaders' to 'true' so as to allow repose to set the 'Via' header
Repose will add/set the X-Forwarded-For Header to all processed requests.
The 'content-body-read-limit' attribute in the container.cfg.xml file will allow you to configure the maximum size of the request content in bytes, if the attribute is not set the default will be what ever the application server maximum value will be allowed. If the 'content-body-read-limit' is set and the request sends the content larger than the maximum value set Repose will send response with 413 response code.
A corresponding system-model.cfg.xml could be:
<?xml version="1.0" encoding="UTF-8"?>
<node id="node1" hostname="localhost" http-port="8774" https-port="8775" />
<node id="node2" hostname="some-other-host" http-port="8774" https-port="8775" />
<endpoint id="openrepose" protocol="http" hostname="www.openrepose.org" root-path="/" port="80" default="true"/>
In this example, Repose would determine that it is running in the repose-cluster "repose" and is identified by node "node1"
<THIS IS A STUB>
# Set root logger level
log4j.rootLogger=DEBUG, debugFile, infoFile, warnFile, errorFile
log4j.appender.debugFile.layout = org.apache.log4j.PatternLayout
log4j.appender.debugFile.layout.ConversionPattern=%d %-4r [%t] %-5p %c %x - %m%n
log4j.appender.infoFile.layout = org.apache.log4j.PatternLayout
log4j.appender.infoFile.layout.ConversionPattern=%d %-4r [%t] %-5p %c %x - %m%n
log4j.appender.warnFile.layout = org.apache.log4j.PatternLayout
log4j.appender.warnFile.layout.ConversionPattern=%d %-4r [%t] %-5p %c %x - %m%n
log4j.appender.errorFile.layout = org.apache.log4j.PatternLayout
log4j.appender.errorFile.layout.ConversionPattern=%d %-4r [%t] %-5p %c %x - %m%n