"String or binary data would be truncated" error when creating or modifying a Custom Rule, Policy, Approval or a Ban
search cancel

"String or binary data would be truncated" error when creating or modifying a Custom Rule, Policy, Approval or a Ban

book

Article ID: 287259

calendar_today

Updated On:

Products

Carbon Black App Control (formerly Cb Protection)

Issue/Introduction

  • When modifying existing Policies, Rules, Approvals or Bans, the following error is displayed:
    String or binary data would be truncated in table 'das.dbo.config_list'
  • Some other error messages for the same issue include:
    PARITY_SERVER_ERROR

    Error changing reputation setting: DB Error: String or binary data would be truncated

Environment

  • App Control Server: All Supported Versions

Cause

  • When a Configlist entry (Custom Rule, Approval, Ban, etc) is created and associated with a specific Policy (or Policies) this creates a State Group mapping.
  • There is a character limit of 2048 for these State Group mappings in the Das database. Even if a Policy is removed from a Rule, the State Group mapping will remain.

Resolution

  1. Run SQL Server Management Studio as the Carbon Black Service Account.
  2. Execute the following query to check if there are any state_group mappings getting close to the 2048 limit:
    use das; select state_groups, len(state_groups) as sg_length FROM dbo.host_groups_state_groups WITH (nolock)
  3. If anything above 1900 is returned open a case with Support to request the scripts to scope unused State Group Mappings and prune them.

Additional Information

  • The root cause is an overreliance on various rules/actions per policy (as opposed to applied to all policies), leading to lots of state group mappings.
  • There is a limit on how many mappings a policy can have to a rule. Even if a policy is removed from a rule in the UI, the state group mapping remains.