Skip to Content

How to fix L2 polling for the FortiGate failed frequently in FortiNAC

This article describes the behavior when FortiGate frequently experiences failures for L2 polling.

Scope

FortiNAC, FortiGate.

Solution

SNMP and CLI credentials are working, but the L2 polling for FortiGate frequently fails due to the ‘java.net.SocketTimeoutException: Read timed out’ output error.master for FortiGate.

This means FortiNAC is trying to read data from the request, but it is taking longer than the timeout value for the data to arrive from the FortiGate.

 

To resolve the issue:

Step 1: Login to the FortiNAC CLI.

Step 2: Go to the Shell mode:

execute enter-shell

Step 3: Change the API_Connect_TIMEOUT and API_READ_TIMEOUT value as below:

> Device -ip <FGT IP addr> -setAttr -name API_CONNECT_TIMEOUT -value <time in milliseconds>
> Device -ip <FGT IP addr> -setAttr -name API_READ_TIMEOUT -value <time in milliseconds>

Example:

> Device -ip 10.10.10.1 -setAttr -name API_CONNECT_TIMEOUT -value 180
> Device -ip 10.10.10.1 -setAttr -name API_READ_TIMEOUT -value 45

Note: By default, the API connect timeout value is 120 seconds and the API read timeout value is 30 seconds.