Wireshark and Sitecore Commerce Engine

Wireshark is an extremely useful tool to have in your tool kit. You can use it to troubleshoot issues. It can be useful in troubleshoot configuration issues and identifying extensibility points.

Here are some steps on using it on a local development machine

Setup

  1. Review the Wireshark wiki and related articles:
    https://wiki.wireshark.org/CaptureSetup/Loopback
    http://www.netresec.com/?page=Blog&month=2011-04&post=RawCap-sniffer-for-Windows-released
  2. Install Wireshark
  3. Install RawCap
    • Download: https://www.netresec.com/?download=RawCap
    • Create folder C:Wireshark and copy RawCap.exe into it.
    • Optional: I like to create readme in the folder to save the command:
      c:Wireshark> RawCap.exe 127.0.0.1 dumpfile.pcap

Usage

  1. Start RawCap
    • Open a command prompt and execute command RawCap.exe 127.0.0.1 dumpfile.pcap
    • image
  2. Start Wireshark
    • Open the capture file being written too by RawCap – File –> Open –> C:Wiresharkdumpfile.pcap
    • Filter by the Sitecore Commerce Engine: http.host == "habitat.commerceengine.dev.local:5000" or another useful filter:(http.accept) && (http.host contains ":5000")      
      image
    • NOTE: You will need to click the refresh button in Wireshark to reload the RawCap dump file.
      image
    • Right click on the request you want to inspect, select Follow, then HTTP Stream.
      image
    • You will need to scroll or find the request/response your interested in. I usually stop and start the RawCap dump before doing an action I want to inspect so finding what I’m after in the stream is easier.
      image
Advertisements