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.


Cause #3 Using LabServer

 
We found out that still in the 5.35 release (August 2022 release), the aggregate capture view is not working and giving the same error as above, also, if you try to save the capture using "Save buffer as file" it just does nothing and no file is saved at all.
enlightenedNOTE: At this point, we validated that aggregate capture functions, such as View and Save buffer to file work without LabServer and launching the GUI normally from Windows Start menu (Instead from LabManager)
  • As per our dev team this is a limitation on the LabServer: 
    • Labserver run bll in linux docker, UI run in windows. Then bll can't identify capture file location and wireshark tool location from UI.
      This function need redesign for this special scenario.
       From the code analysis, the "Save buffer as file" should save the aggregate. But for the limitation mentioned above(Windows system different with Linux like system), the target not archived. Currently, only capture file for member port can be saved.
      • CR-01556701
      • JIRA: CIPCD-18171
      • Subject: 5.35 | Either aggregate capture view or save file as buffer is NOT working throuhg LabServer
      • Date/Time Opened: 9/1/2022 4:02 PM
      • Status: DECLINED
      • Target Release: NA
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