190 likes | 197 Views
Checking the Server. Location of Server Files on the Virtual Machine. On your virtual machine: We ’ ll use the root directory of the shrew/hyrax checkout often and refer to it as $prefix The value of $prefix on you VM is /home/opendap/src/hyrax-1.9
E N D
Location of Server Files on the Virtual Machine • On your virtual machine: • We’ll use the root directory of the shrew/hyrax checkout often and refer to it as $prefix • The value of $prefix on you VM is /home/opendap/src/hyrax-1.9 • The Tomcat servlet engine is in $prefix/tomcat • The BES, data handlers and related source files are in $prefix/src. The BES has been built and installed in $prefix/{bin,lib,…} • The OLFS web archive file is $prefix/tomcat/webapps/opendap.war • BES: bes.conf, found at $prefix/etc/bes/bes.conf • OLFS: olfs.xml and catalog.xml, found at $prefix/tomcat/content/opendap
Background: Starting the Server • Start the BES (back-end data processing component) • Use bescmdln to verify it’s working • Start Tomcat: This automatically starts all installed servlets • Servlets are installed by copying the .war file to the servlet’s webapps directory • Verify it’s working using a web browser
Start Tomcat & the OLFS • Typical steps: • Unpack the olfs jar-file • Copy the opendap.war file to Tomcat’s webapps directory • Start Tomcat • Since all but the last step has been done already, start Tomcat: • /usr/local/javadev/apache-tomcat-5.5.12/bin/startup.sh
Verify Tomcat is running http://localhost:8080
…and Hyrax http://localhost:8080/opendap
Troubleshooting • The getdap command line client • Can request any of the DAP response objects • Can act as a simple, generic web client • When even getdap cannot diagnose a problem, use telnet!
Troubleshooting with getdap • Use getdap to get • The DAS, DDS, Data, DDX • Version information • Use telnet to view the raw HTTP response • If the server times out too quickly, use expect to control telnet
Use the ‘-a’ option to get a DAS response Also provide a valid URL http://localhost:8080/opendap/data/nc/fnoc1.nc
Use the ‘-D’ (data) and ‘-c’ (constraint) options to get a data response. A constraint expression with just one variable. We got this from the DDS above
This constraint is asking for the values of ‘time’ between indexes 2 and 6 (every second value).
Appending the string ‘version’ to the server root name requests version information. It comes back in an XML document.
Telnet reveals all • Use telnet to pass HTTP commands directly to the ‘opendap’ web application • Open the connection using the host name and port number • Use the ‘GET’ command, the pathname part of the URL including the DAP request extension and ‘HTTP/1.1’ or ‘HTTP/1.0’ • Often you will need to supply a ‘Host: <name>’ header • A blank line.
Connect to the Tomcat or Apache server GET <pathname> HTTP/1.1 (or 1.0) - hit return quickly! Host: header is important for a virtual server Here’s the payoff - we can see all of the headers set by both the web app and the server, plus the response. Be cautious with data responses because they are binary and will mess up your terminal session. Note the HTTP 1.1 chunking counts (c5 and 0)