trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew...@apache.org
Subject svn commit: r831152 [7/37] - in /incubator/trafficserver/site/trunk/docs: ./ admin/ admin/images/ sdk/ sdk/css/ sdk/images/ sdk/images/docbook/ sdk/js/
Date Thu, 29 Oct 2009 23:23:36 GMT
Added: incubator/trafficserver/site/trunk/docs/admin/trouble.htm
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/admin/trouble.htm?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/admin/trouble.htm (added)
+++ incubator/trafficserver/site/trunk/docs/admin/trouble.htm Thu Oct 29 23:23:25 2009
@@ -0,0 +1,784 @@
+<html>
+<head>
+<title>FAQs and Troubleshooting Tips</title>
+<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+<link rel="stylesheet" href="doc.css" type="text/css" media="all" /></head>
+<body>
+<h1>
+<a name="48024">Appendix G - FAQs and Troubleshooting Tips</a></H1>
+<p>
+This appendix contains the following sections:</p>
+<ul>
+<li><a href="#0_30488"><em>Frequently Asked Questions</em></a></li>
+<li><a href="#0_96161"><em>Troubleshooting Tips</em></a></li>
+</ul>
+
+<h2>
+<a name="0_30488"></a>Frequently Asked Questions</h2>
+<p>
+The following table lists the frequently asked questions (FAQs) discussed in this section.</p>
+<table border="1">
+<tr>
+<th width="1024">
+<p>
+FAQs</p></th>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_41244"><em>How do you create a raw disk for the cache if all your disks have mounted file systems?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_34163"><em>How do disk I/O errors affect the cache and what does Traffic Server do when a cache disk fails?</em></a></p></td>
+</tr>
+<tr>
+  <td>
+  <p>
+  <a href="#0_45613"><em>If a client disconnects during the time that Traffic Server is downloading a large object, is any of the object saved in the cache?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_95054"><em>Can Traffic Server cache Java applets, JavaScript programs, or other application files like VBScript?</em></a></p></td>
+</tr>
+<tr>
+  <td>
+  <p>
+  <a href="#0_37211"><em>How do you apply changes to the <code>logs_xml.config</code> file to all nodes in a cluster?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_21826"><em>In Squid- and Netscape-format log files, what do the cache result codes mean?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_11719"><em>What does the <code>cqtx</code> field record in a custom log file?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_42816"><em>Does Traffic Server refresh entries in its host database after a certain period of time if they haven't been used?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_12274"><em>Can you improve the look of your custom response pages by using images, animated .gifs, and Java applets?</em></a></p></td>
+</tr>
+<tr>
+<td>
+<p>
+<a href="#0_95054"><em>Can Traffic Server run in both forward proxy and reverse proxy mode at the same time?</em></a></p></td>
+</tr>
+</table>
+<h3>
+  <a name="0_41244"></a><em>How do you create a raw disk for the cache if all your disks have mounted file systems?</em></h3>
+<h4>
+  To create a raw disk:</h4>
+
+<ol>
+  <li>
+    As <code>root</code>, enter the following command at the prompt to examine which file systems are mounted on the disk you want to use for the Traffic Server cache: <br />
+      <code>df -k</code>    <br />
+  </li>
+  <li>
+    In a text editor, open the <code>
+    /etc/fstab</code>
+  file and comment out/delete the file system entries for the disk.</li>
+  <li>
+  Save and close the <code>fstab</code> file.</li>
+  <li>
+    Enter the following command for each file system you want to unmount:<br />
+    <code>umount <i>file_system</i></code>
+  <br />
+    where <code><i> file_system</i></code> is a file system you want to unmount. <p></p>
+  </li><li>
+    Install Traffic Server. When the installation script prompts you for a cache disk, select the raw disk you just created.</li>
+</OL>
+<em>
+<h3>
+<a name="0_34163"></a>How do disk I/O errors affect the cache and what does Traffic Server do when a cache disk fails?</h3>
+</em>
+<p>If a disk drive fails five successive I/O operations, then Traffic Server considers the drive inaccessible and removes the whole disk from the cache. Normal cache operations continue for all other Traffic Server disk drives.<em>
+</em></p>
+<em>
+</em><em><h3>
+<a name="0_45613"></a>If a client disconnects during the time that Traffic Server is downloading a large object, is any of the object saved in the cache?</h3>
+</em>
+<p>When a client disconnects during an HTTP operation, Traffic Server continues to download the object from the origin server for up to 10 seconds. If the transfer from the origin server completes successfully within 10 seconds after the client disconnect, then Traffic Server stores the object in the cache. If the origin server download does <i>not</i> complete successfully within 10 seconds, then Traffic Server disconnects from the origin server and deletes the object from the cache. Traffic Server does not store partial documents in the cache.</p>
+<em>
+<h3>
+<a name="0_95054"></a>Can Traffic Server cache Java applets, JavaScript programs, or other application files like VBScript?</h3>
+</em>
+<p>Yes, Traffic Server can store and serve Java applets, JavaScript programs, VBScripts, and other executable objects from its cache according to the freshness and cacheability rules for HTTP objects.  
+<br />
+Traffic Server does not execute the applets, scripts, or programs; these objects run only when the client system that sent the request loads them.<em>
+</em><em>
+</em></p>
+<em>
+<h3>
+<a name="0_37211"></a>How do you apply changes to the <code>logs_xml.config</code> file to all nodes in a cluster?</h3>
+</em>
+<p>  After you modify the <code>
+  logs_xml.config</code>
+  file on one Traffic Server node, enter the following command from the Traffic Server <code>
+  bin</code>
+directory:<br /><code> traffic_line -x</code>
+
+<br /><br />
+Traffic Server applies the changes to all nodes in the cluster. The changes take effect immediately.<em></em></p>
+<em><h3>
+<a name="0_21826"></a>In Squid- and Netscape-format log files, what do the cache result codes mean?</h3>
+</em>
+<p>The following table describes the cache result codes in  Squid and Netscape log files.</p>
+<em>
+<table border="1">
+  <tr>
+  <th>
+  <p>
+    Cache Result Code</p>
+  </th>
+  <th>
+  <p>
+    Description</p>
+  </th>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_HIT </code></p>
+  </td>
+  <td>
+  <p>
+    A valid copy of the requested object was in the cache and  Traffic Server sent the object to the client. </p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_MISS</code></p>
+  </td>
+  <td>
+  <p>
+    The requested object was not in the cache, so   Traffic Server retrieved the object from the origin server or a parent proxy and sent it to the client.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_REFRESH_HIT </code></p>
+  </td>
+  <td>
+  <p>
+    The object was in the cache but was stale. Traffic Server made an <code>
+      if-modified-since</code>
+    request to the origin server and the origin server sent a <code>
+      304 not-modified</code>
+    response. Traffic Server sent the cached object to the client.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_REF_FAIL_HIT</code></p>
+  </td>
+  <td>
+  <p>
+    The object was in the cache but was stale. Traffic Server made an <code>
+      if-modified-since</code>
+    request to the origin server but the server did not respond; Traffic Server sent the cached object to the client.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_REFRESH_MISS</code></p>
+  </td>
+  <td>
+  <p>
+    The object was in the cache but was stale. Traffic Server made an <code>
+      if-modified-since</code>
+    request to the origin server and the server returned a new object; Traffic Server served the new object to the client.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_CLIENT_REFRESH</code></p>
+  </td>
+  <td>
+  <p>
+    The client issued a request with a no-cache header. Traffic Server obtained the requested object from the origin server and sent a copy to the client. Traffic Server deletes any previous copy of the object from the cache.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_IMS_HIT </code></p>
+  </td>
+  <td>
+  <p>
+    The client issued an <code>
+      if-modified-since</code>
+    request and the object was in the cache and fresher than the IMS date, <b>or</b> an <code>
+      if-modified-since</code>
+    request to the origin server found that the cache object was fresh. Traffic Server served the cached object to the client.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_IMS_MISS</code></p>
+  </td>
+  <td>
+  <p>
+    The client issued an <code>
+      if-modified-since</code>
+    request and the object was either not in cache or was stale in cache. Traffic Server sent an <code>
+      if-modified-since</code>
+    request to the origin server and received the new object. Traffic Server sent the updated object to the client.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    TCP_SWAPFAIL </code></p>
+  </td>
+  <td>
+  <p>
+    The object was in the cache but could not be accessed. The client did not receive the object.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_CLIENT_ABORT </code></p>
+  </td>
+  <td>
+  <p>
+    The client disconnected before the complete object was sent.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_CONNECT_FAIL</code></p>
+  </td>
+  <td>
+  <p>
+    Traffic Server could not reach the origin server.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_DNS_FAIL</code></p>
+  </td>
+  <td>
+  <p>
+    The Domain Name Server could not resolve the origin server name, or  no Domain Name Server could be reached.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_INVALID_REQ </code></p>
+  </td>
+  <td>
+  <p>
+    The client HTTP request was invalid. Traffic Server forwards requests with unknown methods to the origin server. </p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_READ_TIMEOUT</code></p>
+  </td>
+  <td>
+  <p>
+    The origin server did not respond to the Traffic Server request within the timeout interval.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_PROXY_DENIED</code></p>
+  </td>
+  <td>
+  <p>
+    Client service was denied.</p>
+  </td>
+  </tr>
+  <tr>
+  <td>
+  <p><code>
+    ERR_UNKNOWN</code></p>
+  </td>
+  <td>
+  <p>
+    The client connected but subsequently disconnected without sending a request.</p>
+  </td>
+  </tr>
+</table>
+<h3>
+<a name="0_11719"></a>What is recorded by the <code>cqtx</code> field in a custom log file?</h3>
+</em>
+<p>In forward proxy mode, the <code>
+  cqtx</code>
+  field records the complete client request in the log file: for example, <code>
+  GET http://www.company.com HTTP/1.0</code>
+  . In reverse proxy mode, the <code>
+  cqtx</code>
+  field records the hostname or IP address of the origin server because Traffic Server first remaps the request  as per map rules in the <code>
+  remap.config</code>
+file.</p>
+<em>
+<h3>
+<a name="0_42816"></a>Does Traffic Server refresh entries in its host database after a certain period of time if they have not been used?</h3>
+</em>
+<p>By default, the Traffic Server host database observes the time-to-live (<code>ttl</code>) values set by name servers. You can reconfigure Traffic Server to ignore the <code>ttl</code> set by name servers and use a specific Traffic Server setting instead. Alternatively, you can configure Traffic Server to compare the <code>ttl</code> value set by the name server with the <code>ttl</code> value set by Traffic Server, and then use either the lower or the higher value. </p>
+
+<h4>To adjust the host database settings:</h4>
+
+<ol>
+  
+  <li>In a text editor, open the <code>
+    records.config</code>
+    file located in the Traffic Server <code>
+    config</code>
+  directory. </li>
+  <li>
+    Set the value of the variable <code>
+    proxy.config.hostdb.ttl_mode</code>
+  to:</li>
+  
+  <ul>
+    <li><code>
+      0</code>
+    to obey the <code>ttl</code> values set by the name servers.</li>
+    <li><code>
+      1</code> to ignore the <code>ttl</code> values set by name servers and use the value set by the Traffic Server configuration variable <code>
+    proxy.config.hostdb.timeout</code> . Make sure you set this variable to a value appropriate for your needs.</li>
+    <li><code>
+    2</code> to use the lower of the two values (the one set by the name server or the one set by Traffic Server).</li>
+    <li><code>
+    3</code> to use the higher of the two values (the one set by the name server or the one set by Traffic Server).</li>
+  </ul>
+  
+  <li>
+    Save and close the <code>
+    records.config</code>
+    file.
+    <br />
+      From the Traffic Server <code>
+      bin</code>
+      directory, run the command <code>
+      traffic_line -x </code>
+    to apply the configuration changes.
+  </li>
+</ol>
+<em>
+<h3>
+<a name="0_12274"></a>Can you improve the look of your custom response pages by using images, animated .gifs, and Java applets?</h3>
+</em>
+<p>No, because Traffic Server can only respond to clients with a single text or HTML document. As a workaround, however, you can provide references on your custom response pages to images, animated .gifs, Java applets, or objects other than text that are located on a web server.  Add links in the <code>
+  body_factory</code>
+template files in the same way you do for any image in an HTML document, with the full URL in the <code>SRC</code> attribute.</p>
+<em>
+<h3>
+<a name="0_84580"></a>Can Traffic Server run in both forward proxy and reverse proxy mode at the same time?</h3>
+</em>
+<p>
+  Yes. When you enable reverse proxy mode, Traffic Server remaps incoming requests according to the map rules in the <code>
+  remap.config</code>
+  file. All other requests that do not match a map rule are simply served in forward proxy mode. <br />
+  If you want to run in reverse proxy 
+  only 
+  mode (where Traffic Server does <i>not</i> serve requests that fail to match a map rule), then you must set the configuration variable <code>
+  <i>proxy.config.url_remap.remap_required</i></code>
+  to 1 in the <code>
+  records.config</code>
+file. </p>
+<h2>
+  
+<em><a name="0_96161"></a></em>Troubleshooting Tips</h2>
+<p>
+The following table lists the troubleshooting tips discussed in this section.</p>
+<em>
+<table border="1">
+  <tr>
+  <th width="1076">
+  <p>
+    Troubleshooting Tip</p></th>
+  </tr>
+  <tr>
+    <td>
+      <p>
+    <a href="#0_22364"><em>The throughput statistic is inaccurate   </em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_48340"><em>You are unable to execute Traffic Line commands</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_42829"><em>You observe inconsistent behavior when one node obtains an object from another node in the cluster</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_29076"><em>Web browsers might display an error document with a data missing message</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_45366"><em>Traffic Server does not resolve any websites</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_13841"><em>Maximum document size exceeded message in the system log file</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_76993"><em>DrainIncomingChannel message in the system log file</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_73746"><em>No cop file message in the system log file</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_67754"><em>Warning in system log file when manually editing vaddrs.config</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_57248"><em>Nontransparent requests fail after enabling always_query_destination</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_47006"><em>Traffic Server is running but no log files are created</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_82182"><em>Traffic Server shows an error indicating too many network connections</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_93012"><em>Low memory symptoms</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_56862"><em>Connection timeouts with the origin server</em></a></p></td>
+  </tr>
+  <tr>
+  <td>
+  <p>
+  <a href="#0_13091"><em>IBM Web servers do not work with Traffic Server</em></a></p></td>
+  </tr>
+</table>
+<h3>&nbsp;</h3>
+</em>
+<em>
+<h3>
+<a name="0_22364"></a>The throughput statistic is inaccurate</h3>
+</em>
+<p>Traffic Server updates the throughput statistic after it has transferred an entire object. For larger files, the byte count increases sharply at the end of a transfer. The complete number of bytes transferred is attributed to the last 10-second interval, although it can take several minutes to transfer the object.  This inaccuracy is more noticeable with a light load. A heavier load yields a more accurate statistic.</p>
+<em>
+<h3>
+<a name="0_48340"></a>You are unable to execute Traffic Line commands</h3>
+</em>
+<p>
+Traffic Line commands do not execute under the following conditions:</p>
+<ul>
+  
+  <li><b>When  the <code>traffic_manager</code> process is not running</b><br />
+      Check to see if the <code>traffic_manager</code>
+    process is running by entering the following command:
+    <br />
+    <code>    ps aux | grep traffic_manager  </code><br />
+    <br />
+  
+    If the <code>traffic_manager</code>
+    process is not running, then enter the following command from the Traffic Server <code>bin</code>
+    directory to start it:<br />
+    <code>./traffic_manager</code> <br />
+    You should always start and stop Traffic Server with the <code>start_traffic_server </code>and <code>stop_traffic_server</code>
+    commands to ensure that all the processes start and stop correctly; refer to <a href="getstart.htm">Getting Started</a>.
+  </li><br />
+  <li><b>When you are not executing the command from <code>$TSHome/bin</code></b> <br />
+    If the Traffic Server <code>bin</code> directory is not in your path, then prepend the Traffic Line commands with <code>./</code> (for example, <code>./traffic_line -h</code>).
+  </li>
+  <br />
+  <li><b>
+    When multiple Traffic Server installations are present and you are not executing the Traffic Line command from the active Traffic Server path specified in <code>/etc/traffic_server</code></b><code></code><br />
+    Always change to the correct directory by issuing the command:<br />
+    <code>cd `cat /etc/traffic_server`/bin</code> <br />
+  </li>
+</ul>
+<em>
+<h3>
+<a name="0_42829"></a>You observe inconsistent behavior when one node obtains an object from another node in the cluster</h3>
+</em>
+<p>As part of the initial system preparation process, you must synchronize the clocks on all the nodes in your cluster. Minor time differences cause no problems, but differences of more than a few minutes can affect Traffic Server operation.  </p>
+<p>
+  You should run a clock synchronization daemon such as <code>
+  xntpd</code>
+  . You can obtain the latest version of <code>
+  xntpd</code>
+from the following URL:<br />
+<code>http://www.eecis.udel.edu/&#126;ntp/</code><br />
+</p><em>
+<h3>
+<a name="0_29076"></a>Web browsers might display an error document with a data missing message</h3>
+</em>
+A message similar to the following displays in web browsers:
+<blockquote><code>
+  Data Missing</code>  <br />
+    <code>
+This document resulted from a POST operation and has expired from the cache. If you wish you can repost the form data to re-create the document by pressing the reload button.</code></blockquote>
+<p>
+  This is a Web browser issue and not a problem with Traffic Server. Because Web browsers maintain a separate local cache in memory and/or disk on the client system, messages about documents that have expired from cache refer to the browser's local cache and
+  not
+to the Traffic Server cache. There is no Traffic Server message or condition that can cause such messages to appear in a web browser. </p>
+<em>
+<h3>
+<a name="0_45366"></a>Traffic Server does not resolve any websites </h3>
+</em>
+<p>The browser indicates that it is contacting the host and then times out with the following message:  </p>
+<blockquote>
+  <p>
+    <code>
+    The document contains no data; Try again later, or contact the server's Administrator....</code>
+  </p>
+</blockquote>
+<p>
+Make sure  the system is configured correctly and that Traffic Server can read the name resolution file: </p>
+<ul>
+  <li>Check if the server can resolve DNS lookups by issuing the <code>
+    nslookup</code> command. For example, <code>nslookup  www.myhost.com</code>
+  </li>
+  <li>
+  Check if the <code>/etc/resolv.conf</code> file contains the valid IP address of your DNS server(s).</li>
+  <li>
+  On some systems, if the <code>/etc/resolv.conf</code> file is unreadable or has no name server entry, then the operating system  uses <code>localhost</code> as a name server.  Traffic Server, however, does not use this convention. If you want to use <code>localhost</code> as a name server, then you must add a name server entry for <code>127.0.0.1</code> or <code>0.0.0.0</code> in the <code>/etc/resolv.conf</code> file. </li>
+  <li>
+    Check that the Traffic Server user account has permission to read the <code>
+  /etc/resolv.conf</code> file. If it does not, then change the file permissions to <code>rw-r--r--</code> (<code>644</code>)</li>
+</ul>
+<em>
+<h3>
+<a name="0_13841"></a>Maximum document size exceeded message in the system log file</h3>
+</em>
+<p>The following message appears in the system log file:  </p>
+<blockquote>
+  <p>
+    <code>
+    WARNING: Maximum document size exceeded</code>
+  </p>
+</blockquote>
+<p>
+A requested object was larger than the maximum size allowed in the Traffic Server cache, so Traffic Server provided proxy service for the oversized object but did not cache it. To set the object size limit for the cache, modify the <code>
+  <i>proxy.config.cache.limits.http.max_doc_size</i></code>
+  variable in the <code>
+  records.config</code>
+file. If you do not want to limit the size of objects in the cache, then set the document size to<code> <b>0</b></code>(zero).</p>
+<em>
+<h3>
+<a name="0_76993"></a>DrainIncomingChannel message in the system log file </h3>
+</em>
+<p>The following messages appear in the system log file:  </p>
+<blockquote>
+  <p>
+    <code>Feb 20 23:53:40 louis traffic_manager[4414]: ERROR ==&gt;</code>
+  </p>
+  <p>
+    <code>[drainIncomingChannel] Unknown message: 'GET http://www.telechamada.pt/</code>
+  </p>
+  <p>
+    <code>HTTP/1.0'</code></p>
+  <p>
+    <code>Feb 20 23:53:46 louis last message repeated 1 time</code></p>
+  <p>
+    <code>Feb 20 23:53:58 louis traffic_manager[4414]: ERROR ==&gt;</code>
+  </p>
+  <p>
+    <code>[drainIncomingChannel] Unknown message: 'GET http://www.ip.pt/ HTTP/1.0'</code>
+  </p>
+</blockquote>
+<p>
+These error messages indicate that a browser is sending HTTP requests to one of the Traffic Server cluster ports - either <code>rsport</code> (default port 8088) or <code>mcport</code> (default port 8089). Traffic Server discards the request; this error does not cause any Traffic Server problems. The misconfigured browser must be reconfigured to use the correct proxy port. Traffic Server clusters work best when configured to use a separate network interface and cluster on a private subnet, so that client machines have no access to the cluster ports. </p>
+<em>
+<h3>
+<a name="0_73746"></a>No cop file message in the system log file</h3>
+</em>
+<p>The following message appears repeatedly in the system log file:  </p>
+<blockquote>
+  <p>
+    <code>traffic_cop[16056]: encountered &quot;config/internal/no_cop&quot; file...exiting</code>
+  </p>
+</blockquote>
+<p>
+  The file <code>config/internal/no_cop</code> acts as an administrative control that instructs the <code>traffic_cop</code> process to exit immediately without starting <code>traffic_manager</code> or performing any health checks. The <code>no_cop</code> file prevents Traffic Server from starting automatically when it has been stopped with the <code>stop_traffic_server</code> command. Without such a static control, Traffic Server would restart automatically upon system reboot. The <code>no_cop</code> control keeps Traffic Server off until it is explicitly restarted with the <code>
+start_traffic_server </code>command.</p>
+<p>
+  The Traffic Server installation script also creates a <code>
+  no_cop</code>
+  file so that Traffic Server does not start automatically. After you have completed installation and configuration, and have rebooted the operating system, use the <code>
+  start_traffic_server</code>
+command to start Traffic Server.</p>
+<em>
+<h3>
+<a name="0_67754"></a>Warning in system log file when manually editing <code>vaddrs.config </code></h3>
+</em>
+<p>  If you manually edit the <code>
+  vaddrs.config</code>
+file as a nonroot user, then Traffic Server issues a warning message in the system log file similar to the following:</p>
+<blockquote>
+  <p>
+    <code>
+    WARNING: interface is ignored: Operation not permitted</code>
+  </p>
+</blockquote>
+<p>
+You can safely ignore this message; Traffic Server <u>does</u> apply your configuration edits. </p>
+<em>
+<h3>
+<a name="0_57248"></a>Nontransparent requests fail after enabling <code>always_query_destination</code></h3>
+</em>
+<p>  The variable <code>
+  <i>proxy.config.arm.always_query_dest</i></code>
+  in the <code>
+  records.config</code>
+file configures Traffic Server in transparent mode to ignore host headers and always ask for the IP address of the origin server. When you enable this variable, Traffic Server obtains the origin server IP address from the existing NAT map list rather than trying to resolve the destination hostname with a DNS lookup. As a result, logged URLs contain only IP addresses and no hostnames. However, explicit requests (nontransparent requests, including requests on port 80) fail, as there is no matching map in the NAT list. The <code><i>always_query_destination</i></code> option works only on the primary proxy port.</p>
+<em>
+<h3>
+<a name="0_47006"></a>Traffic Server is running but no log files are created</h3>
+</em>
+<p>Traffic Server only writes event log files when there is information to record. If Traffic Server is idle, then it's possible/probable that no log files exist. In addition:
+</p>
+<li>Ensure that you are looking in the correct directory. By default, Traffic Server creates log files in its <code>
+  logs</code>
+  directory.</li> 
+<li>Check the location of the log files by checking the value of the variable <code>
+  <i>proxy.config.log2.logfile_dir</i></code>  in the <code>
+  records.config</code>
+file. </li><li>Check that the log directory has read/write permissions for the Traffic Server user account. If the log directory does not have the correct permissions, then the <code>
+  traffic_server</code>
+process is unable to open or create log files.</li>
+<li>Check that logging is enabledby checking the value of the variable <code>
+  <i>proxy.config.log2.logging_enabled</i></code>
+  in the <code>
+  records.config</code>
+file. </li>
+<li>Check that a log format is enabled. In the <code>
+  records.config</code>
+  file,  select the standard  or  custom format by editing variables in the <code>
+  Logging Config</code>
+  section.</li>
+<em>
+<h3>
+<a name="0_82182"></a>Traffic Server shows an error indicating too many network connections</h3>
+</em>
+<p>
+By default, Traffic Server supports 8000 network connections: half of this number is allocated for client connections and half for origin server connections. A connection throttle event occurs when client or origin server connections reach 90% of half the configured limit (3600 by default). When a connection throttle event occurs, Traffic Server continues processing all existing connections but will not accept new client connection requests until the connection count falls below the limit. </p>
+<p>
+Connection throttle events can occur under the following conditions:</p>
+<ul>
+  <li>
+  If there is a connection spike (if thousands of client requests all reach the Traffic Server at the same time). Such events are typically transient and require no corrective action.</li>
+  <li>
+  If there is a service overload (if client requests continuously arrive faster than Traffic Server can service them). Service overloads often indicate network problems between Traffic Server and origin servers or indicate that Traffic Server needs more memory, CPU, cache disks, or other resources to handle the client load.</li>
+</ul>
+<p>
+  If necessary, you can reset the maximum number of connections supported by Traffic Server by editing the value of the configuration variable <code><i>proxy.config.net.connections_throttle</i></code> in the <code>
+records.config</code> file. Do not increase the connection throttle limit unless the system has adequate memory to handle the client connections required. A system with limited RAM might need a throttle limit lower than the default value. Do not set this variable below the minimum value of 100.</p>
+<em>
+<h3>
+<a name="0_93012"></a>Low memory symptoms</h3>
+</em>
+<p>Under heavy load, the Linux kernel can run out of RAM. The low memory condition can cause slow performance and a variety of system problems. RAM exhaustion can occur even if the system has plenty of free swap space.  </p>
+<p>
+  Symptoms of extreme memory exhaustion include the following messages in the system log files (<code>
+  /var/log/messages</code>
+):</p>
+<blockquote>
+  <p>
+    <code>WARNING: errno 105 is ENOBUFS (low on kernel memory), consider a memory upgrade</code>
+  </p>
+  <p>
+    <code>kernel: eth0: can't fill rx buffer (force 0)!</code>
+  </p>
+  <p>
+    <code>kernel: recvmsg bug: copied E01BA916 seq E01BAB22</code>
+  </p>
+</blockquote>
+<p>
+To avoid memory exhaustion, add more RAM to the system or reduce the load on Traffic Server.</p>
+<em>
+<h3>
+<a name="0_56862"></a>Connection timeouts with the origin server</h3>
+</em>
+<p>Certain origin servers take longer than 30 seconds to post HTTP requests, which results in connection timeouts with Traffic Server. To prevent such connection timeouts, you must change the value of the configuration variable <code>
+  <i>proxy.config.http.connect_attempts_timeout</i></code>
+  in the<code>
+  records.config</code>
+file to 60 seconds or more.</p>
+<em>
+<h3>
+<a name="0_13091"></a>IBM Web servers do not work with Traffic Server</h3>
+</em>
+<p>
+IBM web servers do not support the TLS (Transport Layer Security) protocol. For IBM web servers to work with Traffic Server, you must edit a configuration variable. </p>
+
+<h4>To configure Traffic Server to work with IBM web servers:</h4>
+<ol>
+  <li>
+  In a text editor, open the <code>records.config</code> file located in the Traffic Server <code>config</code> directory.</li>
+  <li> Edit the following configuration variable: <br />
+    <table border="1">
+      <tr>
+        <th>
+          <p>
+          Variable</p>
+        </th>
+        <th>
+          <p>
+          Description</p>
+        </th>
+      </tr>
+      <tr>
+        <td>
+          <p><i>
+          <code>proxy.config.ssl.TLSv1</code></i></p>
+        </td>
+        <td>
+          <p> Set this variable to 0 (zero).</p>
+        </td>
+      </tr>
+    </table>
+  </li><li> Save and close the <code>
+    records.config</code>
+    file.</li>
+  <li>
+    Navigate to the Traffic Server <code>bin</code> directory.  </li>
+  <li>
+    Run the command <code>
+    traffic_line -x </code>
+  to apply the configuration changes.<em>  </em>  </li>
+</ol>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/admin/trouble.htm
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/trafficserver/site/trunk/docs/sdk/ASimplePlugin.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/ASimplePlugin.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/ASimplePlugin.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/ASimplePlugin.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,156 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>A Simple Plugin</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="prev" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="next" href="Updatingplugin.configFile.html" title="Update the plugin.config File">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="ASimplePlugin.html#CompilingYourPlugin" title="Compile Your Plugin">
+<link rel="subsection" href="Updatingplugin.configFile.html" title="Update the plugin.config File">
+<link rel="subsection" href="SpecifyingPluginLocation.html" title="Specify the Plugin’s Location">
+<link rel="subsection" href="RestartingTS.html" title="Restart Traffic Server">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="GetingStarted.html">Prev</a> — Chapter 1. Getting Started</div>
+<div class="navnext">Update the <code class="filename">plugin.config</code> File — <a accesskey="n" href="Updatingplugin.configFile.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="ASimplePlugin"></a>A Simple Plugin</h2></div></div></div>
+<p>This section describes how to write, compile, configure, and run a
+      simple Traffic Server plugin. You’ll follow the steps below:<a class="indexterm" name="id306889"></a></p>
+<div class="orderedlist"><ol type="1">
+<li><p>Make sure that your plugin source code contains an
+          <code class="function">INKPluginInit</code> initialization function.</p></li>
+<li><p>Compile your plugin source code, creating a shared
+          library.</p></li>
+<li><p>Add an entry to the <code class="filename">plugin.config</code> file
+          for your plugin.</p></li>
+<li><p>Add the path to your plugin shared library to the
+          <code class="filename">records.config</code> file.</p></li>
+<li><p>Restart Traffic Server.</p></li>
+</ol></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CompilingYourPlugin"></a>Compile Your Plugin<a class="indexterm" name="id307031"></a></h3></div></div></div>
+<p>The process you use to compile a shared library will vary from
+        platform to platform, so the Traffic Server API includes makefile
+        templates you can use to create shared libraries on all the supported
+        Traffic Server platforms.</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="Compiling_Unix"></a>Unix Example<a class="indexterm" name="id307049"></a></h4></div></div></div>
+<p>:Assuming the sample program is stored in the file
+          <code class="filename">hello-world.c</code>, you could use the following
+          commands to building a shared library on Solaris using the GNU C
+          compiler.</p>
+<pre class="programlisting">gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
+gcc -g -Wall -shared -o hello-world.so hello-world.o</pre>
+<p>The first command compiles <code class="filename">hello-world.c</code>
+          as Position Independent Code (PIC) and the second command links the
+          single <code class="filename">hello-world.o</code> object file into the
+          <code class="filename">hello-world.so</code> shared library.</p>
+<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/docbook/caution.png"></td>
+<th align="left">Caution</th>
+</tr>
+<tr><td align="left" valign="top"><p>Make sure that your plugin is not statically linked with
+            system libraries.</p></td></tr>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="Compiling_HPUX"></a>HPUX Example<a class="indexterm" name="id307107"></a></h4></div></div></div>
+<p>Assuming the sample program is stored in the file
+          <code class="filename">hello_world.c</code>, you could use the following
+          commands to build a shared library on HPUX:</p>
+<pre class="programlisting">cc +z -o hello_world.o -c hello_world.c
+ld -b -o hello_world.so hello_world.o</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="Compiling_Windows"></a>Compiling for Windows NT<a class="indexterm" name="id307138"></a></h4></div></div></div>
+<p>Your PC must have the following software installed:<a class="indexterm" name="id307153"></a></p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Windows NT 4.0 SP4</p></li>
+<li><p>Microsoft Developer Studio 6.0</p></li>
+</ul></div>
+<h5>
+<a name="id307177"></a>To compile a plugin for the Windows NT version of
+          Traffic Server:</h5>
+<div class="orderedlist"><ol type="1">
+<li><p>Open <code class="filename">PlugIn.dsw</code> with Microsoft Visual
+              C++ (MSVC++). The <code class="filename">dsw</code> file should be
+              included in the SDK CD. Inside VC++, the sample plugins are
+              listed as separate projects.</p></li>
+<li>
+<p>For each of the projects that need to be built, you need
+              to tell VC++ where it can find the Traffic Server library:
+              <code class="code">traffic_server.lib</code>. This library is in your NT
+              Traffic Server distribution.</p>
+<p>You might need to update the library lookup path. Use the
+              following procedure:</p>
+</li>
+</ol></div>
+<h5>
+<a name="id307219"></a>To update the library lookup path:</h5>
+<div class="orderedlist"><ol type="1">
+<li><p>Right-mouse-click on a project.</p></li>
+<li><p>Select the <span class="guilabel">Settings...</span> option.</p></li>
+<li><p>Click the <span class="guilabel">Link</span> tab on the dialog
+              box.</p></li>
+<li><p>Select <span class="guilabel">Input</span> in the combo-box.</p></li>
+<li><p>Enter the library path in the <span class="guilabel">Additional library
+              path: text</span> field. Now you can build your
+              plugin.</p></li>
+</ol></div>
+</div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/ASimplePlugin.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/AccessPluginFiles.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/AccessPluginFiles.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/AccessPluginFiles.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/AccessPluginFiles.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,126 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Accessing Installed Plugin Files</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="prev" href="ReadTESettingStats.html" title="Reading Traffic Server Settings and Statistics">
+<link rel="next" href="LicensingPlugin.html" title="Licensing Your Plugin">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="ReadTESettingStats.html">Prev</a> — Reading Traffic Server Settings and Statistics</div>
+<div class="navnext">Licensing Your Plugin — <a accesskey="n" href="LicensingPlugin.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="AccessPluginFiles"></a>Accessing Installed Plugin Files</h2></div></div></div>
+<p>Your plugin might rely on files in addition to its source code,
+      such as configuration files. When you upgrade Traffic Server, you might
+      need to make sure your plugin is always able to find its associated
+      files. The mechanism for preserving relative file locations with
+      upgrades is the following:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Make sure all plugins are contained in their own directories
+          within the plugin directory.</p></li>
+<li><p>The plugin directory path is specified in the Traffic Server
+          <code class="filename">records.config</code> file variable
+          <code class="varname">proxy.config.plugin.plugin_dir</code>. This path is
+          relative to the Traffic Server install directory. The default value
+          is <code class="filename">config/plugin</code>.</p></li>
+<li><p>Make sure all plugins are listed in the
+          <code class="filename">plugin.db</code> file. For each plugin, this file
+          contains the plugin name, object file, license key, file name(s),
+          and directory relative to the plugin directory.</p></li>
+<li><p>When Traffic Server is upgraded, the Traffic Server
+          installation program looks at the <code class="filename">plugin.db</code>
+          file to see which plugins to copy over to the new Traffic Server
+          installation, and what the appropriate object files, license keys,
+          additional files, and directories should be.</p></li>
+</ul></div>
+<p>The format of the <code class="filename">plugin.db</code> file is as
+      follows:</p>
+<pre class="programlisting">[name of your plugin]
+Object=[name of plugin’s shared object file
+License=[license key]
+Dir=[name of any directories to be copied over] </pre>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Entries in plugin.db are case-sensitive.</p></li>
+<li>
+<p>Do not include white spaces in your entries. For example, the
+          following line is incorrect:</p>
+<pre class="programlisting">Object = plugin.so</pre>
+<p>The correct entry would be:</p>
+<pre class="programlisting">Object=plugin.so</pre>
+</li>
+</ul></div>
+<p>For example, suppose that you have a blacklist plugin in the
+      plugin directory. Its object file is <code class="filename">Blacklist.so</code>
+      and it has some user interface files (images and HTML files) in the
+      <code class="filename">Blacklist/ui</code> directory. To make sure that the
+      blacklist plugin is upgraded properly, <code class="filename">plugin.db</code>
+      needs the following entry:</p>
+<pre class="programlisting">[Blacklist plugin]
+Object=Blacklist.so
+License=ABCD0123456789
+Dir=Blacklist/ui</pre>
+<p>In this example, if all of the necessary files and directories are
+      in the Blacklist directory, you could simply specify
+      <code class="code">Dir=Blacklist</code>.</p>
+<p>This means that the Blacklist image and HTML files are always
+      located in:</p>
+<p><code class="varname">&lt;Traffic Server install
+      directory&gt;</code><code class="varname">/&lt;plugin
+      directory&gt;</code><code class="filename">/Blacklist/ui</code></p>
+<p>Your plugin might need to specify the absolute location of its
+      associated files. The following functions provide the Traffic Server
+      install directory path and plugin directory path:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="CustInstallLicenseFunctions.html#INKInstallDirGet" title="INKInstallDirGet"><code class="code">INKInstallDirGet</code></a></p></li>
+<li><p><a href="INKPluginDirGet.html" title="INKPluginDirGet"><code class="code">INKPluginDirGet</code></a></p></li>
+</ul></div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/AccessPluginFiles.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/AccessingTransactionProc.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/AccessingTransactionProc.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/AccessingTransactionProc.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/AccessingTransactionProc.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,97 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Accessing the Transaction Being Processed</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="BlacklistPlugin.html" title="The Blacklist Plugin">
+<link rel="prev" href="SettingUpUIUpdateCallbacks.html" title="Setting Up UI Update Callbacks">
+<link rel="next" href="SettingUpTransacHook.html" title="Setting Up a Transaction Hook">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="SettingUpUIUpdateCallbacks.html">Prev</a> — Setting Up UI Update Callbacks</div>
+<div class="navnext">Setting Up a Transaction Hook — <a accesskey="n" href="SettingUpTransacHook.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="AccessingTransactionProc"></a>Accessing the Transaction Being Processed<a class="indexterm" name="id373366"></a></h3></div></div></div>
+<p>A continuation’s handler function is of type
+        <code class="function">INKEventFunc</code><a class="indexterm" name="id373381"></a>, and the prototype is as follows:<a class="indexterm" name="id373390"></a></p>
+<pre class="programlisting">static int function_name (INKCont contp, INKEvent event, void *edata)</pre>
+<p>In general, the return value of the handler function is not
+        used. The continuation argument is the continuation being called back,
+        the event is the event being sent to the continuation, and the data
+        pointed to by void *edata depends on the type of event. The data types
+        for each event type are listed in <a href="WritingHandlerFunctions.html" title="Writing Handler Functions">“Writing Handler Functions”</a>.</p>
+<p>The key here is that if the event is an HTTP transaction event,
+        then the data passed to the continuation’s handler is of type
+        <code class="code">INKHttpTxn<a class="indexterm" name="id373419"></a></code> (a data type that represents HTTP transactions).
+        Your plugin can then do things with the transaction. Here’s how it
+        looks in the Blacklist plugin’s handler’s code:</p>
+<pre class="programlisting">static int
+blacklist_plugin (INKCont contp, INKEvent event, void *edata)
+{
+     INKHttpTxn txnp = (INKHttpTxn) edata; 
+     switch (event) {
+          case INK_EVENT_HTTP_OS_DNS:
+               handle_dns (txnp, contp);
+               return 0;
+          case INK_EVENT_HTTP_SEND_RESPONSE_HDR:
+               handle_response (txnp);
+               return 0;
+          case INK_EVENT_MGMT_UPDATE:
+               read_blacklist ();
+               return 0;
+          default:
+               break;
+     }
+     return 0;
+}</pre>
+<p>When, for example, the origin server DNS lookup event is sent,
+        blacklist_plugin can call handle_dns and pass txnp as an
+        argument.</p>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/AccessingTransactionProc.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/ActionFunctions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/ActionFunctions.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/ActionFunctions.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/ActionFunctions.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,89 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Action Functions</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="prev" href="INKConfigSet.html" title="INKConfigSet">
+<link rel="next" href="INKActionDone.html" title="INKActionDone">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="ActionFunctions.html#INKActionCancel" title="INKActionCancel">
+<link rel="subsection" href="INKActionDone.html" title="INKActionDone">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKConfigSet.html">Prev</a> — INKConfigSet</div>
+<div class="navnext">INKActionDone — <a accesskey="n" href="INKActionDone.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="ActionFunctions"></a>Action Functions</h2></div></div></div>
+<p></p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKActionCancel"></a>INKActionCancel</h3></div></div></div>
+<p>Cancels an action.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKActionCancel (INKAction
+              <em class="replaceable"><code>actionp</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Cancels an INKAction. If a <code class="code">NULL</code> argument is
+              passed to <code class="function">INKActionCancel</code>, Traffic Server
+              will crash and will not return <code class="code">INK_ERROR</code>. Note that
+              it is the programmer’s responsibility to ensure that a non-null
+              value is passed to <code class="function">INKActionCancel</code>.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the action is successfully
+              cancelled.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/ActionFunctions.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/ActionsGuide.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/ActionsGuide.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/ActionsGuide.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/ActionsGuide.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,223 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Chapter 14. Actions Guide</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="prev" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="next" href="HostsLookupAPI.html" title="Hosts Lookup API">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="section" href="ActionsGuide.html#Actions" title="Actions">
+<link rel="section" href="HostsLookupAPI.html" title="Hosts Lookup API">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="PluginConfigurations.html">Prev</a> — Chapter 13. Plugin Configurations</div>
+<div class="navnext">Hosts Lookup API — <a accesskey="n" href="HostsLookupAPI.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="ActionsGuide"></a>Chapter 14. Actions Guide</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="ActionsGuide.html#Actions">Actions</a></span></dt>
+<dt><span class="section"><a href="HostsLookupAPI.html">Hosts Lookup API</a></span></dt>
+</dl>
+</div>
+<p>This chapter contains:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="ActionsGuide.html#Actions" title="Actions">“Actions”</a></p></li>
+<li><p><a href="HostsLookupAPI.html" title="Hosts Lookup API">“Hosts Lookup API”</a></p></li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="Actions"></a>Actions</h2></div></div></div>
+<p>An action is a handle to an operation initiated by a plugin which
+      has not yet completed. For example, when a plugin connects to a remote
+      server it uses the call <code class="function">INKNetConnect</code> which takes
+      an <code class="function">INKCont</code> as an argument to call back when the
+      connection is established. <code class="function">INKNetConnect</code> might not
+      call the continuation back immediately and will return an
+      <code class="function">INKAction</code> structure which the caller can use to
+      cancel the operation. Cancelling the operation does not necessarily mean
+      that the operation will not occur, but that the continuation passed in
+      to the operation will not be called back. In the above example, the
+      connection might still occur if the action is cancelled, but the
+      continuation that initiated the connection would not be called back when
+      that occurred.</p>
+<p>It is possible that the connection, in the preceding example, will
+      complete and callback the continuation before
+      <code class="function">INKNetConnect</code> returns. If this occurs
+      <code class="function">INKNetConnect</code> will return a special action which
+      will cause <code class="function">INKActionDone</code> to return 1. Basically
+      this is specifying that the operation has already completed. There is no
+      point in trying to cancel the operation. Note that an action will never
+      change from non-completed to completed. When the operation actually
+      succeeds and the continuation is called back it is up to the
+      continuation to zero out its action pointer to indicate to itself that
+      the operation succeeded.</p>
+<p>The asynchronous nature of all operations in Traffic Server
+      necessitates actions. You should notice from the above discussion that
+      once a call to a function like <code class="function">INKNetConnect</code> is
+      made by a continuation and that function returns a valid action
+      (<code class="function">INKActionDone</code> returns 0) then it is not safe for
+      the continuation to do anything else except return from its handler
+      function. It is not safe to modify or examine the continuation’s data
+      since the continuation may have already been destroyed.</p>
+<p>Here is an example of a typical usage of an action:</p>
+<pre class="programlisting">#include “InkAPI.h”
+static int
+handler (INKCont contp, INKEvent event, void *edata)
+{
+   if (event == INK_EVENT_IMMEDIATE) {
+      INKAction actionp = INKNetConnect (contp, 127.0.0.1, 9999);
+      if (!INKActionDone (actionp)) {
+   INKContDataSet (contp, actionp);
+   } else {
+          /* we've already been called back... */
+   return 0;
+   }
+   } else if (event == INK_EVENT_NET_CONNECT) {
+      /* net connection succeeded */
+      INKContDataSet (contp, NULL);
+      return 0;
+   } else if (event == INK_EVENT_NET_CONNECT_FAILED) {
+   /* net connection failed */
+   INKContDataSet (contp, NULL);
+   return 0;
+   } 
+   return 0;
+}
+
+void
+INKPluginInit (int argc, const char *argv[])
+{
+    INKCont contp;
+
+    contp = INKContCreate (handler, INKMutexCreate ());
+
+    /* We don't want to call things out of INKPluginInit
+       directly since it is called before the rest of the
+       system is initialized. We'll simply schedule an event
+       on the continuation to occur as soon as the rest of
+       the system is started up. */
+    INKContSchedule (contp, 0);
+}</pre>
+<p>The preceding example shows a simple plugin which creates a
+      continuation and schedules it to be called immediately. When the
+      plugin’s handler function is called the first time the event will be
+      <code class="code">INK_EVENT_IMMEDIATE</code>. The plugin then tries to open a net
+      connection to port 9999 on localhost (127.0.0.1). I’ve left the IP
+      description in dot notation to make it clearer what is going on. Please
+      note that the above won’t actually compile until the IP address is
+      modified. The action returned from <code class="function">INKNetConnect</code> is
+      examined by the plugin. If the operation has not completed the plugin
+      stores the action in its continuation. Otherwise the plugin knows it has
+      already been called back and there is no reason to store the action
+      pointer.</p>
+<p>A final question might be why would a plugin want to cancel an
+      action. In the above example a valid reason would be to place a time
+      limit on how long it takes to open a connection. The plugin could
+      schedule itself to get called back in 30 seconds and then initiate the
+      net connection. If the time-out expires first then the plugin would
+      cancel the action. The following sample code implements this:</p>
+<pre class="programlisting">#include “InkAPI.h”
+static int
+handler (INKCont contp, INKEvent event, void *edata)
+{
+   switch (event) {
+	case (INK_EVENT_IMMEDIATE):
+      INKContSchedule (contp, 30000);
+      INKAction actionp = INKNetConnect(contp, 127.0.0.1, 9999);
+      if (!INKActionDone (actionp)) {
+         INKContDataSet (contp, actionp);
+      } else {
+         /* we’ve already been called back ... */
+      }
+      break;
+
+   case (INK_EVENT_TIMEOUT):
+      INKAction actionp = INKContDataGet (contp);
+      if (!INKActionDone(actionp)) {
+         INKActionCancel (actionp);
+      }
+      break;
+
+   case (INK_EVENT_NET_CONNECT):
+   /* net connection succeeded */
+      INKContDataSet (contp, NULL);
+      break;
+
+   case (INK_EVENT_NET_CONNECT_FAILED):
+   /* net connection failed */
+      INKContDataSet (contp, NULL);
+      break;
+
+   } 
+   return 0;
+}
+
+void
+INKPluginInit (int argc, const char *argv[])
+{
+    INKCont contp;
+
+    contp = INKContCreate (handler, INKMutexCreate ());
+    /* We don't want to call things out of INKPluginInit
+       directly since it is called before the rest of the
+       system is initialized. We'll simply schedule an event
+       on the continuation to occur as soon as the rest of
+       the system is started up. */
+    INKContSchedule (contp, 0);
+}</pre>
+<p>The action functions are:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="ActionFunctions.html#INKActionCancel" title="INKActionCancel">“INKActionCancel”</a></p></li>
+<li><p><a href="INKActionDone.html" title="INKActionDone">“INKActionDone”</a></p></li>
+</ul></div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/ActionsGuide.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/ActivateContinuations.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/ActivateContinuations.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/ActivateContinuations.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/ActivateContinuations.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,76 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>How to Activate Continuations</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="prev" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="next" href="WritingHandlerFunctions.html" title="Writing Handler Functions">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="Continuations.html">Prev</a> — Chapter 12. Continuations</div>
+<div class="navnext">Writing Handler Functions — <a accesskey="n" href="WritingHandlerFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="ActivateContinuations"></a>How to Activate Continuations</h2></div></div></div>
+<p>Continuations are activated when they receive an event or by
+      <code class="function">INKContSchedule</code>, which schedules a continuation to
+      receive an event. They might receive an event because:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Your plugin calls <code class="function">INKContCall</code></p></li>
+<li><p>The Traffic Server HTTP state machine sends an event
+          corresponding to a particular HTTP hook</p></li>
+<li><p>A Traffic Server IO processor (such as cache processor or net
+          processor) is letting a continuation know that there is (cache or
+          network) data available to read or write. These callbacks are a
+          result of using functions such
+          <code class="function">INKVConnRead</code>/Write, or
+          <code class="function">INKCacheRead/Write</code></p></li>
+</ul></div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/ActivateContinuations.html
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message