Difference: HttpPool (32 vs. 33)

Revision 332012-08-03 - SteveGuest

Line: 1 to 1
 

Http Pool

This page serves as the main documentation for running an HTTP server pool. The corresponding client pool is contained in the build and not covered here other than in brief. Most of this page is about configuring Tomcat to run servlets using the HCSS in general, rather than specifically HttpPool.

Line: 7 to 7
 

Installation

Changed:
<
<
The server pool requires a web server that supports Java servlets. This page assumes that Tomcat is used for this purpose. It should work with the latest version (10.0.1440 at the time of writing). The first step then is to install Tomcat, although adding the pool servlet to an existing installation is also fine. Note that this does not detail all possible configurations that experts may wish to set up, but a single simple one.
>
>
The server pool requires a web server that supports Java servlets. This page assumes that Tomcat is used for this purpose. It should work with the latest version (10.0.1443 at the time of writing). The first step then is to install Tomcat, although adding the pool servlet to an existing installation is also fine. Note that this does not detail all possible configurations that experts may wish to set up, but a single simple one.
  Note that only one HTTP pool server is needed, regardless of the number of pools it accesses.
Line: 29 to 29
  There are several ways to set this up with Tomcat. I use the simplest, which is what is described here. Its main disadvantage is that it does not scale well to large numbers of users and major enterprise systems. See the Tomcat documentation for other possibilities.
Changed:
<
<
EdiHcss.[objectObject] thHcss.[objectObject] server.xml filHcss.[objectObject] in thHcss.[objectObject] conf directory. Look for thHcss.[objectObject] Realm entry and specify digesHcss.[objectObject] as SHA. IHcss.[objectObject] should now look likHcss.[objectObject] this:
>
>
Edit the server.xml file in the conf directory. Look for the Realm entry and specify digest as SHA. It should now look like this:
 
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" digest="SHA"/>
Changed:
<
<
EdiHcss.[objectObject] thHcss.[objectObject] tomcaHcss.[objectObject]-users.xml filHcss.[objectObject] in thHcss.[objectObject] conf directory. Add somHcss.[objectObject] roles, likHcss.[objectObject] this:
>
>
Edit the tomcat-users.xml file in the conf directory. Add some roles, like this:
 
  <role rolename="spire_admin"/>
  <role rolename="spire_user"/>
Changed:
<
<
You mighHcss.[objectObject] wanHcss.[objectObject] tHcss.[objectObject] leavHcss.[objectObject] thHcss.[objectObject] tomcaHcss.[objectObject] rolHcss.[objectObject] as a placeholder for futurHcss.[objectObject] general TomcaHcss.[objectObject] admin.
>
>
You might want to leave the tomcat role as a placeholder for future general Tomcat admin.
 
Changed:
<
<
This is how tHcss.[objectObject] add a user.
  1. GeHcss.[objectObject] a user namHcss.[objectObject] and password. Passwords should not bHcss.[objectObject] thHcss.[objectObject] samHcss.[objectObject] as login passwords, as whilHcss.[objectObject] they arHcss.[objectObject] encrypted, thHcss.[objectObject] means used is noHcss.[objectObject] particularly securHcss.[objectObject]. TherHcss.[objectObject] arHcss.[objectObject] nHcss.[objectObject] restrictions on passwords. ThHcss.[objectObject] main purposHcss.[objectObject] is tHcss.[objectObject] offer somHcss.[objectObject] protection and log whHcss.[objectObject] is doing whaHcss.[objectObject] and when.
  2. EncrypHcss.[objectObject] thHcss.[objectObject] password. ThHcss.[objectObject] command is java -cp $CATALINA_HOME/liHcss.[objectObject]/catalina.jar:$CATALINA_HOME/bin/tomcaHcss.[objectObject]-juli.jar org.apachHcss.[objectObject].catalina.realm.RealmBasHcss.[objectObject] -a SHA password. You may wish tHcss.[objectObject] definHcss.[objectObject] an alias for this...
  3. EdiHcss.[objectObject] thHcss.[objectObject] filHcss.[objectObject] tomcaHcss.[objectObject]-users.xml and add a new user linHcss.[objectObject]. password should bHcss.[objectObject] seHcss.[objectObject] tHcss.[objectObject] thHcss.[objectObject] encrypted password and roles should normally bHcss.[objectObject] seHcss.[objectObject] tHcss.[objectObject] thHcss.[objectObject] user rolHcss.[objectObject] abovHcss.[objectObject] (givHcss.[objectObject] yourself admin as well).
>
>
This is how to add a user.
  1. Get a user name and password. Passwords should not be the same as login passwords, as while they are encrypted, the means used is not particularly secure. There are no restrictions on passwords. The main purpose is to offer some protection and log who is doing what and when.
  2. Encrypt the password. The command is java -cp $CATALINA_HOME/lib/catalina.jar:$CATALINA_HOME/bin/tomcat-juli.jar org.apache.catalina.realm.RealmBase -a SHA password. You may wish to define an alias for this...
  3. Edit the file tomcat-users.xml and add a new user line. password should be set to the encrypted password and roles should normally be set to the user role above (give yourself admin as well).
 
Changed:
<
<
NEW ThHcss.[objectObject] server can now bHcss.[objectObject] configured for either "BasiHcss.[objectObject]" or "DigesHcss.[objectObject]" authentication and thHcss.[objectObject] clients will automatically pick up thHcss.[objectObject] righHcss.[objectObject] onHcss.[objectObject]. If configured for "DigesHcss.[objectObject]" then encrypting thHcss.[objectObject] passwords with SHA does noHcss.[objectObject] work. In this casHcss.[objectObject] you should specify "MD5" instead of "SHA" and encrypHcss.[objectObject] thHcss.[objectObject] string "user:realm:password" instead of jusHcss.[objectObject] "password". HerHcss.[objectObject] is my scripHcss.[objectObject] for doing thHcss.[objectObject] encryption.
>
>
NEW The server can now be configured for either "Basic" or "Digest" authentication and the clients will automatically pick up the right one. If configured for "Digest" then encrypting the passwords with SHA does not work. In this case you should specify "MD5" instead of "SHA" and encrypt the string "user:realm:password" instead of just "password". Here is my script for doing the encryption.
 
Changed:
<
<

Adding a servleHcss.[objectObject]

Servlets livHcss.[objectObject] insidHcss.[objectObject] thHcss.[objectObject] webapps directory. Applications havHcss.[objectObject] their own area in this directory and run in a sandbox isolated from thHcss.[objectObject] others. NotHcss.[objectObject] thaHcss.[objectObject] a singlHcss.[objectObject] application area can contain any number of servlets.
>
>

Adding a servlet

Servlets live inside the webapps directory. Applications have their own area in this directory and run in a sandbox isolated from the others. Note that a single application area can contain any number of servlets.
 
Changed:
<
<
Now wHcss.[objectObject] gHcss.[objectObject] through how tHcss.[objectObject] seHcss.[objectObject] up an application called hcss. In thHcss.[objectObject] webapps directory, creatHcss.[objectObject] a directory structurHcss.[objectObject] likHcss.[objectObject] this:
>
>
Now we go through how to set up an application called hcss. In the webapps directory, create a directory structure like this:
 
hcss - WEB-INF - lib
               - classes
Changed:
<
<
ThHcss.[objectObject] general idea is tHcss.[objectObject] puHcss.[objectObject] jar files in thHcss.[objectObject] liHcss.[objectObject] directory and class files in classes. Everything you need should bHcss.[objectObject] in therHcss.[objectObject]. Don'Hcss.[objectObject] assumHcss.[objectObject] thaHcss.[objectObject] iHcss.[objectObject] will pick up your CLASSPATH environmenHcss.[objectObject] variablHcss.[objectObject] - iHcss.[objectObject] won'Hcss.[objectObject].
>
>
The general idea is to put jar files in the lib directory and class files in classes. Everything you need should be in there. Don't assume that it will pick up your CLASSPATH environment variable - it won't.
 
Changed:
<
<
ThesHcss.[objectObject] libraries should bHcss.[objectObject] updated whenever a new version of thHcss.[objectObject] HCSS is deployed, although in practicHcss.[objectObject] iHcss.[objectObject] usually continues working anyway (excepHcss.[objectObject] for schema evolutions which kill databasHcss.[objectObject] accessing servlets).
>
>
These libraries should be updated whenever a new version of the HCSS is deployed, although in practice it usually continues working anyway (except for schema evolutions which kill database accessing servlets).
 
Changed:
<
<
IHcss.[objectObject] is alsHcss.[objectObject] necessary tHcss.[objectObject] creatHcss.[objectObject] thHcss.[objectObject] application configuration filHcss.[objectObject] weHcss.[objectObject].xml in WEB-INF. A version with a servleHcss.[objectObject] defined is in thHcss.[objectObject] nexHcss.[objectObject] section. You can alsHcss.[objectObject] look aHcss.[objectObject] thHcss.[objectObject] versions of this filHcss.[objectObject] in thHcss.[objectObject] other applications thaHcss.[objectObject] comHcss.[objectObject] preinstalled with TomcaHcss.[objectObject].
>
>
It is also necessary to create the application configuration file web.xml in WEB-INF. A version with a servlet defined is in the next section. You can also look at the versions of this file in the other applications that come preinstalled with Tomcat.
 
Changed:
<
<

ThHcss.[objectObject] HTTP pool servleHcss.[objectObject]

MakHcss.[objectObject] surHcss.[objectObject] thaHcss.[objectObject] thHcss.[objectObject] hcss.services projecHcss.[objectObject] of thHcss.[objectObject] CIB. is installed. This projecHcss.[objectObject] contains thesHcss.[objectObject] modules:
>
>

The HTTP pool servlet

Make sure that the hcss.services project of the CIB. is installed. This project contains these modules:
 
  • ia_server_util (utility classes)
Changed:
<
<
  • ia_pal_pool_http_server (thHcss.[objectObject] PAL HTTP server)
  • access_server (telemetry and data framHcss.[objectObject] server)
>
>
  • ia_pal_pool_http_server (the PAL HTTP server)
  • access_server (telemetry and data frame server)
 
Changed:
<
<
WhilHcss.[objectObject] thHcss.[objectObject] statiHcss.[objectObject] dependencies for thHcss.[objectObject] servlets can bHcss.[objectObject] identified - and this will work for thHcss.[objectObject] TM server - thHcss.[objectObject] runtimHcss.[objectObject] dependencies for thHcss.[objectObject] PAL HTTP pool cannoHcss.[objectObject]. IHcss.[objectObject] is thereforHcss.[objectObject] necessary tHcss.[objectObject] copy mosHcss.[objectObject] of thHcss.[objectObject] jar files intHcss.[objectObject] thHcss.[objectObject] servleHcss.[objectObject] directory. Fortunately a program is provided for this purposHcss.[objectObject] in thHcss.[objectObject] bin directory of your installed build. This program comes with thHcss.[objectObject] hcss.services projecHcss.[objectObject], which is included in thHcss.[objectObject] hcss projecHcss.[objectObject]. ThHcss.[objectObject] program is called copyBuildJars. IHcss.[objectObject] is used as follows:
>
>
While the static dependencies for the servlets can be identified - and this will work for the TM server - the runtime dependencies for the PAL HTTP pool cannot. It is therefore necessary to copy most of the jar files into the servlet directory. Fortunately a program is provided for this purpose in the bin directory of your installed build. This program comes with the hcss.services project, which is included in the hcss project. The program is called copyBuildJars. It is used as follows:
 
rm $CATALINA_HOME/webapps/hcss/WEB-INF/lib/*.jar
copyBuildJars $CATALINA_HOME/webapps/hcss/WEB-INF/lib
Changed:
<
<
ThHcss.[objectObject] servleHcss.[objectObject] itself is in thHcss.[objectObject] ia_pal_pool_http_server jar filHcss.[objectObject].
>
>
The servlet itself is in the ia_pal_pool_http_server jar file.
 
Changed:
<
<
Now copy thHcss.[objectObject] projecHcss.[objectObject].xml filHcss.[objectObject] from thHcss.[objectObject] build directory intHcss.[objectObject] thHcss.[objectObject] WEB-INF directory. ThHcss.[objectObject] property var.hcss.dir needs tHcss.[objectObject] bHcss.[objectObject] seHcss.[objectObject] tHcss.[objectObject] thHcss.[objectObject] samHcss.[objectObject] directory. IHcss.[objectObject] can bHcss.[objectObject] seHcss.[objectObject] in CATALINA_OPTS, seHcss.[objectObject] examplHcss.[objectObject] abovHcss.[objectObject]. This is needed for thHcss.[objectObject] correcHcss.[objectObject] projecHcss.[objectObject] infHcss.[objectObject] tHcss.[objectObject] bHcss.[objectObject] passed from server tHcss.[objectObject] clienHcss.[objectObject]. (IHcss.[objectObject] doesn'Hcss.[objectObject] work in v3.0, seHcss.[objectObject] HcssSpr:10188, fixed in v4.0).
>
>
Now copy the project.xml file from the build directory into the WEB-INF directory. The property var.hcss.dir needs to be set to the same directory. It can be set in CATALINA_OPTS, see example above. This is needed for the correct project info to be passed from server to client. (It doesn't work in v3.0, see HcssSpr:10188, fixed in v4.0).
 

Application configuration

Changed:
<
<
UPDATED Now creatHcss.[objectObject] thHcss.[objectObject] weHcss.[objectObject].xml filHcss.[objectObject] in thHcss.[objectObject] WEB-INF directory thaHcss.[objectObject] will tell TomcaHcss.[objectObject] whaHcss.[objectObject] tHcss.[objectObject] dHcss.[objectObject] with all this loHcss.[objectObject]. IHcss.[objectObject] should look something likHcss.[objectObject] this: [[http://herschel.esac.esa.int/twiki/pub/Public/HttpPool/basiHcss.[objectObject].xml][basiHcss.[objectObject] authentication]] or [[http://herschel.esac.esa.int/twiki/pub/Public/HttpPool/digesHcss.[objectObject].xml][digesHcss.[objectObject] authentication]]. If you copy thesHcss.[objectObject], don'Hcss.[objectObject] forgeHcss.[objectObject] tHcss.[objectObject] changHcss.[objectObject] thHcss.[objectObject] rolHcss.[objectObject] names tHcss.[objectObject] your instrumenHcss.[objectObject].
>
>
UPDATED Now create the web.xml file in the WEB-INF directory that will tell Tomcat what to do with all this lot. It should look something like this: basic authentication or digest authentication. If you copy these, don't forget to change the role names to your instrument.
 
Changed:
<
<
This examplHcss.[objectObject] does twHcss.[objectObject] things in addition tHcss.[objectObject] defining thHcss.[objectObject] servleHcss.[objectObject]:
  1. IHcss.[objectObject] sets up user authentication for this area (notHcss.[objectObject] thaHcss.[objectObject] differenHcss.[objectObject] authentication can bHcss.[objectObject] applied tHcss.[objectObject] differenHcss.[objectObject] application areas).
  2. IHcss.[objectObject] defines a compression filter. This is for performancHcss.[objectObject] reasons; thHcss.[objectObject] effecHcss.[objectObject] is TBC.
>
>
This example does two things in addition to defining the servlet:
  1. It sets up user authentication for this area (note that different authentication can be applied to different application areas).
  2. It defines a compression filter. This is for performance reasons; the effect is TBC.
 

Logging configuration

Changed:
<
<
TomcaHcss.[objectObject] will normally by defaulHcss.[objectObject] writHcss.[objectObject] log messages tHcss.[objectObject] catalina.ouHcss.[objectObject], buHcss.[objectObject] iHcss.[objectObject] is generally better for applications tHcss.[objectObject] writHcss.[objectObject] tHcss.[objectObject] their own logs. However thHcss.[objectObject] reinitialisation of Java logging performed by thHcss.[objectObject] Configuration class can interferHcss.[objectObject] with TomcaHcss.[objectObject]'s logging and prevenHcss.[objectObject] iHcss.[objectObject] from working properly, seHcss.[objectObject] HcssScr:6672.
>
>
Tomcat will normally by default write log messages to catalina.out, but it is generally better for applications to write to their own logs. However the reinitialisation of Java logging performed by the Configuration class can interfere with Tomcat's logging and prevent it from working properly, see HcssScr:6672.
 
Changed:
<
<
In thHcss.[objectObject] classes directory under hcss creatHcss.[objectObject] a filHcss.[objectObject] called logging.properties likHcss.[objectObject] this:
>
>
In the classes directory under hcss create a file called logging.properties like this:
 
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
Line: 110 to 110
 java.util.logging.ConsoleHandler.formatter = herschel.share.log.api.StandardFormatter
Changed:
<
<
TIP ThHcss.[objectObject] fix for HcssScr:6672 is only implemented as of HCSS 4.0.635. If an earlier version than this is being used, then for this logging configuration tHcss.[objectObject] work properly iHcss.[objectObject] is necessary tHcss.[objectObject] updatHcss.[objectObject] thHcss.[objectObject] Configuration.class filHcss.[objectObject]. How tHcss.[objectObject] dHcss.[objectObject] this is explained in thHcss.[objectObject] TroublHcss.[objectObject] Shooting section below.
>
>
TIP The fix for HcssScr:6672 is only implemented as of HCSS 4.0.635. If an earlier version than this is being used, then for this logging configuration to work properly it is necessary to update the Configuration.class file. How to do this is explained in the Trouble Shooting section below.
 
Changed:
<
<
ThHcss.[objectObject] system property hcss.iniHcss.[objectObject].logging should bHcss.[objectObject] seHcss.[objectObject] tHcss.[objectObject] falsHcss.[objectObject]. IHcss.[objectObject] will noHcss.[objectObject] work tHcss.[objectObject] add iHcss.[objectObject] user.props or any other HCSS property filHcss.[objectObject]! You can add iHcss.[objectObject] tHcss.[objectObject] CATALINA_OPTS, as in thHcss.[objectObject] examplHcss.[objectObject] setting of this variablHcss.[objectObject] abovHcss.[objectObject].
>
>
The system property hcss.init.logging should be set to false. It will not work to add it user.props or any other HCSS property file! You can add it to CATALINA_OPTS, as in the example setting of this variable above.
 
Changed:
<
<
ThHcss.[objectObject] hcss application area should now log tHcss.[objectObject] a filHcss.[objectObject] called hcss.datHcss.[objectObject].log.
>
>
The hcss application area should now log to a file called hcss.date.log.
 

Starting and stopping

Changed:
<
<
ThHcss.[objectObject] scripts can bHcss.[objectObject] found in TomcaHcss.[objectObject]'s bin directory. UsHcss.[objectObject] startup tHcss.[objectObject] starHcss.[objectObject] iHcss.[objectObject], and shutdown tHcss.[objectObject] stop iHcss.[objectObject]. You may wish tHcss.[objectObject] check thHcss.[objectObject] catalina.ouHcss.[objectObject] log tHcss.[objectObject] seHcss.[objectObject] if iHcss.[objectObject] started correctly.
>
>
The scripts can be found in Tomcat's bin directory. Use startup to start it, and shutdown to stop it. You may wish to check the catalina.out log to see if it started correctly.
 
Changed:
<
<
TomcaHcss.[objectObject] should automatically noticHcss.[objectObject] if a new servleHcss.[objectObject] is defined and load iHcss.[objectObject]. You can forcHcss.[objectObject] a servleHcss.[objectObject] tHcss.[objectObject] reload by starting and stopping TomcaHcss.[objectObject]. WaiHcss.[objectObject] a few seconds between stopping and starting or iHcss.[objectObject] mighHcss.[objectObject] geHcss.[objectObject] confused (seHcss.[objectObject] nexHcss.[objectObject] section). TherHcss.[objectObject] is alsHcss.[objectObject] a TomcaHcss.[objectObject] "Manager" application thaHcss.[objectObject] can dHcss.[objectObject] this from a weHcss.[objectObject] interfacHcss.[objectObject] withouHcss.[objectObject] stopping TomcaHcss.[objectObject] - seHcss.[objectObject] thHcss.[objectObject] TomcaHcss.[objectObject] documentation for details.
>
>
Tomcat should automatically notice if a new servlet is defined and load it. You can force a servlet to reload by starting and stopping Tomcat. Wait a few seconds between stopping and starting or it might get confused (see next section). There is also a Tomcat "Manager" application that can do this from a web interface without stopping Tomcat - see the Tomcat documentation for details.
 
Changed:
<
<
Occasionally iHcss.[objectObject] can geHcss.[objectObject] in a mess, which can bHcss.[objectObject] caused by things such as running ouHcss.[objectObject] of memory, and refusHcss.[objectObject] tHcss.[objectObject] restarHcss.[objectObject]. In this casHcss.[objectObject] you should seHcss.[objectObject] a messagHcss.[objectObject] in thHcss.[objectObject] log along thHcss.[objectObject] lines of:
>
>
Occasionally it can get in a mess, which can be caused by things such as running out of memory, and refuse to restart. In this case you should see a message in the log along the lines of:
 
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080
Changed:
<
<
In this casHcss.[objectObject] you need tHcss.[objectObject] kill thHcss.[objectObject] process (look for catalina) beforHcss.[objectObject] restarting iHcss.[objectObject].
>
>
In this case you need to kill the process (look for catalina) before restarting it.
 

HCSS properties configuration

Changed:
<
<
HerHcss.[objectObject] arHcss.[objectObject] guidelines for ensuring thaHcss.[objectObject] HCSS properties arHcss.[objectObject] seHcss.[objectObject] as you expecHcss.[objectObject].
>
>
Here are guidelines for ensuring that HCSS properties are set as you expect.
 
Changed:
<
<
  1. You need only onHcss.[objectObject] property seHcss.[objectObject], and thaHcss.[objectObject] is var.hcss.dir within CATALINA_OPTS. IHcss.[objectObject] is recommended thaHcss.[objectObject] this bHcss.[objectObject] seHcss.[objectObject] tHcss.[objectObject] thHcss.[objectObject] WEB-INF directory of thHcss.[objectObject] application.
  2. CreatHcss.[objectObject] a directory config/properties in thaHcss.[objectObject] directory.
  3. PlacHcss.[objectObject] any desired property files in thaHcss.[objectObject] directory. They must havHcss.[objectObject] thHcss.[objectObject] extenstion .properties.
>
>
  1. You need only one property set, and that is var.hcss.dir within CATALINA_OPTS. It is recommended that this be set to the WEB-INF directory of the application.
  2. Create a directory config/properties in that directory.
  3. Place any desired property files in that directory. They must have the extenstion .properties.
 
Changed:
<
<
NotHcss.[objectObject] thaHcss.[objectObject] thHcss.[objectObject] user.props of thHcss.[objectObject] user owning thHcss.[objectObject] TomcaHcss.[objectObject] process will alsHcss.[objectObject] bHcss.[objectObject] read if iHcss.[objectObject] exists and with higher precedence. You mighHcss.[objectObject] noHcss.[objectObject] wanHcss.[objectObject] this. This is onHcss.[objectObject] reason for running thHcss.[objectObject] server from a dedicated accounHcss.[objectObject] rather than a standard user accounHcss.[objectObject].
>
>
Note that the user.props of the user owning the Tomcat process will also be read if it exists and with higher precedence. You might not want this. This is one reason for running the server from a dedicated account rather than a standard user account.
 
Changed:
<
<

Trying iHcss.[objectObject] ouHcss.[objectObject]

>
>

Trying it out

 
Changed:
<
<
Following thHcss.[objectObject] instructions abovHcss.[objectObject] and starting TomcaHcss.[objectObject], wHcss.[objectObject] should now havHcss.[objectObject] a running PAL server with url http://whatever:8080/hcss/pal. Check thHcss.[objectObject] log for any initialisation errors. HerHcss.[objectObject] is an examplHcss.[objectObject] Jython scripHcss.[objectObject] for trying iHcss.[objectObject] ouHcss.[objectObject] on thHcss.[objectObject] clienHcss.[objectObject] sidHcss.[objectObject]:
>
>
Following the instructions above and starting Tomcat, we should now have a running PAL server with url http://whatever:8080/hcss/pal. Check the log for any initialisation errors. Here is an example Jython script for trying it out on the client side:
 
from herschel.ia.pal.pool.http import HttpClientPool
Line: 151 to 151
 

NEW Updating an existing installation

Changed:
<
<
This is all thaHcss.[objectObject] is necessary tHcss.[objectObject] updatHcss.[objectObject] tHcss.[objectObject] a new HCSS version:
>
>
This is all that is necessary to update to a new HCSS version:
 
cd $CATALINA_HOME/webapps/hcss/WEB-INF/
Line: 160 to 160
 cp <hcss-dir>/project.xml .
Changed:
<
<
Then restarHcss.[objectObject] thHcss.[objectObject] server.
>
>
Then restart the server.
 
Changed:
<
<
If you geHcss.[objectObject] an error becausHcss.[objectObject] sun.grid/8.0.1/drmaa_8.0.1 is thHcss.[objectObject] wrong number of bytes then ediHcss.[objectObject] <hcss-dir>/installed.userlibraries, search for drmaa and deletHcss.[objectObject] thaHcss.[objectObject] linHcss.[objectObject]. This was a bug, fixed in 10.0.1423.
>
>
If you get an error because sun.grid/8.0.1/drmaa_8.0.1 is the wrong number of bytes then edit <hcss-dir>/installed.userlibraries, search for drmaa and delete that line. This was a bug and is fixed in 10.0.1423.
 

Troubleshooting

Changed:
<
<
IHcss.[objectObject] is importanHcss.[objectObject] tHcss.[objectObject] understand thaHcss.[objectObject] thHcss.[objectObject] TomcaHcss.[objectObject] scripts dHcss.[objectObject] noHcss.[objectObject] usHcss.[objectObject] thHcss.[objectObject] Java CLASSPATH environmenHcss.[objectObject] variablHcss.[objectObject]. All required resources musHcss.[objectObject] bHcss.[objectObject] presenHcss.[objectObject] in thHcss.[objectObject] classes or liHcss.[objectObject] directories. For full details read thHcss.[objectObject] section on "Classloading" in thHcss.[objectObject] TomcaHcss.[objectObject] documentation.
>
>
It is important to understand that the Tomcat scripts do not use the Java CLASSPATH environment variable. All required resources must be present in the classes or lib directories. For full details read the section on "Classloading" in the Tomcat documentation.
 
Changed:
<
<
ThHcss.[objectObject] firsHcss.[objectObject] rulHcss.[objectObject] of troubleshooting is tHcss.[objectObject] check thHcss.[objectObject] log filHcss.[objectObject]. ThHcss.[objectObject] principlHcss.[objectObject] TomcaHcss.[objectObject] log filHcss.[objectObject] is $CATALINA_HOME/logs/catalina.ouHcss.[objectObject]. With thHcss.[objectObject] logging configuration abovHcss.[objectObject], thHcss.[objectObject] HCSS applications will log tHcss.[objectObject] hcss.datHcss.[objectObject].log. Don'Hcss.[objectObject] forgeHcss.[objectObject] thaHcss.[objectObject] whaHcss.[objectObject] is written tHcss.[objectObject] thHcss.[objectObject] log can bHcss.[objectObject] configured as desired.
>
>
The first rule of troubleshooting is to check the log file. The principle Tomcat log file is $CATALINA_HOME/logs/catalina.out. With the logging configuration above, the HCSS applications will log to hcss.date.log. Don't forget that what is written to the log can be configured as desired.
 
Changed:
<
<
Sometimes therHcss.[objectObject] is nHcss.[objectObject] substitutHcss.[objectObject] for putting debugging statements in thHcss.[objectObject] codHcss.[objectObject]. You can dHcss.[objectObject] this by making modifications in a developer environmenHcss.[objectObject] as normal, and then copying thHcss.[objectObject] class filHcss.[objectObject](s) intHcss.[objectObject] thHcss.[objectObject] classes directory of thHcss.[objectObject] servleHcss.[objectObject]. For examplHcss.[objectObject]:
>
>
Sometimes there is no substitute for putting debugging statements in the code. You can do this by making modifications in a developer environment as normal, and then copying the class file(s) into the classes directory of the servlet. For example:
 
cvs co ia_pal_pool_http_server
edit HttpPoolServlet.java
jake
Changed:
<
<
Then copy thHcss.[objectObject] outpuHcss.[objectObject] HttpPoolServleHcss.[objectObject].class filHcss.[objectObject] tHcss.[objectObject] $CATALINA_HOME/webapps/hcss/classes/herschel/ia/pal/pool/http/server.
>
>
Then copy the output HttpPoolServlet.class file to $CATALINA_HOME/webapps/hcss/classes/herschel/ia/pal/pool/http/server.
 
Changed:
<
<
TIP If a needed library is somehow missing, iHcss.[objectObject] is possiblHcss.[objectObject] tHcss.[objectObject] bHcss.[objectObject] plagued by thHcss.[objectObject] dreaded NoClassDefFoundError. ThHcss.[objectObject] class reported tHcss.[objectObject] bHcss.[objectObject] missing is noHcss.[objectObject] necessarily thHcss.[objectObject] onHcss.[objectObject] thaHcss.[objectObject] is. If you know iHcss.[objectObject]'s therHcss.[objectObject], follow thHcss.[objectObject] dependency trail from thHcss.[objectObject] reported class tHcss.[objectObject] look for something missing. Pay particular attention tHcss.[objectObject] whaHcss.[objectObject] is used in statiHcss.[objectObject] initialisation statements.
>
>
TIP If a needed library is somehow missing, it is possible to be plagued by the dreaded NoClassDefFoundError. The class reported to be missing is not necessarily the one that is. If you know it's there, follow the dependency trail from the reported class to look for something missing. Pay particular attention to what is used in static initialisation statements.
 
Changed:
<
<

Running on a privileged porHcss.[objectObject]

>
>

Running on a privileged port

 
Changed:
<
<
This is normally thHcss.[objectObject] standard HTTP porHcss.[objectObject] 80. ThHcss.[objectObject] porHcss.[objectObject] is seHcss.[objectObject] by editing thHcss.[objectObject] server.xml filHcss.[objectObject] in thHcss.[objectObject] conf directory. I was noHcss.[objectObject] ablHcss.[objectObject] tHcss.[objectObject] geHcss.[objectObject] thHcss.[objectObject] defaulHcss.[objectObject] TomcaHcss.[objectObject] startup scripHcss.[objectObject] tHcss.[objectObject] work when installed on this porHcss.[objectObject]. HerHcss.[objectObject] is my scripHcss.[objectObject].
>
>
This is normally the standard HTTP port 80. The port is set by editing the server.xml file in the conf directory. I was not able to get the default Tomcat startup script to work when installed on this port. Here is my script.
 
Changed:
<
<
This scripHcss.[objectObject] musHcss.[objectObject] bHcss.[objectObject] started with rooHcss.[objectObject] privilegHcss.[objectObject]. NotHcss.[objectObject] thaHcss.[objectObject] thHcss.[objectObject] daemon still runs as a less privileged user.
>
>
This script must be started with root privilege. Note that the daemon still runs as a less privileged user.
 
Changed:
<
<
Further complications arisHcss.[objectObject] if therHcss.[objectObject] is a need tHcss.[objectObject] access thHcss.[objectObject] VersanHcss.[objectObject] library, as this accesses nativHcss.[objectObject] shared libraries, Hcss.[objectObject].g. for DbPool or thHcss.[objectObject] TM/data framHcss.[objectObject] server. WhilsHcss.[objectObject] thHcss.[objectObject] startup scripHcss.[objectObject] uses thHcss.[objectObject] java.library.path argumenHcss.[objectObject] tHcss.[objectObject] pass thHcss.[objectObject] location of thesHcss.[objectObject] libraries tHcss.[objectObject] thHcss.[objectObject] daemon process, this does noHcss.[objectObject] entirely work sincHcss.[objectObject] thHcss.[objectObject] firsHcss.[objectObject] called library then calls other libraries, which does noHcss.[objectObject] work sincHcss.[objectObject] thHcss.[objectObject] process does noHcss.[objectObject] inheriHcss.[objectObject] thHcss.[objectObject] valuHcss.[objectObject] of thHcss.[objectObject] LD_LIBRARY_PATH environmenHcss.[objectObject] variablHcss.[objectObject] (iHcss.[objectObject] defines its own). A workaround solution is tHcss.[objectObject] link tHcss.[objectObject] thHcss.[objectObject] required libraries from thHcss.[objectObject] Java installation, which is accessiblHcss.[objectObject], Hcss.[objectObject].g.
>
>
Further complications arise if there is a need to access the Versant library, as this accesses native shared libraries, e.g. for DbPool or the TM/data frame server. Whilst the startup script uses the java.library.path argument to pass the location of these libraries to the daemon process, this does not entirely work since the first called library then calls other libraries, which does not work since the process does not inherit the value of the LD_LIBRARY_PATH environment variable (it defines its own). A workaround solution is to link to the required libraries from the Java installation, which is accessible, e.g.
 
cd  $JAVA_HOME/jre/lib/amd64
Line: 195 to 195
 ln -s $VERSANT_ROOT/lib/libxa.so libxa.so
Changed:
<
<
NotHcss.[objectObject] thaHcss.[objectObject] this is only necessary sincHcss.[objectObject] thHcss.[objectObject] server is running as a daemon process in order tHcss.[objectObject] access thHcss.[objectObject] privileged porHcss.[objectObject] 80. TherHcss.[objectObject] may well bHcss.[objectObject] a better solution than this.
>
>
Note that this is only necessary since the server is running as a daemon process in order to access the privileged port 80. There may well be a better solution than this.
 
Changed:
<
<

Using thHcss.[objectObject] telemetry and data framHcss.[objectObject] server

>
>

Using the telemetry and data frame server

 
Changed:
<
<
PuHcss.[objectObject] thHcss.[objectObject] classes for thHcss.[objectObject] access_server modulHcss.[objectObject] in thHcss.[objectObject] hcss applications area, as for thHcss.[objectObject] PAL pool.
>
>
Put the classes for the access_server module in the hcss applications area, as for the PAL pool.
 
Changed:
<
<
Then add this servleHcss.[objectObject] definition tHcss.[objectObject] thHcss.[objectObject] weHcss.[objectObject].xml filHcss.[objectObject] in WEB-APPS.
>
>
Then add this servlet definition to the web.xml file in WEB-APPS.
 
    <servlet>
        <servlet-name>tm</servlet-name>
Line: 213 to 213
  </servlet-mapping>
Changed:
<
<
This corresponds tHcss.[objectObject] thHcss.[objectObject] url http://whatever:8080/hcss/tm, assuming defaulHcss.[objectObject] settings.
>
>
This corresponds to the url http://whatever:8080/hcss/tm, assuming default settings.
 
Changed:
<
<
This servleHcss.[objectObject] has a featurHcss.[objectObject] tHcss.[objectObject] allow redirection of a databasHcss.[objectObject] requesHcss.[objectObject] tHcss.[objectObject] a specifiHcss.[objectObject] server. This is donHcss.[objectObject] by means of HCSS properties. (IHcss.[objectObject] mighHcss.[objectObject] bHcss.[objectObject] cleaner tHcss.[objectObject] redefinHcss.[objectObject] them as parameters specified in thHcss.[objectObject] weHcss.[objectObject].xml filHcss.[objectObject]). ThHcss.[objectObject] easiesHcss.[objectObject] way tHcss.[objectObject] seHcss.[objectObject] them is tHcss.[objectObject] puHcss.[objectObject] them in a HcssTmHttpServer.defaults filHcss.[objectObject] in thHcss.[objectObject] samHcss.[objectObject] directory as thHcss.[objectObject] corresponding class filHcss.[objectObject]. ThesHcss.[objectObject] arHcss.[objectObject]:
hcss.access.server.defaulHcss.[objectObject]
If a server is noHcss.[objectObject] specified, usHcss.[objectObject] this onHcss.[objectObject]. IHcss.[objectObject] itself defaults tHcss.[objectObject] localhosHcss.[objectObject].
hcss.access.server.redirecHcss.[objectObject]
RedirecHcss.[objectObject] all databasHcss.[objectObject] server requests tHcss.[objectObject] this onHcss.[objectObject]. ThHcss.[objectObject] purposHcss.[objectObject] of this is tHcss.[objectObject] ensurHcss.[objectObject] thaHcss.[objectObject] operationally critical servers cannoHcss.[objectObject] bHcss.[objectObject] accessed by this process; thHcss.[objectObject] data of coursHcss.[objectObject] has tHcss.[objectObject] bHcss.[objectObject] presenHcss.[objectObject] on thHcss.[objectObject] server redirected tHcss.[objectObject].
>
>
This servlet has a feature to allow redirection of a database request to a specific server. This is done by means of HCSS properties. (It might be cleaner to redefine them as parameters specified in the web.xml file). The easiest way to set them is to put them in a HcssTmHttpServer.defaults file in the same directory as the corresponding class file. These are:
hcss.access.server.default
If a server is not specified, use this one. It itself defaults to localhost.
hcss.access.server.redirect
Redirect all database server requests to this one. The purpose of this is to ensure that operationally critical servers cannot be accessed by this process; the data of course has to be present on the server redirected to.
 
Changed:
<
<
This property should alsHcss.[objectObject] bHcss.[objectObject] seHcss.[objectObject] on thHcss.[objectObject] server sidHcss.[objectObject]. This will bHcss.[objectObject] madHcss.[objectObject] thHcss.[objectObject] defaulHcss.[objectObject] for this application in thHcss.[objectObject] nexHcss.[objectObject] version of thHcss.[objectObject] modulHcss.[objectObject]. NotHcss.[objectObject] thaHcss.[objectObject] this valuHcss.[objectObject] is specifiHcss.[objectObject] tHcss.[objectObject] thHcss.[objectObject] server and inappropriatHcss.[objectObject] for interactivHcss.[objectObject] use.
>
>
This property should also be set on the server side. This will be made the default for this application in the next version of the module. Note that this value is specific to the server and inappropriate for interactive use.
 
hcss.access.store = herschel.access.db.SimpleStoreHandler
Changed:
<
<
This servleHcss.[objectObject] is accessed by using thHcss.[objectObject] normal access API. ThesHcss.[objectObject] clienHcss.[objectObject]-sidHcss.[objectObject] properties need tHcss.[objectObject] bHcss.[objectObject] seHcss.[objectObject]:
>
>
This servlet is accessed by using the normal access API. These client-side properties need to be set:
 
hcss.access.connection=herschel.access.net.NetworkConnection
Line: 232 to 232
 hcss.access.url=http://whatever:8080/hcss/tm
Changed:
<
<
ConveniencHcss.[objectObject] methods tHcss.[objectObject] seHcss.[objectObject] thesHcss.[objectObject] properties dynamically arHcss.[objectObject] provided in thHcss.[objectObject] herschel.access.Access class.
>
>
Convenience methods to set these properties dynamically are provided in the herschel.access.Access class.
 
Changed:
<
<

Using TomcaHcss.[objectObject]'s Manager application

This is a very useful tool for monitoring, stopping and restarting applications. THcss.[objectObject] usHcss.[objectObject] iHcss.[objectObject] you havHcss.[objectObject] tHcss.[objectObject] givHcss.[objectObject] yourself privilegHcss.[objectObject]. Either:
  • Add thHcss.[objectObject] manager rolHcss.[objectObject] tHcss.[objectObject] tomcaHcss.[objectObject]-users.xml and add thHcss.[objectObject] rolHcss.[objectObject] tHcss.[objectObject] your usernamHcss.[objectObject].
  • EdiHcss.[objectObject] thHcss.[objectObject] weHcss.[objectObject].xml filHcss.[objectObject] for thHcss.[objectObject] manager application and changHcss.[objectObject] thHcss.[objectObject] manager rolHcss.[objectObject] tHcss.[objectObject] spire_admin or whatever.
>
>

Using Tomcat's Manager application

This is a very useful tool for monitoring, stopping and restarting applications. To use it you have to give yourself privilege. Either:
  • Add the manager role to tomcat-users.xml and add the role to your username.
  • Edit the web.xml file for the manager application and change the manager role to spire_admin or whatever.
 
Changed:
<
<
Then gHcss.[objectObject] tHcss.[objectObject] thHcss.[objectObject] "manager/html" weHcss.[objectObject] pagHcss.[objectObject] on your server. I found thaHcss.[objectObject] with my configuration I was getting HTTP 401 errors when I tried this. I goHcss.[objectObject] iHcss.[objectObject] tHcss.[objectObject] work by commenting ouHcss.[objectObject] thHcss.[objectObject] error-pagHcss.[objectObject] entry in thHcss.[objectObject] manager weHcss.[objectObject].xml filHcss.[objectObject].
>
>
Then go to the "manager/html" web page on your server. I found that with my configuration I was getting HTTP 401 errors when I tried this. I got it to work by commenting out the error-page entry in the manager web.xml file.
 

-- SteveGuest - 03 Aug 2012

META FILEATTACHMENT attr="h" autoattached="1" comment="Tomcat startup script on privileged port" date="1250082100" name="tomcat80" path="tomcat80" size="2613" user="Main.SteveGuesHcss.[objectObject]" version="1"
Deleted:
<
<
META FILEATTACHMENT attr="h" autoattached="1" comment="" date="1301394913" name="genpwd.sh" path="genpwd.sh" size="608" user="Main.SteveGuesHcss.[objectObject]" version="1"
META FILEATTACHMENT attr="h" autoattached="1" comment="web.xml with digest authentication" date="1301402024" name="digest.xml" path="digest.xml" size="2342" user="Main.SteveGuesHcss.[objectObject]" version="1"
 
META FILEATTACHMENT attr="h" autoattached="1" comment="Script to update servlet jars for CIB" date="1256127319" name="update_servlets" path="update_servlets" size="1315" user="Main.SteveGuesHcss.[objectObject]" version="4"
Added:
>
>
META FILEATTACHMENT attr="h" autoattached="1" comment="web.xml with digest authentication" date="1301402024" name="digest.xml" path="digest.xml" size="2342" user="Main.SteveGuesHcss.[objectObject]" version="1"
META FILEATTACHMENT attr="h" autoattached="1" comment="" date="1301394913" name="genpwd.sh" path="genpwd.sh" size="608" user="Main.SteveGuesHcss.[objectObject]" version="1"
 
META FILEATTACHMENT attr="h" autoattached="1" comment="web.xml with basic authentication" date="1301401999" name="basic.xml" path="basic.xml" size="2261" user="Main.SteveGuesHcss.[objectObject]" version="1"
META TOPICMOVED by="SteveGuest" date="1343989389" from="Hcss.HttpPool" to="Public.HttpPool"
 
This site is powered by the TWiki collaboration platform Powered by Perl