Skip to main content
dbu
Staff
Staff
Oct 9, 2026 9:03 AM UTC

Technical Tip: Resolving HTTP Status 500 when loading FortiNAC Groups due to circular group membership

Description

This article describes how to identify and resolve an issue where the FortiNAC Groups page fails to load and returns HTTP Status 500 - Internal Server Error.

The issue can occur when two groups reference each other as members, creating a circular group relationship. This can cause recursive group processing to fail with java.lang.StackOverflowError.

Scope

FortiNAC.

Solution

  1. Identify the issue:

When navigating to System -> Groups, the following symptoms may be observed:

  • The Groups page displays a nonzero total number of groups but does not display any entries.

  • A pop-up reports "Load Groups Error - HTTP Status 500 - Internal Server Error".

  • Browser Developer Tools show a failed request to GroupActions.jsp.

2ce46d77.png

In the investigated case, the database contained 691 groups, but the Groups page could not display them.


  1. Identify the Java exception:

Review the FortiNAC application logs (output.master) while reproducing the issue.

The following exception was observed:

org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[jsp] SEVERE :: 2026-10-08 06:49:40:703 :: #581 :: Servlet.service() for servlet [jsp] in context with path [] threw exception [javax.servlet.ServletException: java.lang.StackOverflowError] with root cause
java.lang.StackOverflowError
at java.base/java.util.concurrent.ConcurrentHashMap.get(Unknown Source)
at com.bsc.api.resource.ResourceManager.getRMBundles(ResourceManager.java:211)
at com.bsc.api.resource.ResourceManager.getStringInternal(ResourceManager.java:267)
at com.bsc.api.resource.ResourceManager.getString(ResourceManager.java:384)
at com.bsc.api.group.Group.getNameLabel(Group.java:165)
at com.bsc.api.group.Group.getNameLabel(Group.java:181)
at org.apache.jsp.GroupActions_jsp.getGroupJSONObject(GroupActions_jsp.java:403)
at org.apache.jsp.GroupActions_jsp.getGroupJSONObjectFromNode(GroupActions_jsp.java:438)
at org.apache.jsp.GroupActions_jsp.getGroupJSONObjectFromNode(GroupActions_jsp.java:442)
at org.apache.jsp.GroupActions_jsp.getGroupJSONObjectFromNode(GroupActions_jsp.java:442)
at org.apache.jsp.GroupActions_jsp.getGroupJSONObjectFromNode(GroupActions_jsp.java:442)
at org.apache.jsp.GroupActions_jsp.getGroupJSONObjectFromNode(GroupActions_jsp.java:442)


The repeated calls to getGroupJSONObjectFromNode() indicate that application is recursively processing the group hierarchy without terminating.


  1. Check the group membership database:

  • Connect to FortiNAC database shell:

execute db-shell


  • Check for groups referencing themselves:

SELECT
    ID,
    PARENT_ID,
    CHILD_ID,
    elementClass,
    soft
FROM bsc.GroupMember
WHERE PARENT_ID = CHILD_ID
  AND elementClass = 11
  AND soft = 0;


  1. Identify reciprocal group membership relationships:

Execute the following read-only query to identify active group membership relationships where Group A contains Group B and Group B contains Group A:

SELECT DISTINCT
    a.PARENT_ID AS group_a_id,
    ga.name AS group_a,
    a.CHILD_ID AS group_b_id,
    gb.name AS group_b
FROM bsc.GroupMember a
JOIN bsc.GroupMember b
    ON a.PARENT_ID = b.CHILD_ID
   AND a.CHILD_ID = b.PARENT_ID
JOIN bsc.`Group` ga
    ON ga.ID = a.PARENT_ID
JOIN bsc.`Group` gb
    ON gb.ID = a.CHILD_ID
WHERE a.elementClass = 11
  AND b.elementClass = 11
  AND a.soft = 0
  AND b.soft = 0
  AND a.PARENT_ID < a.CHILD_ID;


In the investigated case, the query identified one reciprocal group relationship.

An illustrative example is:

Group A (ID 101)
    |
    +---- contains Group B (ID 102)

Group B (ID 102)
    |
    +---- contains Group A (ID 101)


This creates a recursive relationship:

Group A -> Group B -> Group A -> Group B ...


  1. Identify the exact GroupMember records:

Use the group IDs returned in Step 4 to inspect the individual membership records.

Use the group IDs returned in Step 4 to inspect the individual membership records.

SELECT
    gm.ID,
    gm.PARENT_ID,
    p.name AS parent_group,
    gm.CHILD_ID,
    c.name AS child_group,
    gm.elementClass,
    gm.soft
FROM bsc.GroupMember gm
JOIN bsc.`Group` p
    ON p.ID = gm.PARENT_ID
JOIN bsc.`Group` c
    ON c.ID = gm.CHILD_ID
WHERE gm.elementClass = 11
  AND gm.soft = 0
  AND (
       (gm.PARENT_ID = 101 AND gm.CHILD_ID = 102)
    OR (gm.PARENT_ID = 102 AND gm.CHILD_ID = 101)
  );


Replace IDs 101 and 102 with the actual group IDs identified in Step 4.

Illustrative output:

Membership ID

Parent

Child

elementClass

soft

10001

101

102

11

0

10002

102

101

11

0


In this example, both groups contain each other.


  1. Correct the invalid group membership:

Determine which membership is incorrect based on the intended group configuration.

In the investigated case, it was confirmed that one group had mistakenly been added as a member of the other group.
The Groups page loaded successfully after the incorrect reciprocal membership was removed.


Deletion command :

DELETE FROM bsc.GroupMember
WHERE ID = 55173
  AND PARENT_ID = 102
  AND CHILD_ID = 101
  AND elementClass = 11
  AND soft = 0;


Important:

  • Back up the relevant database information before making any changes.

  • Direct database modifications should be performed only under Fortinet TAC guidance and the appropriate change-control procedure.

  • Identify the exact GroupMember.ID to be removed.

  • Do not delete either Group object.

  • Do not assume that the membership with the highest ID is necessarily incorrect.

  • Verify the affected row count and remaining memberships before committing any database change.

Verify the resolution:

  1. After correcting the invalid membership:

  2. Query GroupMember again to confirm that the reciprocal relationship has been eliminated.

  3. Confirm that both original groups still exist.

  4. Reload System -> Groups.

  5. Verify that the groups are displayed successfully.

  6. Check that the application no longer generates a StackOverflowError when loading Groups.

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024