All Apps and Add-ons

AuthenticationFailed during Import

richardphung
Communicator
2020-01-23 01:57:07,390 ERROR A general exception was thrown when executing the import
Traceback (most recent call last):
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\google_spreadsheet.py", line 211, in import_file
    last_updated = google_lookup_sync.import_to_lookup_file(lookup_name, None, None, spreadsheet_title, worksheet_name, session_key, create_if_non_existent=False)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\google_drive_app\__init__.py", line 293, in import_to_lookup_file
    splunk_lookup_table = lookupfiles.SplunkLookupTableFile.get(lookupfiles.SplunkLookupTableFile.build_id(lookup_name, namespace, owner), sessionKey=session_key)
  File "D:\Program Files\Splunk\Python-2.7\lib\site-packages\splunk\models\base.py", line 572, in get
    return SplunkRESTManager(cls, sessionKey=sessionKey).get(id)
  File "D:\Program Files\Splunk\Python-2.7\lib\site-packages\splunk\models\base.py", line 552, in get
    entity = self._get_entity(id, host_path=host_path)
  File "D:\Program Files\Splunk\Python-2.7\lib\site-packages\splunk\models\base.py", line 468, in _get_entity
    return self._fix_entity(splunk.entity.getEntity(self.model.resource, None, sessionKey=self.sessionKey, uri=id))
  File "D:\Program Files\Splunk\Python-2.7\lib\site-packages\splunk\entity.py", line 276, in getEntity
    serverResponse, serverContent = rest.simpleRequest(uri, getargs=kwargs, sessionKey=sessionKey, raiseAllErrors=True)
  File "D:\Program Files\Splunk\Python-2.7\lib\site-packages\splunk\rest\__init__.py", line 553, in simpleRequest
    raise splunk.AuthenticationFailed
AuthenticationFailed: [HTTP 401] Client is not authenticated

Please advise.

0 Karma
1 Solution

richardphung
Communicator

I disabled and then reenabled the input.

I get a slightly different error:

2020-01-23 14:54:22,812 ERROR Execution failed
Traceback (most recent call last):
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\modular_input_base_class.py", line 1095, in execute
    self.do_run(in_stream, log_exception_and_continue=True)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\modular_input_base_class.py", line 964, in do_run
    if ServerInfo.is_shc_captain(input_config.session_key) == False:
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\shortcuts.py", line 31, in wrapper
    return function(*args, **kwargs)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\server_info.py", line 154, in is_shc_captain
    if not cls.is_on_shc(session_key):
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\shortcuts.py", line 31, in wrapper
    return function(*args, **kwargs)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\server_info.py", line 111, in is_on_shc
    except splunk.ResourceNotFound:
NameError: global name 'splunk' is not defined

View solution in original post

0 Karma

richardphung
Communicator

I disabled and then reenabled the input.

I get a slightly different error:

2020-01-23 14:54:22,812 ERROR Execution failed
Traceback (most recent call last):
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\modular_input_base_class.py", line 1095, in execute
    self.do_run(in_stream, log_exception_and_continue=True)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\modular_input_base_class.py", line 964, in do_run
    if ServerInfo.is_shc_captain(input_config.session_key) == False:
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\shortcuts.py", line 31, in wrapper
    return function(*args, **kwargs)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\server_info.py", line 154, in is_shc_captain
    if not cls.is_on_shc(session_key):
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\shortcuts.py", line 31, in wrapper
    return function(*args, **kwargs)
  File "D:\Program Files\Splunk\etc\apps\google_drive\bin\modular_input.zip\modular_input\server_info.py", line 111, in is_on_shc
    except splunk.ResourceNotFound:
NameError: global name 'splunk' is not defined
0 Karma

LukeMurphey
Champion

This particular error should be fixed in version 2.0.3: https://splunkbase.splunk.com/app/2630/

0 Karma

richardphung
Communicator

@LukeMurphey
This fixed everything.

0 Karma

LukeMurphey
Champion

Could you be so kind as to answer the following questions in order to help me troubleshoot the issue:

  1. Has the input ever worked? I'm trying to figure out if this is an intermittent error.
  2. Do you happen to be using the free license?
  3. Does this seem to coincide with Splunk starting or shutting down? Asking because I have seen errors like this happen on startup and shutdown.
0 Karma

richardphung
Communicator

Answers:

  1. Yes. In fact, it has been working for about 4 months, and stopped recently, on 01/21/2020. alt text
  2. Yes. I downgraded to the Free License on this installation on 12/20/2019
  3. No, I haven't restarted Splunk on this machine when we started seeing the errors, but I have since updating other apps.
0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...