November 2007 Archives

Logging Adventures Continued

| | Comments (0) | TrackBacks (0)

Last time, I regaled you with log file locations. This time I'll delve into something a bit more interesting (at least from a technical standpoint). One problem I have seen with our out of the box logging strategy is our inability to really see what is going on with some of the embedded application servers. For instance, which portlets are being hit in Collaboration, how many times, and what is their peak use? How often does the document repository get hit? What is the usage of the publisher container?

Yes, we have an Analytics product which gives us some insight into these questions, but from the technical perspective this doesn't always seem to be enough, since Analytics is more of a business analysis tool. What if I want to know more granular load and usage statistics? Out of the box, this doesn't seem to be something we provide you on a silver platter.

Ah, but that's why I have a blog, right?

Configuring a Valve for your Embedded Tomcat Instance

I guess the title says it all here. In order to get the granular logging I spoke about above, I set up an AccessLogValve for the embedded tomcat instance I was hosting Collaboration Server on. Remember my previous post about the embedded application server? Turns out that having your own server.xml to monkey with comes in handy here...

Get started logging by:

  1. Following the instructions in my previous post by modifying your wrapper config to use a custom server.xml. In case you're lazy... modify wrapper_base.conf by adding the following lines:

    wrapper.app.parameter.1=com.plumtree.container.Bootstrap
    wrapper.app.parameter.2=3
    wrapper.app.parameter.3=-config
    wrapper.app.parameter.4=%APPLICATION_PATH%/settings/config/newServer.xml
    wrapper.app.parameter.5=start
    wrapper.app.parameter.6=org.apache.catalina.startup.Bootstrap
    wrapper.app.parameter.7=true
    wrapper.app.parameter.8=1
    wrapper.app.parameter.9=stop

  2. You can either pre-generate a server.xml by running the application server (Collab, Document Repository, etc) without modifying wrapper_base.conf first, or you can just copy and modify the below to suit your needs, and save it to newServer.xml.
    <Server port="11929" shutdown="SHUTDOWN" debug="0">
      <Service name="collaboration">
        <Connector port="11930"
                   maxThreads="100" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" redirectPort="11931" acceptCount="500"
                   debug="0" connectionTimeout="2000"
                   disableUploadTimeout="true"
                   useBodyEncodingForURI="true"
                   maxHttpHeaderSize="16384" />
                   
        <!-- Define the top level container in our container hierarchy -->
    
        <Engine name="collaboration" defaultHost="localhost" debug="0">
       
          <Host name="localhost" debug="0" appBase="C:\sandbox\bea\ptcollab\4.2\bin\../webapp"
           unpackWARs="false" autoDeploy="true"
           xmlValidation="false" xmlNamespaceAware="false">
    
            <Logger className="org.apache.catalina.logger.FileLogger"
                     directory="C:\sandbox\bea\ptcollab\4.2\bin\../logs"  prefix="collaboration_log." suffix=".txt"
                timestamp="true"/>
    
          </Host>
        </Engine>
      </Service>
    </Server>
  3. Next, add the valve to your custom server.xml underneath the Engine element and restart the service:
    <Valve className="org.apache.catalina.valves.AccessLogValve"
                               directory="logs"  prefix="collabtest_access_log." suffix=".txt"
                               pattern="common" resolveHosts="false"/> 
  4. You can now use an HTTP log analysis tool, like analog, to gather some extremely detailed stats on your embedded application server.

Unfortunately, there are no free lunches. Here's a few notes you may want to read before doing this:

  • I would recommend you set resolveHosts to false in the AccessLogValve (as recommended by the docs) because of the DNS resolution performance implications.
  • To continue in the performance vein, there could definitely be a performance hit with this component. You will want to: (a) test it before putting it in production, and (b) make sure you log the minimum amount of data necessary.
  • You may also want to watch the amount of threads spawned by enabling the valve. The maxThreads attribute in the Connector element (above, server.xml) might be useful to you in this instance.

Aqualogic Diagnostic URLs

| | Comments (0) | TrackBacks (0)

Ray Gao wrote up an awesome post on dev2dev listing all of the diagnostic URL's for various Aqualogic components. Since I'm afraid it might go away with the pending transition, I'm reposting it here for reference.

Portal Components Verification URLS

Portal: (HTTP- 80 / HTTPS - 443) (portal.war or portal.dll)

http://servername:port#/portal/server.pt

Document repository – 8020 (dr.war & drdiagnostic.war)

http://localhost:8020/drdiagnostics/

Search 6.1 – cluster manager 15300, node 15250 (Search 6.0 – 15244) (queryd.exe)

http://localhost:15300/clusterui/pages/checkpointMgr.jsf

API Server – 11905 (ptapi.war)

http://localhost:11905/ptapi/services/QueryInterfaceAPI

Automation Server – 7777 (automationserver.jar)

<no direct user interface>

Content Upload – 11910 (ptupload.war)

http://localhost:11910/ptupload/services

other URLs

http://localhost/portal/server.pt/PT_HEALTH

http://localhost/portal/server.pt?clearsession=true

http://localhost/portal/server.pt?space=MemoryDebug (With Admin user)

Analytics 2.0 – (11944) (analytics.war, asmmanager.war, configurator.war, securityservice.war)

http://localhost:11944/configurator/ui/start.jsf (Configurator)

Collab 4.2 - (11930) (collab.war)

http://servername:port#/collab/admin/diagnostic

http://exchange-machine/GroupwareService/GroupwareService.asmx (Outlook Intergration)

Notification – 9887 (ptnetutil.dll & ptplatformutil.dll)

Publisher 6.3 - (7087) (ptcs.war & ptwf-server.ear)

http://computer_name:port#/publishedcontent (Default Published Content URL)

http://servername:port#/ptcs/console/index.jsp (diagnostic console)

http://servername:port#/wfconsole (Workflow diagnostics page)

Publisher diagnostics page: http://servername:port#/ptcs/diagnosticTests.jsp

For example, http://dev01.bea.com:7087/ptcs/diagnosticTests.jsp

For example, http://dev01.bea.com:7087/wfconsole

http://servername:port#/ptcs/published_content_redirect.jsp

Studio 2.2 – (11935) (studio.war)

http://servername:port#/studio/gw?m=admin.diagnostics

AD AWS (ActiveDirectoryAWSv2.dll & ActiveDirectoryPWS.dll)

http://remoteserver/adaws/install/index.html

Set the URL for authentication service to:

http://RemoteServer/adaws/AuthProviderSoapBindingRpc.asmx

Set the URL for synchronization to:

http://RemoteServer/adaws/SyncProviderSoapBindingRpc.asmx

Where are the logs?

| | Comments (0) | TrackBacks (0)

One of our consultants in the west region put together a great list of log file locations, similar to Ray Gao's post regarding diagnostic URL's for the various products. It seemed pretty useful, so I thought I'd post it here:

Component Log File
ALUI Portal $PT_HOME/ptlogging/logs/portal/*.spy
Automation $PT_HOME/ptlogging/logs/portal/automationserverwrapper.log
Document Repository $PT_HOME/ptdr/6.1/logs/drLogs.txt
$PT_HOME/ptdr/6.1/logs/wrapper.log
Search $PT_HOME/ptsearchserver/6.1/adminui/logs/wrapper.log
$PT_HOME/ptsearchserver/6.1/[$SearchNode]/logs/logfile-trace-yyyy-mm-dd
$PT_HOME/ptsearchserver/6.1/[$SearchNode]/logs/logfile-event-yyyy-mm-dd
Publisher $PT_HOME/ptcs/6.4/logs/service.log
$PT_HOME/ptcs/6.4/logs/container.log
$PT_HOME/ptcs/6.4/logs/boot.log
Collaboration $PT_HOME/ptcollab/4.2/logs/collaboration_log.yyyy-mm-dd.txt
$PT_HOME/ptcollab/4.2/settings/logs/collaboration.log
$PT_HOME/ptcollab/4.2/settings/config/wrapper.log
Notification $PT_HOME/ptnotification/4.2/settings/logs/notification.log
$PT_HOME/ptnotification/4.2/settings/logs/wrapper.log
Analytics $PT_HOME/ptanalytics/2.1/logs/analyticsui.log
$PT_HOME/ptanalytics/2.1/logs/asmanagerui.log
$PT_HOME/ptanalytics/2.1/logs/configurator.log
Studio $PT_HOME/ptstudio/2.2/logs/wrapper.log
$PT_HOME/ptstudio/2.2/logs/ptstudio_log.yyyy-mm-dd.txt

Happy logging.

About this Archive

This page is an archive of entries from November 2007 listed from newest to oldest.

October 2007 is the previous archive.

January 2008 is the next archive.

Blogroll


Integryst

Function1

Fabien Sanglier

Bill Benac

Jordan Rose

Chris Bucchere

Robert Herrera

Nanek Blog Aggregator

Spartan Java




if you'd like to be listed here.




I don't blog about non-tech issues here, but you can check my Google Reader Shared Items if you want to know what I'm currently interested in.

Categories