Error on capture session limit reached
search cancel

Error on capture session limit reached

book

Article ID: 384090

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • API calls are used to capture packets at Transport node interfaces.
  • API calls being used are based on Create an new packet capture session from API documentation NSX-T Data Center REST API
  • If more than 2 simultaneous packet captures are run for a single transport node, or more than 4 simultaneous sessions overall, then a "Max capture session limit reached" error is received.
  • Sample API call (example shown with curl API calls): 

    root@NSX:/tmp# ls |grep body
    body_vnic1.json

    root@NSX:/tmp# cat body_vnic1.json
    {
       "node": "7702fbc6-####-####-####-###########",
       "cappoint": "LOGICALPORT",
       "capvalue": "16288384-####-####-####-##############",
       "capmode": "STANDALONE",
       "direction": "INPUT",
       "capsource": "CLI",
       "options": {
                  "values":[
                    {"name":"IPPROTO", "value":"0x01"}
                   ]
                 }
        }
    }


    root@NSX:/tmp# curl -k -X POST -H "Content-Type: application/json" -u #####:'###########' -d@/tmp/body_vnic1.json 'https://127.0.0.1/api/v1/pktcap/session'


  • Sample response when the API call works fine:

    {
      "request" : {
        "node" : "7702fbc6-0557-####-####-#################",
        "capsource" : "UI",
        "cappoint" : "LOGICALPORT",
        "capmode" : "STANDALONE",
        "direction" : "INPUT",
        "capvalue" : "0bbb6d9e-003d-####-####-###########",
        "capamount" : 20000,
        "capduration" : 600,
        "options" : {
          "values" : [ {
            "name" : "ipproto",
            "value" : "0x01"
          } ]
        }
      },
      "sessionid" : "f1838874-e5fc-####-####-#############",
      "sessionname" : "f1838874-e5fc-####-####-##############",
      "sessionstatus" : "CREATED",
      "starttime" : 1729202868329,
      "_protection" : "NOT_PROTECTED"
    }


  • Sample output when the response shows error on session limit reached:

    {
      "httpStatus" : "BAD_REQUEST",
      "error_code" : 31005,
      "module_name" : "Packet Capture",
      "error_message" : "Max per host capture session limit reached, limit is : 2"
    }



    Or,


    {\n  "httpStatus" : "BAD_REQUEST",\n  "error_code" : 31004,\n  "module_name" : "Packet Capture",\n  "error_message" : "Max global capture session limit reached, limit is : 4"\n}'
    {
      "httpStatus" : "BAD_REQUEST",
      "error_code" : 31004,
      "module_name" : "Packet Capture",
      "error_message" : "Max global capture session limit reached, limit is : 4"



  • 2 kinds of limitations can be seen: capture session limit per host, and a global capture session limit.

Environment

VMware NSX

VMware NSX-T 3.x

VMware NSX 4.x

Cause

This is by design. This limit is hard-coded in the product.

Resolution

An enhancement of higher limit will be included in VCF 9.2 . At VCF 9.2 the capture session limit will be at least 6 per host, and at least 50 globally. 

Workaround:

  • For the API calls, there is no workaround to break this limit.
  • There are many other ways to capture packets. For example , using pktcap commands on ESXi shell.