Security

HTTP 401 -- Remote login disabled because you are using a free license which does not provide authentication.

kirillchokparov
Explorer

I have a working task to create Java-integration with Splunk system that is used by one of our clients. So I installed Splunk trial version on my virtual machine and trying to connect to it with Java and make some test search requests.

I have the following exception:

com.splunk.HttpException: HTTP 401 -- Remote login disabled because you are
using a free license which does not provide authentication. To resolve
either switch to the forwarder-only license or the enterprise trial
license included with the product. To override this and enable
unauthenticated remote management, edit the 'allowRemoteLogin' setting in
your server.conf file.

At first glance there are some explanations but I don't understand what should be done exactly so that I can emulate connection to real client's Splunk properly.
I am absolutely new with Splunk. It is my fist efforts.

My code is the following:

public void connectToSplunk(){

    HttpService.setSslSecurityProtocol(SSLSecurityProtocol.TLSv1_2);

    ServiceArgs loginArgs = new ServiceArgs();
    loginArgs.setUsername("admin");
    loginArgs.setPassword("my_password");
    loginArgs.setHost("my_host");
    loginArgs.setPort(8089);
    loginArgs.setScheme("https");

            Service splunkService = Service.connect(loginArgs);
    System.out.println("Splunk service created.");

    Job job = splunkService.getJobs().create("search host=testcsv"); //at this point I have an Exception
 ...
}
0 Karma
1 Solution

cpetterborg
SplunkTrust
SplunkTrust

The trail and free licenses are different. If you have converted your trial license to a free license, you loose the Enterprise only features, which is why you got the error message that you did. So your code is possibly correct, but you need to switch your license back from a free license to a trial license. If you go into Settings -> Licensing you can change your license.

View solution in original post

cpetterborg
SplunkTrust
SplunkTrust

The trail and free licenses are different. If you have converted your trial license to a free license, you loose the Enterprise only features, which is why you got the error message that you did. So your code is possibly correct, but you need to switch your license back from a free license to a trial license. If you go into Settings -> Licensing you can change your license.

kirillchokparov
Explorer

The only thing: it seems I need to reinstall Splunk to get Enterprise trial license back.

0 Karma

cpetterborg
SplunkTrust
SplunkTrust

Changing to the Free license can mess things up. I've done that before and had to reinstall, but that was a few years ago, so I was hoping that problem had somehow been resolved. I don't really want to mess up my laptop setup or my production environment, but the licensing page should allow you to change the license configuration.:

I don't know why the image stuff never works for me

If there are no Change buttons after you have moved to a free license, then you probably will have to reinstall. I don't know of a solution to get around that problem.

0 Karma

kirillchokparov
Explorer

Thanks. You are right.

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...