NetMaster API /api/v1/server/regions doesn't work
search cancel

NetMaster API /api/v1/server/regions doesn't work

book

Article ID: 282317

calendar_today

Updated On:

Products

NetMaster Network Management for TCP/IP

Issue/Introduction

NetMaster API /api/v1/server/regions doesn't return any rows, even if there is an active NetMaster region. This is the returned string:

{"data":{"index":0,"totalRows":0,"keys":["regionName"],"rows":[]},"apiVersion":"v1","swaggerVersion":"2.0","time":1713341283311}

Environment

NetMaster for TCPIP API Service

Cause

The NetMaster API interface is not enabled or the Unix socket is missing or not accessible. 

Resolution

  1. Check if the NetMaster API Interface has been activated in the NetMaster region:

      1. Connect to the NetMaster region that is not found by /api/v1/server/regions
      2. Issue the /parms shortcut command
      3. Select/Browse the "NM NMAPI         NetMaster API Interface" parameter group (under INTERFACES category)
      4. Check if the value for the "Enable Interface?" parameter is set to YES (the default is NO)
  2. Check the USS directory name where the socket should be created

      1. Connect to the NetMaster region that is not found by /api/v1/server/regions
      2. Issue the /parms shortcut command
      3. Select/Browse the "NM NMAPI         NetMaster API Interface" parameter group (under INTERFACES category)
      4. Check the value for the "API Socket Path Name" parameter (the default is /var/sock)
      5. This value must match the value of the data-provider.config.socket-path variable in the NetMaster API Service configuration file (netmaster.yaml)
  3. Verify that the socket file actually exists

      1. Navigate to the above "API Socket Path Name" directory (e.g. /var/sock)
      2. Check if the socket file NMAPI.<system.id> has been correctly created
        1. If you do not see the socket there, make sure the user id used by the NetMaster region has access to that directory and can create the socket.  
        2. If the socket does successfully get created and exists, then verify the permissions are set correctly. 

Additional Information

If the socket has been correctly created, the following message can be found on NetMaster log:

BAAPI0006 API SERVER ACTIVE ON PATH  /var/sock/NMAPI.<system.id>

Otherwise, this error message will appear:

BAAPI0003 SOCKET Register FAILED, RC=.. FDBK=.. RSN=.. VERRIN=..

See also NetMaster API and Web Portal Architecture page for the complete authorizations required for NetMaster and API Service.

If there are no BAAPI* messages, then the interface has not been started. Be sure that, after "Enable Interface?" parameter is set to YES, the PF6 button is pressed to action the change: