Replacing web site content with fresh version from JWS2 (JABAWS production ) branch
[jabaws.git] / website / man_serverwar.html
diff --git a/website/man_serverwar.html b/website/man_serverwar.html
new file mode 100644 (file)
index 0000000..5d092e0
--- /dev/null
@@ -0,0 +1,264 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta name="Last-modified" content="Mon, 11 Dec 2010 01:03:33 GMT"/>\r
+<title>Java Bioinformatics Analyses Web Services (JABAWS) Server Web Aplication aRchive manual</title>\r
+<link href="ws.css" rel="stylesheet" type="text/css" media=\r
+"screen, projection, handheld, tv" />\r
+<link rel="stylesheet" type="text/css" media="print" href=\r
+"print.css" />\r
+<script type="text/javascript" src="prototype-1.6.0.3.js"></script>\r
+</head>\r
+<body>\r
+<div id="page">\r
+<div id="banner">\r
+<table> \r
+<tr><td style="width:130px;"><a href="http://www.dundee.ac.uk"><img class="logo" src="images/uod_lt.gif"  alt="University of Dundee"  title="University of Dundee" longdesc="http://www.dundee.ac.uk"/></a></td>\r
+<td class="bg"><h1><span class="headeru">JA</span>va <span class=\r
+"headeru">B</span>ioinformatics <span class="headeru">A</span>nalysis <span class="headeru">W</span>eb <span\r
+class="headeru">S</span>ervices</h1></td>\r
+</tr>\r
+</table></div><!-- banner end-->\r
+\r
+<div id="wrapper">\r
+<div id="panel"><a href="index.html">Home</a> \r
+    <a class="selected" href="manual.html">Manual</a> \r
+       <div id="submenu">\r
+               <a href="manual.html">Quick Start Guide</a>\r
+               <a href="man_about.html">About</a>\r
+               <a href="man_servervm.html" title="JABAWS Server as Virtual Appliance">Server VA</a>\r
+               <a class="selected" href="man_serverwar.html" title="JABAWS Server as Web Application aRchive">Server WAR</a>\r
+               <a href="man_configuration.html" >Server<br/>\r
+               Configuration</a>\r
+               <a href="man_client.html" title="JABAWS Command Line Client">CMD Client</a>\r
+               <a href="man_dev.html" title="Accessing JABAWS from your program">Accessing<br/>\r
+               JABAWS</a>      \r
+       </div>\r
+<a href="download.html">Download</a> \r
+<a href="http://www.compbio.dundee.ac.uk">Barton Group</a> \r
+</div>\r
+\r
+<!-- panel end-->\r
+<div id="content">\r
+<h2 id="headtitle">JABAWS MANUAL</h2>\r
+\r
+<h2>JABAWS Server Web Application aRchive (WAR) </h2>\r
+<ul>\r
+  <li><a href="#sysreq">System Requirements</a></li>\r
+  <li><a href="#instwar">Installing the JABAWS WAR file</a></li>\r
+  <li><a href="#prepexec">Preparing executables for use with JABAWS</a></li>\r
+  <li><a href="#useprebin">Using the pre-compiled i386 binaries on Linux</a></li>\r
+  <li><a href="#recompbinaries">Recompiling the bundled\r
+    programs for your system</a></li>\r
+  <li><a href="#haveexec">Reuse the binaries that are\r
+    already in your system</a></li>\r
+  <li><a href="#obtainexec">Obtaining alignment\r
+    programs for your operating system</a></li>\r
+  <li><a href="#usingWsTester">Testing JABAWS Server</a></li>\r
+  <li><a href="#diffcontexts">Running many JABAWS instances on the same server</a> </li>\r
+  <li><a href="#nocluster">JABAWS on a single server</a></li>\r
+  <li><a href="#clustsubsys">JABAWS supported cluster batch management systems </a></li>\r
+  <li><a href="#tomstopundeploy">Manually deploying JABAWS application on Apache-Tomcat </a></li>\r
+</ul>\r
+<p><strong>Troubleshooting</strong></p>\r
+<ul>\r
+  <li><a href="#tomdeploy">Apache-Tomcat fails to deploy the jabaws.war file</a></li>\r
+  </ul>\r
+<h3><a name="sysreq" id="sysreq"></a>System Requirements</h3>\r
+<p>JABAWS requires a Java web application server compliant with\r
+version 2.4 of the Java Servlet specification, and a Java 6 runtime\r
+environment. We recommend using an official Oracle Java 6 runtime\r
+environment, and <a\r
+href="http://tomcat.apache.org/download-60.cgi">Apache-Tomcat</a> web application server version 6, but other versions may work as well. </p>\r
+\r
+<p>JABAWS Web Application aRchive can run on any host operating system that supports Java. However JABAWS depends on the third party programs which are not available for all operating systems. In particular, only Clustal and Muscle are currently available for MS Windows platform.\r
+  <!-- todo: link to help about obtaining and installing tomcat -->\r
+</p>\r
+<p>JABAWS comes with pre-compiled MS Windows and Linux IA32 binaries and contains all the binaries sources.</p>\r
+<p>To run JABAWS on the cluster you must have shared disk space accessible from all cluster nodes. </p>\r
+<h3><a name="instwar" id="instwar"></a>Installing the JABAWS WAR file</h3>\r
+<p>JABAWS is distributed as a web application archive (WAR). To\r
+deploy JABAWS in Apache-Tomcat - simply drop the war file into the\r
+<span class="highlight">webapps</span> directory of a running\r
+Tomcat, and it will do the rest. If you used this deployment procedure, <span class="attention">do not remove</span> jabaws war file, otherwise Tomcat will undeploy your application!  </p>\r
+<p>For any other web application\r
+  server, please follow your server's specific deployment procedure\r
+  for 'WAR' files. If you install JABAWS on a MS Windows machine, then\r
+  at this point your JABAWS installation will already be up and\r
+  running, and you can try its services out <a href=\r
+"#usingWsTester">as described here</a>. If you install JABAWS on Linux you will need to set an executable flag for binaries. This is described  <a href="#useprebin">here</a>. If your host operating system is different from Windows or Linux then read on. </p>\r
+<h3><a name="prepexec" id="prepexec"></a>Preparing executables for use with JABAWS</h3>\r
+\r
+<p>JABAWS's web services use command line programs to do\r
+the actual analysis, so it must have access to programs\r
+which can be executed on your platform. The native executables\r
+bundled with JABAWS for Windows (32-bit) and Linux (i386, 32-bit) should be\r
+OK for those systems. The source code for these \r
+programs is also provided so you can <a href="#recompbinaries">recompile for your own\r
+architecture</a> and exploit any optimizations that your system can\r
+provide. Alternately, if you have already got binaries on your\r
+system, then you can simply <a href="#haveexec">change the paths in JABAWS's\r
+configuration files</a> so these are used instead.</p>\r
+\r
+<h3><a name="useprebin" id="useprebin"></a>Using the pre-compiled i386 binaries on Linux</h3>\r
+\r
+<p>Before the binaries that are bundled with JABAWS can be used,\r
+they must first be made executable using the provided <a name=\r
+"setexecflag" id="setexecflag">'setexecflag.sh'</a> script:</p>\r
+\r
+<ol>\r
+<li>cd to <span class=\r
+"hightlight">&lt;webapplicationpath&gt;/binaries/src</span></li>\r
+\r
+<li>run <span class="hightlight">sh setexecflag.sh</span></li>\r
+\r
+<li>Make sure binaries supplied work under your OS.<br />\r
+ For this run each binary, without any command line options or\r
+input files. If you see an error message complaining about missing\r
+libraries or other problems, then you probably need to <a href=\r
+"#recompbinaries">recompile the binaries</a>. with</li>\r
+\r
+<li>Restart the Tomcat.</li>\r
+</ol>\r
+\r
+That's it! JABAWS should work at this point. Try it out using the JABAWS<a\r
+href="#usingWsTester"> test client</a>. If not,\r
+read on... or have a look at <a href="http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html">deploying on Tomcat</a> tips.<br />\r
+ <em>Note: You may want to enable logging, <a href="man_configuration.html#logfiles"> as described here</a></em>.<br />\r
\r
+\r
+<h3><a name="recompbinaries">Recompiling the bundled\r
+programs for your system</a></h3>\r
+\r
+<p>If you have a fully equipped build environment on your\r
+(POSIX-like) system, then you should be able to recompile the\r
+programs from the source distributions which are included\r
+in the JABAWS war file. A script called 'compilebin.sh' is provided\r
+to automate this task.</p>\r
+\r
+<ol>\r
+<li>In a terminal window, change the working directory to <span\r
+class="hightlight">binaries/src</span></li>\r
+\r
+<li>execute the <span class="highlight">compilebin.sh</span>\r
+script,<br />\r
+ either use: <span class="hightlight">chmod +x compilebin.sh;\r
+compilebin.sh &gt; compilebin.out;</span><br />\r
+ or: <span class="hightlight">sh compilebin.sh &gt;\r
+compilebin.out</span></li>\r
+\r
+<li>Now run <span class="hightlight">sh setexecflag.sh</span><br />\r
+ If any of the binaries was not recompiled, then a 'file not found'\r
+error will be raised.</li>\r
+\r
+<li>Finally, restart your Tomcat server (or JABAWS application only), and <a href="#usingWsTester">test JABAWS</a> to\r
+check that it can use the new binaries.</li>\r
+</ol>\r
+\r
+<p>If you couldn't compile everything, then it may be that your system does\r
+not have all the tools required for compiling the programs. At the very\r
+least check that you have gcc, g++ and make installed in your\r
+system. If not install these packages and repeat the compilation\r
+steps again. You should also review the compilebin.sh output -\r
+which was redirected to compilebin.out, and any errors output to\r
+the terminal. Finally, try obtaining the <a href="#obtainexec">pre\r
+compiled binaries</a> for your OS.</p>\r
+\r
+<h3><a name="haveexec" id="haveexec">Reuse the binaries that are\r
+already in your system</a></h3>\r
+\r
+<p>If you would like to use the binaries you already have then you\r
+just need to let JABAWS know there they are. To do this, edit:\r
+<span class="code">conf/Executable.properties</span></p>\r
+<p>When specifying paths to executables that already exist on your system, make sure you provide an absolute path, or one relative to the JABAWS directory inside <span class="highlight">webapps</span>. For example, the default path for clustalw is defined\r
+as<span class=\r
+"code">local.clustalw.bin=binaries/src/clustalw/src/clustalw2</span>\r
+Alternatively, instead of changing <span class=\r
+"hightlight">Executable.properties</span> you could also replace\r
+the executables bundled with JABAWS with the ones that you have, or make symbolic links to them.\r
+Then the default configuration will work for you. More information\r
+about <span class="hightlight">the\r
+Executable.properties</span> file is given in the <a href="man_configuration.html#exec">JABAWS Configuration chapter.</a></p>\r
+\r
+<h3><a name="obtainexec" id="obtainexec">Obtaining alignment\r
+programs for your operating system</a></h3>\r
+\r
+<p>You could search for pre-packaged compiled executable in your\r
+system package repository or alternately, download pre-compiled\r
+binaries from each alignment program's home page. Then, either\r
+replace the executables supplied with the downloaded ones, or\r
+modify the paths in <span class=\r
+"hightlight">executable.properties</span> as described above. Below are some suggestions on where you may be able to get the binaries for your system. </p>\r
+<ul>\r
+  <li><a href="ftp://ftp.ebi.ac.uk/pub/software/clustalw2/2.0.12/">ClustalW</a></li>\r
+  <li><a href="http://mafft.cbrc.jp/alignment/software/">Mafft</a></li>\r
+  <li><a href="http://www.drive5.com/muscle/download3.6.html">Muscle</a></li>\r
+  <li><a href="http://www.tcoffee.org/Packages/Binaries/">Tcoffee</a></li>\r
+  <li>Probcons (Linux <a href="http://www.compbio.dundee.ac.uk/jabaws/archive/binaries/linuxI386/probcons/">I386</a> | <a href="http://www.compbio.dundee.ac.uk/jabaws/archive/binaries/linuxAMD64/probcons/">AMD64</a>)</li>\r
+</ul>\r
+<h3><a name="usingWsTester" id="usingWsTester"></a>Testing JABAWS Server </h3>\r
+<p>First of all make sure that Tomcat server is started successfully. If this was the case, then you should see JABAWS home page when you navigate to your Tomcat JABAWS context path e.g. <span class="code">http://myhost.compbio.ac.uk:8080/jabaws</span>If you see it, then it is time to make sure that web services are working too. Assuming that you have unpacked/deployed JABAWS from the server war file, you should be able to navigate to the test program which can be found in &lt;webapplicationpath&gt;/WEB-INF/lib/jabaws-client.jar file. To run the tests type:<span class="code"> java -jar jabaws-client.jar -h=&lt;Your web application server host name, port and JABAWS context path&gt;</span></p>\r
+<p>For example to test all JABAWS web services on host myhost.compbio.ac.uk type: </p>\r
+<p class="code">java -jar jabaws-client.jar -h=http://myhost.compbio.ac.uk:8080/jabaws </p>\r
+<p>You can choose a particular web server using -s option like this <span class="code">java -jar jabaws-client.jar -h=http://myhost.compbio.ac.uk:8080/jabaws -s=ClustalWS </span>This command line assumes that java executable is in your path and jabaws-client.jar is located in the current directory.</p>\r
+<p>An example of the report testing tool produces for operating web service looks like this: </p>\r
+<p><span class="code"> Connecting to service MuscleWS on http://myhost.compbio.ac.uk:8080/jabaws ... OK<br />\r
+  Testing alignment with default parameters:<br />\r
+  Queering job status...OK<br />\r
+  Retrieving results...OK<br />\r
+  Testing alignment with presets:<br />\r
+  Aligning with preset 'Protein alignment(Fastest speed)'... OK<br />\r
+  Aligning with preset 'Nucleotide alignment(Fastest speed)'... OK<br />\r
+  Aligning with preset 'Huge alignments (speed-oriented)'... OK<br />\r
+  Queering presets...OK<br />\r
+  Queering Parameters...OK<br />\r
+  Queering Limits...OK<br />\r
+  Queering Local Engine Limits...OK<br />\r
+  Check is completed service MuscleWS IS WORKING</span>An example of the response of a web service which is deployed but is not operating is below: </p>\r
+<p><span class="code">Connecting to service ProbconsWS on http://localhost:8080/ws ... OK<br />\r
+  Testing alignment with default parameters:FAILED<br />\r
+  Service ProbconsWS IS NOT FUNCTIONAL</span>If the web server did not respond the message looks like following: <span class="code">Connecting to service TcoffeeWS on http://localhost:8080/ws ... FAILED</span></p>\r
+<h3><a name="diffcontexts" id="diffcontexts"/></a></a>Running many JABAWS instances on the same server</h3>\r
+<p> JABAWS is supplied as a Web Application aRchive which can be dealt with as any other web applications. So it is perfectly possible to run two JABAWS instances from the same server. Just make two different contexts on your application server and unpack JABAWS in both of them. For example if your server name is http://www.align.ac.uk, and the context names are public and private. Than one group of users could be given a URL http://www.align.ac.uk/public and another http://www.align.ac.uk/private. These contexts will be served by two independent JABAWS instances, and could be configured differently. If you keep local engine enabled, make sure you reduce the number of threads local engine is allowed to use to avoid overloading the server. Alternatively two completely separate web application server instances (e.g. Apache-Tomcat) could be used. This will give you a better resilience and more flexibility in memory settings. </p>\r
+<h3><a name="nocluster" id="nocluster"></a>JABAWS on a single server</h3>\r
+<p>You can run  JABAWS on a single server. Obviously the capacity will be limited, but may be sufficient for a small lab. Installed on a single server, JABAWS executes tasks in parallel, so the more cores the server has the more requests it will be able to handle. </p>\r
+<h3><a name="clustsubsys" id="clustsubsys"></a>JABAWS supported cluster batch management systems </h3>\r
+<p>JABAWS uses <a href="http://drmaa.org/">DRMAA</a> v. 1.0 library to send and manage jobs on the cluster. DRMAA supports many different cluster job management systems. Namely Sun Grid Engine, Condor, PBS, GridWay, Globus 2/4, PBSPro, LSF. For up to date information please consult DRMAA web site. We found that DRMAA implementation differ from platform to platform and were trying to use only the basic functions. We have only tested JABAWS on Sun Grid Engine v 6.2. Please let use know if you have any experience of running JABAWS on other platforms.</p>\r
+<h3><a name="tomstopundeploy" id="tomstopundeploy"></a>Manually deploying JABAWS application on Apache-Tomcat </h3>\r
+<p>To stop Tomcat from automatically undeploying your application if the war file is removed use an explicit application descriptor. It could come in different flavors, the one I prefer if to drop a context descriptor file into <span class="hightlight">&lt;tomcatRoot&gt;conf/Catalina/localhost</span> directory. Name your context file the same as your application folder e.g. if you JABAWS resides in webappl/jabaws folder, then call the context file jabaws.xml. Below is an example of content this file might have.</p>\r
+<p class="code">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />\r
+  &lt;Context antiResourceLocking=&quot;false&quot; privileged=&quot;true&quot;  /&gt;</p>\r
+<p>This should be sufficient to prevent Tomcat from removing your JABAWS from WEBAPPS. For more information about the Tomcat deployer <a href="http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html">read this documentation on the Apache-Tomcat web site</a>.</p>\r
+<h3><a name="tomdeploy" id="tomdeploy"></a>Apache-Tomcat fails to deploy jaba.war file </h3>\r
+<ul>\r
+  <li>Make sure Tomcat have sufficient access rights to read your war file. </li>\r
+  <li>Restart the Tomcat, sometimes it will not since that the new war file is added without restart</li>\r
+  <li>If Tomcat still refuses to unpack the war file, unpack it manually into web application folder (the war file is just a zip archive). <a href="manual.html#setexecflag"> </a> Restart the Tomcat.</li>\r
+</ul>\r
+</div>\r
+\r
+<!-- content end-->\r
+<div id="copyright">Last update: 7 January 2011<br />\r
+ Peter Troshin, Jim Procter and Geoff Barton, The Barton Group, University of\r
+Dundee, UK</div>\r
+</div>\r
+\r
+<!-- wrapper end-->\r
+</div>\r
+<!-- page end-->\r
+\r
+<!-- Google analitics -->\r
+<script type="text/javascript">\r
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\r
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));\r
+</script>\r
+<script type="text/javascript">\r
+try{\r
+var pageTracker = _gat._getTracker("UA-5356328-1");\r
+pageTracker._trackPageview();\r
+} catch(err) {}\r
+</script>\r
+</body>\r
+</html>\r
+\r