|
|
(4 intermediate revisions by the same user not shown) |
Line 3: |
Line 3: |
| After a dataset has been installed, and the handler programs installed, | | After a dataset has been installed, and the handler programs installed, |
| you need to know what its address is. If you've tested the web server | | you need to know what its address is. If you've tested the web server |
| installation as in ([http://www <cite> dods-server,install</cite>]), you know the | | installation as in ([[Wiki_Testing/ServerInstallationGuide2 | Chapter2]]), you know the |
| beginning of the URLs that will point to data at your site. | | beginning of the URLs that will point to data at your site. |
|
| |
|
| (If you're using the DRDS Java server, see ([http://www <cite> server,drds,done</cite>]).) | | (If you're using the DRDS Java server, see ([[Wiki_Testing/ServerInstallationGuide4 | Section 4.3.3]]).) |
|
| |
|
| \subj{How do you address the data you just installed?}
| | |
| Suppose your web server's document root is at: | | Suppose your web server's document root is at: |
|
| |
|
Line 21: |
Line 21: |
| </pre> | | </pre> |
|
| |
|
| Following the test URL in ([http://www <cite> dods-server,install</cite>]), this would | | Following the test URL in ([[Wiki_Testing/ServerInstallationGuide2 | Chapter2]]), this would |
| be the URL to use in a client. | | be the URL to use in a client. |
|
| |
|
Line 30: |
Line 30: |
| Note that this URL will work for a DAP client, but not for a standard | | Note that this URL will work for a DAP client, but not for a standard |
| web browser. If you want to use a standard web browser to test your | | web browser. If you want to use a standard web browser to test your |
| installation, read on, and also take a look at \DODSquick . See note | | installation, read on, and also take a look at [http://docs.opendap.org/index.php/QuickStart <cite>The OPeNDAP QuickStart Guide</cite>] . See note |
| \texorhtml{on page
| |
| \pageref{note,dispatch-name}}{(note,dispatch-name)}.
| |
|
| |
|
|
| |
|
Line 41: |
Line 39: |
| of the the data objects dictionary contained the following | | of the the data objects dictionary contained the following |
| definitions: | | definitions: |
| \subj{The situation is slightly different for JGOFS data.}
| | |
| | |
| <pre> | | <pre> |
| test0=def(/var/www/html/data/test0.data) | | test0=def(/var/www/html/data/test0.data) |
Line 57: |
Line 54: |
| http://test.opendap.org/cgi-bin/nph-dods/s87_xbt | | http://test.opendap.org/cgi-bin/nph-dods/s87_xbt |
| </pre> | | </pre> |
|
| |
| =Testing the Installation=
| |
|
| |
|
| |
| It is possible to
| |
| test the server to see whether an installation has been properly done.
| |
| The easiest way to test the installation is with a simple Web client
| |
| like Netscape. (A command-line web client called <font color='green'>getdap</font> is
| |
| provided with <font color='green'>libdap</font> which can retrieve text from Web servers,
| |
| and print it on standard output. Look for it in the
| |
| <font color='green'>/usr/local/bin</font> directory. If you try it out on a couple of URLs
| |
| you are familiar with, you'll quickly see how it works.) \subj{Check
| |
| out the Quick Start Guide for information about forming DAP URLs.}
| |
|
| |
| You can test the web server installation first, and when you are sure
| |
| the server is working well, test the OPeNDAP server.
| |
|
| |
| ==Testing the Web Server==
| |
|
| |
| To begin, confirm that the web server works properly by simply sending a
| |
| URL for a simple web page, or without a file at all:
| |
|
| |
| <pre>
| |
| http://yourmachine
| |
| </pre>
| |
|
| |
| If you don't get anything with this, examine the document root
| |
| directory (<font color='green'>htdocs</font>), and make a request for a file in that
| |
| directory:
| |
|
| |
| <pre>
| |
| http://yourmachine/somefile.html
| |
| </pre>
| |
|
| |
| Debugging these early steps is essential to getting an OPeNDAP server
| |
| to work, but troubleshooting any problems you have with these steps is
| |
| an issue specific to the web server you are using.
| |
|
| |
| Once you have a web server that can return a web page, you should
| |
| exercise the CGI configuration. Here is the simplest possible CGI
| |
| program:
| |
|
| |
| <pre>
| |
| #!/usr/bin/perl
| |
| print "Content-type: text/html\n\n";
| |
| print "Hello World!\n\n";
| |
| </pre>
| |
|
| |
| Put this text in a file, and try to execute it from the command line.
| |
| You may have to edit the first line in case your copy of Perl isn't
| |
| stored in the <font color='green'>/usr/bin</font> directory. Don't forget to make the file
| |
| executable. (Use the <font color='green'>chmod</font> command.)
| |
|
| |
| When you can execute this from the command line, put it into the CGI
| |
| directory (and make sure that the permissions will allow the
| |
| <font color='green'>httpd</font> to execute it), and try to execute it with a URL like
| |
| this:
| |
|
| |
| <pre>
| |
| http://yourmachine/cgi-bin/test-cgi
| |
| </pre>
| |
|
| |
| If you are configuring your site to use suffixes instead of a
| |
| directory to identify CGI files, name it accordingly:
| |
|
| |
| <pre>
| |
| http://yourmachine/test.cgi
| |
| </pre>
| |
|
| |
| Entering one of these URLs in a web server should cause the "Hello,
| |
| World!" text to appear in the web browser window. If not, check the
| |
| permissions of the CGI program, then consult the documentation for the
| |
| web server.
| |
|
| |
| If everything works so far, it's time to move on to testing the
| |
| OPeNDAP server installation.
| |
|
| |
| ==Testing the OPeNDAP Server==
| |
|
| |
| You can run the handler programs locally, that is, without going over
| |
| the Internet. Sometimes this is the simplest way to make sure that
| |
| everything is running.
| |
|
| |
| <pre>
| |
| ./dap_nc_handler -o dds datafile.nc
| |
| </pre>
| |
|
| |
| The program should print the dataset's DDS on standard output. Use the
| |
| <font color='green'>-h</font> option to see the list of options the handlers accept.
| |
|
| |
| The simplest remote test is simply to ask for the version of
| |
| the server, sending a URL like this:
| |
|
| |
| <pre>
| |
| http://yourmachine/cgi-bin/nph-dods/version
| |
| </pre>
| |
|
| |
| The server will respond to this URL with some text containing release
| |
| numbers. If you enter this URL into a standard web browser you're
| |
| doing fine if you see a message like this:
| |
|
| |
| <pre>
| |
| Core version: DODS/3.2.5
| |
| Server version: nc/3.2.2
| |
| </pre>
| |
|
| |
| The dispatch script can respond to a number of requests without the
| |
| assistance of its helper programs, or the existence of any data.
| |
| Besides the version request, you can also ask for the help and info
| |
| messages:
| |
|
| |
| <pre>
| |
| > getdap http://test.opendap.org/opendap/nph-dods/data/nc/test.nc.ver
| |
| > getdap http://test.opendap.org/opendap/nph-dods/data/nc/test.nc.info
| |
| > getdap http://test.opendap.org/opendap//nph-dods/data/nc/test.nc.help
| |
| </pre>
| |
|
| |
| Now we need to test the requests that use the handler programs, such
| |
| as <font color='green'>dap_nc_handler</font>. These programs compose their output by
| |
| looking at data files, so testing these requires data to be in place.
| |
|
| |
| To return the data attribute structure of a dataset, use a URL such as
| |
| the following:
| |
|
| |
| <pre>
| |
| > getdap http://test.opendap.org/opendap/nph-dods/data/nc/test.nc.das
| |
| </pre>
| |
|
| |
| The <font color='green'>getdap</font> program knows about the DAP protocol, so you can
| |
| also omit the <font color='green'>.das</font> suffix, and use the <font color='green'>-a</font> option to the
| |
| <font color='green'>geturl</font> command. This tells <font color='green'>getdap</font> to append <font color='green'>.das</font>
| |
| for you:
| |
|
| |
| <pre>
| |
| > getdap -a http://test.opendap.org/opendap/nph-dods/data/nc/test.nc
| |
| </pre>
| |
|
| |
| Refer to \DODSuser for a description of a data attribute structure.
| |
| You can compare the description against what is returned by the above
| |
| URL to test the operation of the server.
| |
| Check the list of services and helper programs in
| |
| ([http://www <cite> dods-server,service</cite>]). From a web browser, you can access
| |
| all the DAP services, except the data service, which returns binary,
| |
| not ASCII, data. That one can only be easily tested from a DAP-enabled
| |
| client. However, if all the service programs work, and the data
| |
| service is configured the same way, the odds are on your side.
| |
|
| |
| Using the <font color='green'>.html</font> suffix produces the \ifh, providing a
| |
| forms-based interface with which a user can query the dataset using a
| |
| simple web browser. There's more about the \ifh in \DODSuser .
| |
|
| |
| ==Error Logs==
| |
|
| |
| When troubleshooting an OPeNDAP data
| |
| server, the logs of the web server are quite useful. The Apache server
| |
| keeps two logs, an Access log and an Error log. (You can find these in
| |
| the <font color='green'>logs</font> subdirectory where you installed Apache.) The OPeNDAP
| |
| server software writes any messages it issues to the error log.
| |
|
| |
| You can make the error messages slightly more verbose by editing the
| |
| <font color='green'>DODS_Dispatch.pm</font> file (in <font color='green'>/usr/share/dap-server</font>). Find
| |
| the <font color='green'>$debug</font> variable, and set it to 1 or 2 instead of zero. Note
| |
| that these messages are, as of version 3.5, now written to the
| |
| <font color='green'>dbg_log</font> file which is usually in <font color='green'>/usr/share/dap-server</font>.
| |
| Check the <font color='green'>DODS_Dispatch.pm</font> file to determine the actual path.
| |
|
| |
| ==User Support==
| |
|
| |
| As a last resort, you can use
| |
| the OPeNDAP technical support service. OPeNDAP provides technical
| |
| support by email: \DODSsupport.
| |
Constructing the URL
After a dataset has been installed, and the handler programs installed,
you need to know what its address is. If you've tested the web server
installation as in ( Chapter2), you know the
beginning of the URLs that will point to data at your site.
(If you're using the DRDS Java server, see ( Section 4.3.3).)
Suppose your web server's document root is at:
/var/www/html/
And you are serving netCDF data that you've stored at:
/var/www/html/datasets/atlantic/cooldata.nc
Following the test URL in ( Chapter2), this would
be the URL to use in a client.
http://yourmachine/cgi-bin/nph-dods/datasets/atlantic/cooldata.nc
Note that this URL will work for a DAP client, but not for a standard
web browser. If you want to use a standard web browser to test your
installation, read on, and also take a look at The OPeNDAP QuickStart Guide . See note
Constructing a OPeNDAP/JGOFS URL
Suppose that you have installed the OPeNDAP/JGOFS handler, as described
above, on the machine test.opendap.org. And a partial listing
of the the data objects dictionary contained the following
definitions:
test0=def(/var/www/html/data/test0.data)
s87_xbt=def(/var/www/html/data/xbt.catalog)
s87_ctd=def(/var/www/html/data/ctd.catalog)
htf=autoedges(/fronts/hatteras-to-florida/edges)
htn=autoedges(/fronts/hatteras-to-nova-scotia/edges)
glk=autoedges(/fronts/great-lakes/edges)
A URL that references the data object 's87_xbt' would look like:
http://test.opendap.org/cgi-bin/nph-dods/s87_xbt