Friday, May 4, 2012

Fiddler Web Debugging Tool

Fiddler Web Debugging Tool



  http://www.fiddler2.com/fiddler2/ --  is the site that we use.  Just a few observations about using Fiddler to resolve our Session Invalid or Timeout errors:
(at end I also included info  for Webservices, and non-default setup options).

Here is a good quick start for Fiddler:
 
Open Fiddler
 
    - Select Tools->Fiddler Options.. and ensure that these items are checked
 
      on the HTTPS tab:
 
       . Capture HTTPS CONNECTs
 
       . Decrypt HTTPS traffic
 
       . Ignore server certificate errors
 
       . Show data from RPASpy
 
 
 
* Open IE on the local desktop and clear out all temporary Internet files (cache).
 
 
 
* Open the User Tool or Mid-tier (in IE) and navigate to the item(s) in question - note that Fidder logging should show output corresponding to your actions.
 
 
 
* Once the test is completed, switch to Fiddler
 
    - Select Edit->Select All, then File->Save->Sessions->in ArchiveZip.
 
    - Send us the resulting .saz file

----------------------------------------------

Other Fiddler techniques, might be useful in future.
 
Note these are my notes/experiences, not "official".
 
This describes capturing Soap requests from an Axis web service java client:
 
We described Fiddler as a way to capture, monitor, and debug HTTP traffic from a browser to a web server, mostly for troubleshooting your Mid-Tier or load balancer issues. It is sometimes necessary to capture the HTTP Soap request and response from a web service client. However, by default, Fiddler will not capture requests from a Java based web service client.
 
This solution describes how to configure your Java based client to send requests to the Fiddler Proxy port, so that it can capture traffic, which can then be monitored and/or modified to troubleshoot issues.
 
Solution
To configure your Java based client to send requests to the Fiddler Proxy port, you must first determine what port Fiddler is actually running on. To determin this, do the following:
 
1) From within the Fiddler program, select Tools > Fiddler Options...
2) In the Proxy Settings section of the resulting dialog, the port number will be defined for Listen Port:
 
Now that you know which port Fidder is running on, you will need to configure your Java code or environment to send requests to the Fiddler host and port.
 
You can do this in one of the following two ways.
 
1) Modify your Axis client code, adding the following lines to define the proxy host and port
     System.setProperty("http.proxyHost", "localhost");
     System.setProperty("http.proxyPort", "8888");
 
     NOTE: In the example above, we have determined Fiddler to be running on the host "localhost" and on port "8888".
     If Fiddler is running on a different machine (host) or a different port, adjust the code accordingly.
 
2) Set the following JVM Options:
     -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888
 
     NOTE: It will depend on how you are invoking your Java based Axis client, to determine exactly where to put this setting.
     If you are invoking the Java based Axis client from the command line, for example, you would do something like this:
     java -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888 MyWebServiceClient
     If you are invoking it from an IDE, like Eclipse for example, you would set this in the "Run > Run... > Arguments (tab) > VM arguments"
 
Now that you have configured your Java code or environment to define a Proxy host and port, Fiddler should now capture requests and responses when the Axis client is invoked.
--------------------------------------------------------------
Finally, although Fiddler defaults to IE, you can use other browsers:
1. start Fiddler (which should listen on port 8888 by default)
2. start (for example) Firefox, and change its HTTP proxy settings (under Tools->Options->General->Connection Settings[button]) to "127.0.0.1" and port 8888
3. navigate to websites using Firefox and note the traffic monitored in Fiddler.
--------------------------------------------

JON Monitoring

JON Monitoring




JON - Jboss Operation Network
Overview
  • JON stands for Jboss Operations Network
  • JON is centralized system which has inventory of resources across multiple platforms
  • JON - is a Server - Agent Model with a backend Database to store Metrics



Components:
  • JON Server : myTestJonServer1
  • JON Database: myTestDBServer1
  • JON Agents: Servers where apps has to be monitored

JON Server : myTestJonServer1
    Unix id: jonsrvr
    Start/Stop Server:
                    /opt/jon/jon-server-2.4.0.GA/bin/rhq-server.sh start
                   /opt/jon/jon-server-2.4.0.GA/bin/rhq-server.sh stop
     Logs:
                    /opt/jon/jon-server-2.4.0.GA/logs
    JON Admin Console

  JON Agents
      We need one agent per Server
      Unix id: jonagent
    Start/Stop Agent
                    /opt/jonagent/rhq-agent/bin/rhq-agent-wrapper.sh start
                      /opt/jonagent/rhq-agent/bin/rhq-agent-wrapper.sh stop
     Logs:
                    /opt/jonagent/rhq-agent/logs/agent.log

 JON Instance Configuration

  1. Once the agent is discovered, next step is complete JBOSS instance configuration. One time setup.
  1. Open the JON server console.



  • Navigate to  Dashboard  --> Server Total -->JBossAS Server    

    




  • For any JBoss instance,  click on INVENTORY tab and “Connection”


  • Now edit the
Naming Provider URL
Principal
Password
     (For JNP Url look at   eg: “ /appshr/jb5-logs/pafClusterC/data> less jnp-service.url )

  • Prinicpal and password should be same values used to authenticate JMX-console
(Before using principal and password, test it using JMX-CONSOLE for same user


  • Once its configured correctly, it should display values in “Monitoring tab”

   ( Some times, you have wait 10mins before “warning” symbol goes away on JBOSS server)