Installation

How can I delete the last license from an active group?

jhatch_splunk
Splunk Employee
Splunk Employee

Attempting to remove the final license within an active group is failing with the following error;

"failed to remove license: 'cannot delete last license from active group=<license group>, please switch active group and try again'"
Labels (1)
1 Solution

jhatch_splunk
Splunk Employee
Splunk Employee

You must first switch groups before removing the last license, in the below example we are using the 'Free' license group.

Via the GUI;

Settings > Licensing > Change license group > Free license (save and 'restart now') 

Or via the CLI;

$SPLUNK_HOME/bin/splunk edit licenser-groups Free -is_active 1
$SPLUNK_HOME/bin/splunk restart

Once splunkd restarts, re-run the license removal operation, first running 'list licenses' to confirm the correct hash for the license to be removed;

$SPLUNK_HOME/bin/splunk list licenses
$SPLUNK_HOME/bin/splunk remove licenses <hash> 

Subsequently installing a new license will automatically switch to, and make active, the group appropriate to the type of license installed (Enterprise, DevTest, etc) following a restart of splunkd.

Add the new license using the GUI;

Settings > Licensing > Add license > <select license>

Or add the new license using the CLI;

$SPLUNK_HOME/bin/splunk add licenses <path_to_license>
$SPLUNK_HOME/bin/splunk restart

View solution in original post

jhatch_splunk
Splunk Employee
Splunk Employee

You must first switch groups before removing the last license, in the below example we are using the 'Free' license group.

Via the GUI;

Settings > Licensing > Change license group > Free license (save and 'restart now') 

Or via the CLI;

$SPLUNK_HOME/bin/splunk edit licenser-groups Free -is_active 1
$SPLUNK_HOME/bin/splunk restart

Once splunkd restarts, re-run the license removal operation, first running 'list licenses' to confirm the correct hash for the license to be removed;

$SPLUNK_HOME/bin/splunk list licenses
$SPLUNK_HOME/bin/splunk remove licenses <hash> 

Subsequently installing a new license will automatically switch to, and make active, the group appropriate to the type of license installed (Enterprise, DevTest, etc) following a restart of splunkd.

Add the new license using the GUI;

Settings > Licensing > Add license > <select license>

Or add the new license using the CLI;

$SPLUNK_HOME/bin/splunk add licenses <path_to_license>
$SPLUNK_HOME/bin/splunk restart

somesoni2
SplunkTrust
SplunkTrust

Thanks for sharing.

0 Karma

adonio
Ultra Champion

is this a question?

0 Karma

jhatch_splunk
Splunk Employee
Splunk Employee

Good point...I've split the question and answer across separate posts.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...