Printer FriendlyEmail Article Link

Spirent TestCenter: Unable to view the aggregate capture for a LAG port

Objective/Summary

On Spirent TestCenter the user may receive errors and be unable to open aggregate captures for LAG ports although viewing the captures separately per member port works as expected. This article compiles possible causes and solutions.

Errors may include:

  • Cannot open the temporary file somefile.pcap
  • Error running mergecap tool
Environment/Versions

This has been seen on Spirent TestCenter 4.69 for Windows after the following procedure:

  1. Create a LAG port with capturable traffic (either Tx/Rx Control Plane traffic or Rx Data Plane traffic).
  2. Capture some traffic on the LAG.
  3. Go to Spirent TestCenter » All Ports » Lag number » Aggregate capture.
  4. Click the "View..." button.

An error like the following may appear in a popup window:

Error: Cannot open the temporary file: C:\Users\username\Documents\Spirent\TestCenter 4.69\Captured Files\somefile.pcap

An error like the following may appear in the Log panel on STC:

​Exception Caught: Traceback (most recent call last):
  File "c:\jenkins-rel\workspace\release_bll_windows_ci\bin/Release\STAKCommands\spirent\LagCapture\GetLagCaptureCommand.py", line 92, in run
  File "c:\jenkins-rel\workspace\release_bll_windows_ci\bin/Release\STAKCommands\spirent\LagCapture\GetLagCaptureCommand.py", line 54, in MergeCaptureFiles: Exception: Error running mergecap tool.
Procedure

There are two possible causes identified for the above errors:

Cause #1. Mergecap is not found in the Path

To fix this:

  1. Open the "System Properties" dialog (steps vary by Windows version).
  2. Go to the "Advanced" tab.
  3. Click on "Environment Variables..."
  4. Append the path to Wireshark to the "Path" system variable. Use a semicolon to separate different values.
  5. Click OK.
  6. To test if this is done correctly, start a new Command Prompt window from the Start Menu. You should be able to type “mergecap” or “wireshark” and it should run the program.
  7. Restart TestCenter from the Start Menu and it should be able to find the mergecap program.

Screenshots below:

Cause #2. The LAG port has been renamed to contains asterisks (and possibly other invalid file characters)

The name for the merged capture file is composed by concatenating the LAG port name, the word "capture" and a timestamp. If the LAG port contains an asterisk (for example "3*10G LAG Port") the resulting file name for the aggregated capture will be invalid.

In this scenario, aggregate capture viewing may work in some configurations (.tcc) and not in others, depending on the port names used.

To fix this:

  1. Rename the port to contain alphanumeric characters only.
  2. Retry viewing the LAG aggregate capture.
Notes
  • Seems individual port captures brings up the capture directly from memory where as the aggregated capture needs to save to a file which some characters are illegal to windows.
  • If you try to name a file with illegal characters, Windows will popup a message indicating A file name can't contain any of the following characters: \ / : * ? " < > |

Product : Switching,Spirent TestCenter,LACP,Packet Captures